Changeset 4201 for palm/trunk/SOURCE/land_surface_model_mod.f90
- Timestamp:
- Aug 29, 2019 3:47:27 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/land_surface_model_mod.f90
r4194 r4201 25 25 ! ----------------- 26 26 ! $Id$ 27 ! - Limit soil moisture to its saturation moisture and give a respective 28 ! warning rather than an error. 29 ! - Perform checks for soil temperature only when there is no dynamic input 30 ! file for the parent or possible child domains. 31 ! 32 ! 4194 2019-08-28 08:09:44Z suehring 27 33 ! Apply more strict limitation of z0 over water surfaces in case it exceeds the 28 34 ! surface-layer height, in order to avoid instabilities. … … 182 188 183 189 USE netcdf_data_input_mod, & 184 ONLY : building_type_f, init_3d, & 190 ONLY : building_type_f, & 191 init_3d, & 192 input_file_dynamic, & 185 193 input_pids_dynamic, & 186 194 input_pids_static, & 187 netcdf_data_input_interpolate, netcdf_data_input_init_lsm, & 188 pavement_pars_f, pavement_subsurface_pars_f, pavement_type_f, & 189 root_area_density_lsm_f, soil_pars_f, soil_type_f, & 190 surface_fraction_f, vegetation_pars_f, vegetation_type_f, & 191 water_pars_f, water_type_f 195 netcdf_data_input_interpolate, & 196 netcdf_data_input_init_lsm, & 197 pavement_pars_f, & 198 pavement_subsurface_pars_f, & 199 pavement_type_f, & 200 root_area_density_lsm_f, & 201 soil_pars_f, & 202 soil_type_f, & 203 surface_fraction_f, & 204 vegetation_pars_f, & 205 vegetation_type_f, & 206 water_pars_f, & 207 water_type_f 192 208 193 209 USE kinds … … 992 1008 INTEGER(iwp) :: j !< running index, y-dimension 993 1009 INTEGER(iwp) :: k !< running index, z-dimension 1010 1011 LOGICAL :: dynamic_soil_input_parent !< flag indicating the presence of a dynamic input file for the parent 994 1012 995 1013 ! … … 1392 1410 1393 1411 ! 1394 !-- Check whether valid soil temperatures are prescribed 1395 IF ( .NOT. input_pids_dynamic ) THEN 1412 !-- Check whether valid soil temperatures are prescribed. Only check this if 1413 !-- no dynamic soil is not initialized with dynamic input. 1414 !-- In a nested case, check whether there is a dynamic input file for the 1415 !-- child (input_pids_dynamic = .T.) or one for the parent (inquire without 1416 !-- coupling_char. 1417 INQUIRE( FILE = TRIM( input_file_dynamic ), & 1418 EXIST = dynamic_soil_input_parent ) 1419 1420 IF ( .NOT. input_pids_dynamic .AND. .NOT. dynamic_soil_input_parent ) THEN 1396 1421 IF ( COUNT( soil_temperature /= 9999999.9_wp ) /= nzs ) THEN 1397 1422 WRITE( message_string, * ) & … … 1412 1437 ! 1413 1438 !-- Check whether the sum of all root fractions equals one 1414 IF ( vegetation_type == 0 ) THEN 1415 IF ( SUM( root_fraction(nzb_soil:nzt_soil) ) /= 1.0_wp ) THEN 1416 message_string = 'vegetation_type = 0 (user_defined)'// & 1417 'requires setting of root_fraction'// & 1418 '/= 9999999.9 and SUM(root_fraction) = 1' 1419 CALL message( 'lsm_check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 1439 IF ( .NOT. vegetation_type_f%from_file ) THEN 1440 IF ( vegetation_type == 0 ) THEN 1441 IF ( SUM( root_fraction(nzb_soil:nzt_soil) ) /= 1.0_wp ) THEN 1442 message_string = 'vegetation_type = 0 (user_defined)'// & 1443 'requires setting of root_fraction'// & 1444 '/= 9999999.9 and SUM(root_fraction) = 1' 1445 CALL message( 'lsm_check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 1446 ENDIF 1420 1447 ENDIF 1421 ENDIF 1448 ENDIF 1422 1449 ! 1423 1450 !-- Calculate grid spacings. Temperature and moisture are defined at … … 4303 4330 ! 4304 4331 !-- After soil moisture and temperature are finally initialized, check 4305 !-- if soil moisture is higher than its saturation value. Else, this 4306 !-- will produce floating point errors in the soil model parametrization. 4332 !-- if soil moisture is higher than its saturation value. If this would 4333 !-- be the case, the soil model parametrization will produce floating 4334 !-- point errors. Hence, limit the soil moisture to its saturation value 4335 !-- and give a warning. 4307 4336 DO m = 1, surf_lsm_h%ns 4308 4337 IF ( surf_lsm_h%vegetation_surface(m) .OR. & … … 4310 4339 DO k = nzb_soil, nzt_soil 4311 4340 IF ( m_soil_h%var_2d(k,m) > surf_lsm_h%m_sat(k,m) ) THEN 4341 m_soil_h%var_2d(k,m) = surf_lsm_h%m_sat(k,m) 4312 4342 WRITE( message_string, * ) 'soil moisture is higher '// & 4313 4343 'than its saturation value at (k,j,i) ', k, & 4314 surf_lsm_h%i(m), surf_lsm_h%j(m) 4315 CALL message( 'lsm_init', 'PA0458', 2, 2, myid, 6, 0 ) 4344 surf_lsm_h%i(m), surf_lsm_h%j(m), ' and is ' // & 4345 'thus limited to this value to maintain stability.' 4346 CALL message( 'lsm_init', 'PA0458', 0, 1, myid, 6, 0 ) 4316 4347 ENDIF 4317 4348 ENDDO … … 4325 4356 IF ( m_soil_v(l)%var_2d(k,m) > surf_lsm_v(l)%m_sat(k,m) )& 4326 4357 THEN 4358 m_soil_v(l)%var_2d(k,m) = surf_lsm_v(l)%m_sat(k,m) 4327 4359 WRITE( message_string, * ) & 4328 'soil moisture is higher than ' // & 4329 'its saturation value at (k,j,i) ', k, & 4330 surf_lsm_v(l)%i(m), surf_lsm_v(l)%j(m) 4331 CALL message( 'lsm_init', 'PA0458', 2, 2, myid, 6, 0 ) 4360 'soil moisture is higher '// & 4361 'than its saturation value at (k,j,i) ', k, & 4362 surf_lsm_v(l)%i(m), surf_lsm_v(l)%j(m), & 4363 ' and is ' // & 4364 'thus limited to this value to maintain stability.' 4365 CALL message( 'lsm_init', 'PA0458', 0, 1, myid, 6, 0 ) 4332 4366 ENDIF 4333 4367 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.