Changeset 108 for palm/trunk/SOURCE/check_parameters.f90
- Timestamp:
- Aug 24, 2007 3:10:38 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/check_parameters.f90
r106 r108 9 9 ! Bugfix: Error message concerning output of particle concentration (pc) 10 10 ! modified 11 ! More checks and more default values for coupled runs 12 ! allow data_output_pr= q, wq, w"q", w*q* for humidity = .T. (instead of 13 ! cloud_physics = .T.) 14 ! Rayleigh damping for ocean fixed. 11 15 ! 12 16 ! Former revisions: … … 76 80 CHARACTER (LEN=100) :: action 77 81 78 INTEGER :: i, ilen, intervals, iter, j, k, nnxh, nnyh, position, prec 82 INTEGER :: i, ilen, intervals, iremote = 0, iter, j, k, nnxh, nnyh, & 83 position, prec 79 84 LOGICAL :: found, ldum 80 REAL :: gradient, maxn, maxp 81 85 REAL :: gradient, maxn, maxp, remote = 0.0 82 86 83 87 ! … … 103 107 CALL local_stop 104 108 ENDIF 109 110 ! 111 !-- Check dt_coupling, restart_time, dt_restart, end_time, dx, dy, nx and ny 112 IF ( coupling_mode /= 'uncoupled' ) THEN 113 IF ( dt_coupling == 9999999.9 ) THEN 114 IF ( myid == 0 ) THEN 115 PRINT*, '+++ check_parameters:' 116 PRINT*, ' dt_coupling is not set but required for coupling ', & 117 'mode: ', TRIM( coupling_mode ) 118 ENDIF 119 CALL local_stop 120 ENDIF 121 #if defined( __parallel ) && defined( __mpi2 ) 122 CALL MPI_SEND( dt_coupling, 1, MPI_REAL, myid, 11, comm_inter, ierr ) 123 CALL MPI_RECV( remote, 1, MPI_REAL, myid, 11, comm_inter, status, ierr ) 124 IF ( dt_coupling /= remote ) THEN 125 IF ( myid == 0 ) THEN 126 PRINT*, '+++ check_parameters:' 127 PRINT*, ' TRIM( coupling_mode ): dt_coupling = ', dt_coupling 128 PRINT*, ' is not equal to dt_coupling_remote = ', remote 129 ENDIF 130 CALL local_stop 131 ENDIF 132 CALL MPI_SEND( restart_time, 1, MPI_REAL, myid, 12, comm_inter, ierr ) 133 CALL MPI_RECV( remote, 1, MPI_REAL, myid, 12, comm_inter, status, ierr ) 134 IF ( restart_time /= remote ) THEN 135 IF ( myid == 0 ) THEN 136 PRINT*, '+++ check_parameters:' 137 PRINT*, ' TRIM( coupling_mode ): restart_time = ', restart_time 138 PRINT*, ' is not equal to restart_time_remote = ', remote 139 ENDIF 140 CALL local_stop 141 ENDIF 142 CALL MPI_SEND( dt_restart, 1, MPI_REAL, myid, 13, comm_inter, ierr ) 143 CALL MPI_RECV( remote, 1, MPI_REAL, myid, 13, comm_inter, status, ierr ) 144 IF ( dt_restart /= remote ) THEN 145 IF ( myid == 0 ) THEN 146 PRINT*, '+++ check_parameters:' 147 PRINT*, ' TRIM( coupling_mode ): dt_restart = ', dt_restart 148 PRINT*, ' is not equal to dt_restart_remote = ', remote 149 ENDIF 150 CALL local_stop 151 ENDIF 152 CALL MPI_SEND( end_time, 1, MPI_REAL, myid, 14, comm_inter, ierr ) 153 CALL MPI_RECV( remote, 1, MPI_REAL, myid, 14, comm_inter, status, ierr ) 154 IF ( end_time /= remote ) THEN 155 IF ( myid == 0 ) THEN 156 PRINT*, '+++ check_parameters:' 157 PRINT*, ' TRIM( coupling_mode ): end_time = ', end_time 158 PRINT*, ' is not equal to end_time_remote = ', remote 159 ENDIF 160 CALL local_stop 161 ENDIF 162 CALL MPI_SEND( dx, 1, MPI_REAL, myid, 15, comm_inter, ierr ) 163 CALL MPI_RECV( remote, 1, MPI_REAL, myid, 15, comm_inter, status, ierr ) 164 IF ( dx /= remote ) THEN 165 IF ( myid == 0 ) THEN 166 PRINT*, '+++ check_parameters:' 167 PRINT*, ' TRIM( coupling_mode ): dx = ', dx 168 PRINT*, ' is not equal to dx_remote = ', remote 169 ENDIF 170 CALL local_stop 171 ENDIF 172 CALL MPI_SEND( dy, 1, MPI_REAL, myid, 16, comm_inter, ierr ) 173 CALL MPI_RECV( remote, 1, MPI_REAL, myid, 16, comm_inter, status, ierr ) 174 IF ( dy /= remote ) THEN 175 IF ( myid == 0 ) THEN 176 PRINT*, '+++ check_parameters:' 177 PRINT*, ' TRIM( coupling_mode ): dy = ', dy 178 PRINT*, ' is not equal to dy_remote = ', remote 179 ENDIF 180 CALL local_stop 181 ENDIF 182 CALL MPI_SEND( nx, 1, MPI_INTEGER, myid, 17, comm_inter, ierr ) 183 CALL MPI_RECV( iremote, 1, MPI_INTEGER, myid, 17, comm_inter, status, & 184 ierr ) 185 IF ( nx /= iremote ) THEN 186 IF ( myid == 0 ) THEN 187 PRINT*, '+++ check_parameters:' 188 PRINT*, ' TRIM( coupling_mode ): nx = ', nx 189 PRINT*, ' is not equal to nx_remote = ', iremote 190 ENDIF 191 CALL local_stop 192 ENDIF 193 CALL MPI_SEND( ny, 1, MPI_INTEGER, myid, 18, comm_inter, ierr ) 194 CALL MPI_RECV( iremote, 1, MPI_INTEGER, myid, 18, comm_inter, status, & 195 ierr ) 196 IF ( ny /= iremote ) THEN 197 IF ( myid == 0 ) THEN 198 PRINT*, '+++ check_parameters:' 199 PRINT*, ' TRIM( coupling_mode ): ny = ', ny 200 PRINT*, ' is not equal to ny_remote = ', iremote 201 ENDIF 202 CALL local_stop 203 ENDIF 204 #endif 205 ENDIF 206 207 #if defined( __parallel ) && defined( __mpi2 ) 208 ! 209 !-- Exchange via intercommunicator 210 IF ( coupling_mode == 'atmosphere_to_ocean' ) THEN 211 CALL MPI_SEND( humidity, & 212 1, MPI_LOGICAL, myid, 19, comm_inter, ierr ) 213 ELSEIF ( coupling_mode == 'ocean_to_atmosphere' ) THEN 214 CALL MPI_RECV( humidity_remote, & 215 1, MPI_LOGICAL, myid, 19, comm_inter, status, ierr ) 216 ENDIF 217 #endif 218 105 219 106 220 ! … … 821 935 822 936 ! 823 !-- Ocean version is using flux boundary conditions at the top 824 IF ( ocean ) use_top_fluxes = .TRUE. 937 !-- Ocean version must use flux boundary conditions at the top 938 IF ( ocean .AND. .NOT. use_top_fluxes ) THEN 939 IF ( myid == 0 ) PRINT*, '+++ check_parameters: use_top_fluxes ',& 940 'must be .TRUE. in ocean version' 941 CALL local_stop 942 ENDIF 825 943 826 944 ! … … 1256 1374 CALL local_stop 1257 1375 ENDIF 1258 IF ( bc_uv_t == 'dirichlet' ) THEN 1259 ibc_uv_t = 0 1260 ELSEIF ( bc_uv_t == 'neumann' ) THEN 1376 IF ( coupling_mode == 'ocean_to_atmosphere' ) THEN 1377 bc_uv_t = 'neumann' 1261 1378 ibc_uv_t = 1 1262 1379 ELSE 1263 IF ( myid == 0 ) THEN 1264 PRINT*, '+++ check_parameters:' 1265 PRINT*, ' unknown boundary condition: bc_uv_t = ', bc_uv_t 1266 ENDIF 1267 CALL local_stop 1380 IF ( bc_uv_t == 'dirichlet' ) THEN 1381 ibc_uv_t = 0 1382 ELSEIF ( bc_uv_t == 'neumann' ) THEN 1383 ibc_uv_t = 1 1384 ELSE 1385 IF ( myid == 0 ) THEN 1386 PRINT*, '+++ check_parameters:' 1387 PRINT*, ' unknown boundary condition: bc_uv_t = ', bc_uv_t 1388 ENDIF 1389 CALL local_stop 1390 ENDIF 1268 1391 ENDIF 1269 1392 … … 1289 1412 1290 1413 IF ( rayleigh_damping_height == -1.0 ) THEN 1291 rayleigh_damping_height = 0.66666666666 * zu(nzt) 1414 IF ( .NOT. ocean ) THEN 1415 rayleigh_damping_height = 0.66666666666 * zu(nzt) 1416 ELSE 1417 rayleigh_damping_height = 0.66666666666 * zu(nzb) 1418 ENDIF 1292 1419 ELSE 1293 IF ( rayleigh_damping_height < 0.0 .OR. & 1294 rayleigh_damping_height > zu(nzt) ) THEN 1295 IF ( myid == 0 ) THEN 1296 PRINT*, '+++ check_parameters:' 1297 PRINT*, ' rayleigh_damping_height = ', rayleigh_damping_height,& 1298 ' out of range [0.0,', zu(nzt), ']' 1299 ENDIF 1300 CALL local_stop 1420 IF ( .NOT. ocean ) THEN 1421 IF ( rayleigh_damping_height < 0.0 .OR. & 1422 rayleigh_damping_height > zu(nzt) ) THEN 1423 IF ( myid == 0 ) THEN 1424 PRINT*, '+++ check_parameters:' 1425 PRINT*, ' rayleigh_damping_height = ', rayleigh_damping_height,& 1426 ' out of range [0.0,', zu(nzt), ']' 1427 ENDIF 1428 CALL local_stop 1429 ENDIF 1430 ELSE 1431 IF ( rayleigh_damping_height > 0.0 .OR. & 1432 rayleigh_damping_height < zu(nzb) ) THEN 1433 IF ( myid == 0 ) THEN 1434 PRINT*, '+++ check_parameters:' 1435 PRINT*, ' rayleigh_damping_height = ', rayleigh_damping_height,& 1436 ' out of range [0.0,', zu(nzb), ']' 1437 ENDIF 1438 CALL local_stop 1439 ENDIF 1301 1440 ENDIF 1302 1441 ENDIF … … 1695 1834 1696 1835 CASE ( 'q', '#q' ) 1697 IF ( .NOT. cloud_physics) THEN1836 IF ( .NOT. humidity ) THEN 1698 1837 IF ( myid == 0 ) THEN 1699 1838 PRINT*, '+++ check_parameters: data_output_pr = ', & 1700 1839 data_output_pr(i), & 1701 ' is not implemented for cloud_physics= FALSE'1840 ' is not implemented for humidity = FALSE' 1702 1841 ENDIF 1703 1842 CALL local_stop … … 1804 1943 1805 1944 CASE ( 'w"q"' ) 1806 IF ( .NOT. cloud_physics )THEN1945 IF ( .NOT. humidity ) THEN 1807 1946 IF ( myid == 0 ) THEN 1808 1947 PRINT*, '+++ check_parameters: data_output_pr = ', & 1809 1948 data_output_pr(i), & 1810 ' is not implemented for cloud_physics= FALSE'1949 ' is not implemented for humidity = FALSE' 1811 1950 ENDIF 1812 1951 CALL local_stop … … 1818 1957 1819 1958 CASE ( 'w*q*' ) 1820 IF ( .NOT. cloud_physics )THEN1959 IF ( .NOT. humidity ) THEN 1821 1960 IF ( myid == 0 ) THEN 1822 1961 PRINT*, '+++ check_parameters: data_output_pr = ', & 1823 1962 data_output_pr(i), & 1824 ' is not implemented for cloud_physics= FALSE'1963 ' is not implemented for humidity = FALSE' 1825 1964 ENDIF 1826 1965 CALL local_stop … … 1832 1971 1833 1972 CASE ( 'wq' ) 1834 IF ( .NOT. cloud_physics )THEN1973 IF ( .NOT. humidity ) THEN 1835 1974 IF ( myid == 0 ) THEN 1836 1975 PRINT*, '+++ check_parameters: data_output_pr = ', & 1837 1976 data_output_pr(i), & 1838 ' is not implemented for cloud_physics= FALSE'1977 ' is not implemented for humidity = FALSE' 1839 1978 ENDIF 1840 1979 CALL local_stop
Note: See TracChangeset
for help on using the changeset viewer.