Changeset 3947 for palm/trunk/SOURCE
- Timestamp:
- May 3, 2019 7:56:44 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/pmc_interface_mod.f90
r3946 r3947 25 25 ! ----------------- 26 26 ! $Id$ 27 ! The checks included in 3946 are extended for the z-direction and moved into its 28 ! own subroutine called from pmci_define_index_mapping. 29 ! 30 ! 3946 2019-05-02 14:18:59Z hellstea 27 31 ! Check added for child domains too small in terms of number of parent-grid cells so 28 32 ! that anterpolation is not possible. Checks added for too wide anterpolation buffer … … 1729 1733 iplg, iprg, jpsg, jpng 1730 1734 FLUSH( 9 ) 1731 !1732 !-- Check if the child domain is too small in terms of number of parent-grid cells1733 !-- covered so that anterpolation buffers fill the whole domain so that anterpolation1734 !-- not possible. Also, check that anterpolation_buffer_width is not too large to1735 !-- prevent anterpolation.1736 IF ( nesting_mode == 'two-way') THEN1737 !1738 !-- First x-direction1739 IF ( iplg + 3 + anterpolation_buffer_width > iprg - 3 - anterpolation_buffer_width ) THEN1740 IF ( iprg - iplg + 1 < 7 ) THEN1741 !1742 !-- Error1743 WRITE( message_string, * ) 'child domain too narrow for anterpolation in x-direction'1744 CALL message( 'pmci_map_fine_to_coarse_grid', 'PA0652', 3, 2, 0, 6, 0 )1745 ELSE IF ( iprg - iplg + 1 < 11 ) THEN1746 !1747 !-- Warning1748 WRITE( message_string, * ) 'anterpolation_buffer_width value too high, reset to 0'1749 CALL message( 'pmci_map_fine_to_coarse_grid', 'PA0653', 0, 1, 0, 6, 0 )1750 anterpolation_buffer_width = 01751 ELSE1752 !1753 !-- Informative message1754 WRITE( message_string, * ) 'anterpolation_buffer_width value too high, reset to default value 2'1755 CALL message( 'pmci_map_fine_to_coarse_grid', 'PA0654', 0, 0, 0, 6, 0 )1756 anterpolation_buffer_width = 21757 ENDIF1758 ENDIF1759 !1760 !-- Then y-direction1761 IF ( jpsg + 3 + anterpolation_buffer_width > jpng - 3 - anterpolation_buffer_width ) THEN1762 IF ( jpng - jpsg + 1 < 7 ) THEN1763 !1764 !-- Error1765 WRITE( message_string, * ) 'child domain too narrow for anterpolation in y-direction'1766 CALL message( 'pmci_map_fine_to_coarse_grid', 'PA0652', 3, 2, 0, 6, 0 )1767 ELSE IF ( jpng - jpsg + 1 < 11 ) THEN1768 !1769 !-- Warning1770 WRITE( message_string, * ) 'anterpolation_buffer_width value too high, reset to 0'1771 CALL message( 'pmci_map_fine_to_coarse_grid', 'PA0653', 0, 1, 0, 6, 0 )1772 anterpolation_buffer_width = 01773 ELSE1774 !1775 !-- Informative message1776 WRITE( message_string, * ) 'anterpolation_buffer_width value too high, reset to default value 2'1777 CALL message( 'pmci_map_fine_to_coarse_grid', 'PA0654', 0, 0, 0, 6, 0 )1778 anterpolation_buffer_width = 21779 ENDIF1780 ENDIF1781 1782 ENDIF1783 1735 1784 1736 END SUBROUTINE pmci_map_fine_to_coarse_grid … … 1839 1791 WRITE( 9, "('kcto, kctw = ', 2(i3,2x))" ) kcto, kctw 1840 1792 FLUSH( 9 ) 1793 ! 1794 !-- In case of two-way coupling, check that the child domain is sufficiently 1795 !-- large in terms of the number of parent-grid cells covered. Otherwise 1796 !-- anterpolation is not possible. 1797 IF ( nesting_mode == 'two-way') THEN 1798 CALL pmci_check_child_domain_size 1799 ENDIF 1841 1800 1842 1801 ALLOCATE( iflu(ipla:ipra) ) … … 2089 2048 2090 2049 END SUBROUTINE pmci_define_index_mapping 2050 2051 2052 2053 SUBROUTINE pmci_check_child_domain_size 2054 ! 2055 !-- Check if the child domain is too small in terms of number of parent-grid cells 2056 !-- covered so that anterpolation buffers fill the whole domain so that anterpolation 2057 !-- not possible. Also, check that anterpolation_buffer_width is not too large to 2058 !-- prevent anterpolation. 2059 IMPLICIT NONE 2060 2061 ! 2062 !-- First x-direction 2063 IF ( iplg + 3 + anterpolation_buffer_width > iprg - 3 - anterpolation_buffer_width ) THEN 2064 IF ( iprg - iplg + 1 < 7 ) THEN 2065 ! 2066 !-- Error 2067 WRITE( message_string, * ) 'child domain too narrow for anterpolation in x-direction' 2068 CALL message( 'pmci_map_fine_to_coarse_grid', 'PA0652', 3, 2, 0, 6, 0 ) 2069 ELSE IF ( iprg - iplg + 1 < 11 ) THEN 2070 ! 2071 !-- Warning 2072 WRITE( message_string, * ) 'anterpolation_buffer_width value too high, reset to 0' 2073 CALL message( 'pmci_map_fine_to_coarse_grid', 'PA0653', 0, 1, 0, 6, 0 ) 2074 anterpolation_buffer_width = 0 2075 ELSE 2076 ! 2077 !-- Informative message 2078 WRITE( message_string, * ) 'anterpolation_buffer_width value too high, reset to default value 2' 2079 CALL message( 'pmci_map_fine_to_coarse_grid', 'PA0654', 0, 0, 0, 6, 0 ) 2080 anterpolation_buffer_width = 2 2081 ENDIF 2082 ENDIF 2083 ! 2084 !-- Then y-direction 2085 IF ( jpsg + 3 + anterpolation_buffer_width > jpng - 3 - anterpolation_buffer_width ) THEN 2086 IF ( jpng - jpsg + 1 < 7 ) THEN 2087 ! 2088 !-- Error 2089 WRITE( message_string, * ) 'child domain too narrow for anterpolation in y-direction' 2090 CALL message( 'pmci_map_fine_to_coarse_grid', 'PA0652', 3, 2, 0, 6, 0 ) 2091 ELSE IF ( jpng - jpsg + 1 < 11 ) THEN 2092 ! 2093 !-- Warning 2094 WRITE( message_string, * ) 'anterpolation_buffer_width value too high, reset to 0' 2095 CALL message( 'pmci_map_fine_to_coarse_grid', 'PA0653', 0, 1, 0, 6, 0 ) 2096 anterpolation_buffer_width = 0 2097 ELSE 2098 ! 2099 !-- Informative message 2100 WRITE( message_string, * ) 'anterpolation_buffer_width value too high, reset to default value 2' 2101 CALL message( 'pmci_map_fine_to_coarse_grid', 'PA0654', 0, 0, 0, 6, 0 ) 2102 anterpolation_buffer_width = 2 2103 ENDIF 2104 ENDIF 2105 ! 2106 !-- Finally z-direction 2107 IF ( kctw - 1 - anterpolation_buffer_width < 1 ) THEN 2108 IF ( kctw - 1 < 1 ) THEN 2109 ! 2110 !-- Error 2111 WRITE( message_string, * ) 'child domain too shallow for anterpolation in z-direction' 2112 CALL message( 'pmci_map_fine_to_coarse_grid', 'PA0652', 3, 2, 0, 6, 0 ) 2113 ELSE IF ( kctw - 3 < 1 ) THEN 2114 ! 2115 !-- Warning 2116 WRITE( message_string, * ) 'anterpolation_buffer_width value too high, reset to 0' 2117 CALL message( 'pmci_map_fine_to_coarse_grid', 'PA0653', 0, 1, 0, 6, 0 ) 2118 anterpolation_buffer_width = 0 2119 ELSE 2120 ! 2121 !-- Informative message 2122 WRITE( message_string, * ) 'anterpolation_buffer_width value too high, reset to default value 2' 2123 CALL message( 'pmci_map_fine_to_coarse_grid', 'PA0654', 0, 0, 0, 6, 0 ) 2124 anterpolation_buffer_width = 2 2125 ENDIF 2126 ENDIF 2127 2128 END SUBROUTINE pmci_check_child_domain_size 2129 2130 2091 2131 2092 2093 2094 2132 SUBROUTINE pmci_allocate_workarrays 2095 2133 !
Note: See TracChangeset
for help on using the changeset viewer.