Changeset 1691 for palm/trunk/SOURCE/check_parameters.f90
- Timestamp:
- Oct 26, 2015 4:17:44 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/check_parameters.f90
r1683 r1691 14 14 ! PALM. If not, see <http://www.gnu.org/licenses/>. 15 15 ! 16 ! Copyright 1997-201 4Leibniz Universitaet Hannover16 ! Copyright 1997-2015 Leibniz Universitaet Hannover 17 17 !--------------------------------------------------------------------------------! 18 18 ! 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! Added output of Obukhov length (ol) and radiative heating rates for RRTMG. 22 ! Added checks for use of radiation / lsm with topography. 22 23 ! 23 24 ! Former revisions: … … 307 308 USE transpose_indices 308 309 310 309 311 IMPLICIT NONE 310 312 … … 650 652 WRITE( action, '(A)' ) 'cloud_droplets = .TRUE.' 651 653 ENDIF 652 IF ( .NOT. prandtl_layer ) THEN653 WRITE( action, '(A)' ) ' prandtl_layer = .FALSE.'654 IF ( .NOT. constant_flux_layer ) THEN 655 WRITE( action, '(A)' ) 'constant_flux_layer = .FALSE.' 654 656 ENDIF 655 657 IF ( action /= ' ' ) THEN … … 1007 1009 ENDIF 1008 1010 1009 IF ( .NOT. prandtl_layer ) THEN1011 IF ( .NOT. constant_flux_layer ) THEN 1010 1012 message_string = 'lsm requires '// & 1011 ' prandtl_layer = .T.'1013 'constant_flux_layer = .T.' 1012 1014 CALL message( 'check_parameters', 'PA0400', 1, 2, 0, 6, 0 ) 1015 ENDIF 1016 1017 IF ( topography /= 'flat' ) THEN 1018 message_string = 'lsm cannot be used ' // & 1019 'in combination with topography /= "flat"' 1020 CALL message( 'check_parameters', 'PA0415', 1, 2, 0, 6, 0 ) 1013 1021 ENDIF 1014 1022 … … 1196 1204 CALL message( 'check_parameters', 'PA0411', 1, 2, 0, 6, 0 ) 1197 1205 ENDIF 1198 1199 ENDIF 1200 1206 IF ( topography /= 'flat' ) THEN 1207 message_string = 'radiation scheme cannot be used ' // & 1208 'in combination with topography /= "flat"' 1209 CALL message( 'check_parameters', 'PA0414', 1, 2, 0, 6, 0 ) 1210 ENDIF 1211 ENDIF 1201 1212 1202 1213 IF ( .NOT. ( loop_optimization == 'cache' .OR. & … … 1729 1740 !-- In case of using a prandtl-layer, calculated (or prescribed) surface 1730 1741 !-- fluxes have to be used in the diffusion-terms 1731 IF ( prandtl_layer ) use_surface_fluxes = .TRUE.1742 IF ( constant_flux_layer ) use_surface_fluxes = .TRUE. 1732 1743 1733 1744 ! … … 1796 1807 ELSEIF ( bc_e_b == '(u*)**2+neumann' ) THEN 1797 1808 ibc_e_b = 2 1798 IF ( .NOT. prandtl_layer ) THEN1809 IF ( .NOT. constant_flux_layer ) THEN 1799 1810 bc_e_b = 'neumann' 1800 1811 ibc_e_b = 1 … … 2003 2014 IF ( surface_waterflux == 9999999.9_wp ) THEN 2004 2015 constant_waterflux = .FALSE. 2005 IF ( large_scale_forcing ) THEN2016 IF ( large_scale_forcing .OR. land_surface ) THEN 2006 2017 IF ( ibc_q_b == 0 ) THEN 2007 2018 constant_waterflux = .FALSE. … … 2045 2056 ELSEIF ( bc_uv_b == 'neumann' ) THEN 2046 2057 ibc_uv_b = 1 2047 IF ( prandtl_layer ) THEN2058 IF ( constant_flux_layer ) THEN 2048 2059 message_string = 'boundary condition: bc_uv_b = "' // & 2049 TRIM( bc_uv_b ) // '" is not allowed with prandtl_layer = .TRUE.' 2060 TRIM( bc_uv_b ) // '" is not allowed with constant_flux_layer' & 2061 // ' = .TRUE.' 2050 2062 CALL message( 'check_parameters', 'PA0075', 1, 2, 0, 6, 0 ) 2051 2063 ENDIF … … 2356 2368 dopr_unit(i) = 'm2/s2' 2357 2369 hom(:,2,12,:) = SPREAD( zw, 2, statistic_regions+1 ) 2358 IF ( prandtl_layer ) hom(nzb,2,12,:) = zu(1)2370 IF ( constant_flux_layer ) hom(nzb,2,12,:) = zu(1) 2359 2371 2360 2372 CASE ( 'w*u*' ) … … 2367 2379 dopr_unit(i) = 'm2/s2' 2368 2380 hom(:,2,14,:) = SPREAD( zw, 2, statistic_regions+1 ) 2369 IF ( prandtl_layer ) hom(nzb,2,14,:) = zu(1)2381 IF ( constant_flux_layer ) hom(nzb,2,14,:) = zu(1) 2370 2382 2371 2383 CASE ( 'w*v*' ) … … 2393 2405 dopr_unit(i) = 'm2/s2' 2394 2406 hom(:,2,19,:) = SPREAD( zw, 2, statistic_regions+1 ) 2395 IF ( prandtl_layer ) hom(nzb,2,19,:) = zu(1)2407 IF ( constant_flux_layer ) hom(nzb,2,19,:) = zu(1) 2396 2408 2397 2409 CASE ( 'wv' ) … … 2399 2411 dopr_unit(i) = 'm2/s2' 2400 2412 hom(:,2,20,:) = SPREAD( zw, 2, statistic_regions+1 ) 2401 IF ( prandtl_layer ) hom(nzb,2,20,:) = zu(1)2413 IF ( constant_flux_layer ) hom(nzb,2,20,:) = zu(1) 2402 2414 2403 2415 CASE ( 'w*pt*BC' ) … … 3153 3165 ENDIF 3154 3166 3167 CASE ( 'rad_lw_cs_hr' ) 3168 IF ( (.NOT. radiation) .OR. radiation_scheme /= 'rrtmg' ) THEN 3169 message_string = 'data_output_pr = ' // & 3170 TRIM( data_output_pr(i) ) // ' is not ava' // & 3171 'lable for radiation = .FALSE. or ' // & 3172 'radiation_scheme /= "rrtmg"' 3173 CALL message( 'check_parameters', 'PA0413', 1, 2, 0, 6, 0 ) 3174 ELSE 3175 dopr_index(i) = 106 3176 dopr_unit(i) = 'K/h' 3177 hom(:,2,106,:) = SPREAD( zu, 2, statistic_regions+1 ) 3178 ENDIF 3179 3180 CASE ( 'rad_lw_hr' ) 3181 IF ( (.NOT. radiation) .OR. radiation_scheme /= 'rrtmg' ) THEN 3182 message_string = 'data_output_pr = ' // & 3183 TRIM( data_output_pr(i) ) // ' is not ava' // & 3184 'lable for radiation = .FALSE. or ' // & 3185 'radiation_scheme /= "rrtmg"' 3186 CALL message( 'check_parameters', 'PA0413', 1, 2, 0, 6, 0 ) 3187 ELSE 3188 dopr_index(i) = 107 3189 dopr_unit(i) = 'K/h' 3190 hom(:,2,107,:) = SPREAD( zu, 2, statistic_regions+1 ) 3191 ENDIF 3192 3193 CASE ( 'rad_sw_cs_hr' ) 3194 IF ( (.NOT. radiation) .OR. radiation_scheme /= 'rrtmg' ) THEN 3195 message_string = 'data_output_pr = ' // & 3196 TRIM( data_output_pr(i) ) // ' is not ava' // & 3197 'lable for radiation = .FALSE. or ' // & 3198 'radiation_scheme /= "rrtmg"' 3199 CALL message( 'check_parameters', 'PA0413', 1, 2, 0, 6, 0 ) 3200 ELSE 3201 dopr_index(i) = 108 3202 dopr_unit(i) = 'K/h' 3203 hom(:,2,108,:) = SPREAD( zu, 2, statistic_regions+1 ) 3204 ENDIF 3205 3206 CASE ( 'rad_sw_hr' ) 3207 IF ( (.NOT. radiation) .OR. radiation_scheme /= 'rrtmg' ) THEN 3208 message_string = 'data_output_pr = ' // & 3209 TRIM( data_output_pr(i) ) // ' is not ava' // & 3210 'lable for radiation = .FALSE. or ' // & 3211 'radiation_scheme /= "rrtmg"' 3212 CALL message( 'check_parameters', 'PA0413', 1, 2, 0, 6, 0 ) 3213 ELSE 3214 dopr_index(i) = 109 3215 dopr_unit(i) = 'K/h' 3216 hom(:,2,109,:) = SPREAD( zu, 2, statistic_regions+1 ) 3217 ENDIF 3218 3155 3219 CASE DEFAULT 3156 3220 … … 3351 3415 unit = 'kg/kg' 3352 3416 3353 3354 CASE ( 'rad_lw_in', 'rad_lw_out', 'rad_sw_in', 'rad_sw_out' )3417 CASE ( 'rad_lw_in', 'rad_lw_out', 'rad_lw_cs_hr', 'rad_lw_hr', & 3418 'rad_sw_in', 'rad_sw_out', 'rad_sw_cs_hr', 'rad_sw_hr' ) 3355 3419 IF ( .NOT. radiation .OR. radiation_scheme /= 'rrtmg' ) THEN 3356 message_string = '"output of "' // TRIM( var ) // '" requi' // 3420 message_string = '"output of "' // TRIM( var ) // '" requi' // & 3357 3421 'res radiation = .TRUE. and ' // & 3358 3422 'radiation_scheme = "rrtmg"' … … 3395 3459 3396 3460 CASE ( 'c_liq*', 'c_soil*', 'c_veg*', 'ghf_eb*', 'lai*', 'lwp*', & 3397 'm_liq_eb*', ' pra*', 'prr*', 'qsws*', 'qsws_eb*',&3461 'm_liq_eb*', 'ol*', 'pra*', 'prr*', 'qsws*', 'qsws_eb*', & 3398 3462 'qsws_liq_eb*', 'qsws_soil_eb*', 'qsws_veg_eb*', 'rad_net*', & 3399 3463 'rrtm_aldif*', 'rrtm_aldir*', 'rrtm_asdif*', 'rrtm_asdir*', & … … 3514 3578 IF ( TRIM( var ) == 'ghf_eb*') unit = 'W/m2' 3515 3579 IF ( TRIM( var ) == 'lai*' ) unit = 'none' 3516 IF ( TRIM( var ) == 'lwp*' ) unit = 'kg/kg*m' 3580 IF ( TRIM( var ) == 'lwp*' ) unit = 'kg/m2' 3581 IF ( TRIM( var ) == 'm_liq_eb*' ) unit = 'm' 3582 IF ( TRIM( var ) == 'ol*' ) unit = 'm' 3517 3583 IF ( TRIM( var ) == 'pra*' ) unit = 'mm' 3518 3584 IF ( TRIM( var ) == 'prr*' ) unit = 'mm/s' … … 3788 3854 constant_diffusion = .TRUE. 3789 3855 3790 IF ( prandtl_layer ) THEN3791 message_string = ' prandtl_layer is not allowed with fixed ' //&3792 'value of km'3856 IF ( constant_flux_layer ) THEN 3857 message_string = 'constant_flux_layer is not allowed with fixed ' & 3858 // 'value of km' 3793 3859 CALL message( 'check_parameters', 'PA0123', 1, 2, 0, 6, 0 ) 3794 3860 ENDIF … … 3816 3882 3817 3883 ! 3818 !-- Check value range for rif3819 IF ( rif_min >= rif_max ) THEN3820 WRITE( message_string, * ) ' rif_min = ', rif_min, ' must be less ',&3821 'than rif_max = ', rif_max3884 !-- Check value range for zeta = z/L 3885 IF ( zeta_min >= zeta_max ) THEN 3886 WRITE( message_string, * ) 'zeta_min = ', zeta_min, ' must be less ', & 3887 'than zeta_max = ', zeta_max 3822 3888 CALL message( 'check_parameters', 'PA0125', 1, 2, 0, 6, 0 ) 3823 3889 ENDIF … … 4235 4301 4236 4302 ! 4303 !-- Check for valid setting of most_method 4304 IF ( TRIM( most_method ) /= 'circular' .AND. & 4305 TRIM( most_method ) /= 'newton' .AND. & 4306 TRIM( most_method ) /= 'lookup' ) THEN 4307 message_string = 'most_method = "' // TRIM( most_method ) // & 4308 '" is unknown' 4309 CALL message( 'check_parameters', 'PA0416', 1, 2, 0, 6, 0 ) 4310 ENDIF 4311 4312 ! 4237 4313 !-- Check &userpar parameters 4238 4314 CALL user_check_parameters
Note: See TracChangeset
for help on using the changeset viewer.