Changeset 4109 for palm/trunk/SOURCE/land_surface_model_mod.f90
- Timestamp:
- Jul 22, 2019 5:00:34 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/land_surface_model_mod.f90
r4026 r4109 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Relax checks for non-consistent initialization in case static or dynamic 23 ! input is provided. For example, soil_temperature or deep_soil_temperature 24 ! is not mandatory any more if dynamic input is available. Also, improper 25 ! settings of x_type in namelist are only checked if no static file is 26 ! available. 23 27 ! 24 28 ! Former revisions: … … 591 595 592 596 USE netcdf_data_input_mod, & 593 ONLY : building_type_f, init_3d, input_pids_static, & 597 ONLY : building_type_f, init_3d, & 598 input_pids_dynamic, & 599 input_pids_static, & 594 600 netcdf_data_input_interpolate, netcdf_data_input_init_lsm, & 595 601 pavement_pars_f, pavement_subsurface_pars_f, pavement_type_f, & … … 727 733 soil_temperature = 9999999.9_wp, & !< NAMELIST soil temperature (K) +1 728 734 dz_soil = 9999999.9_wp, & !< (NAMELIST) soil layer depths (spacing) 729 zs_layer = 9999999.9_wp !< soil layer depths (edge)735 zs_layer = 9999999.9_wp !< soil layer depths (edge) 730 736 731 737 TYPE(surf_type_lsm), POINTER :: t_soil_h, & !< Soil temperature (K), horizontal surface elements … … 1437 1443 !-- Check if soil types are set within a valid range. 1438 1444 IF ( TRIM( surface_type ) == 'vegetation' .OR. & 1439 TRIM( surface_type ) == 'pavement' .OR. & 1440 TRIM( surface_type ) == 'netcdf' ) THEN 1445 TRIM( surface_type ) == 'pavement' ) THEN 1441 1446 IF ( soil_type < LBOUND( soil_pars, 2 ) .AND. & 1442 1447 soil_type > UBOUND( soil_pars, 2 ) ) THEN … … 1445 1450 CALL message( 'lsm_check_parameters', 'PA0452', 2, 2, 0, 6, 0 ) 1446 1451 ENDIF 1452 ENDIF 1453 IF ( TRIM( surface_type ) == 'netcdf' ) THEN 1447 1454 IF ( soil_type_f%from_file ) THEN 1448 1455 DO i = nxl, nxr … … 1462 1469 ! 1463 1470 !-- Check if vegetation types are set within a valid range. 1464 IF ( TRIM( surface_type ) == 'vegetation' .OR. & 1465 TRIM( surface_type ) == 'netcdf' ) THEN 1471 IF ( TRIM( surface_type ) == 'vegetation' ) THEN 1466 1472 IF ( vegetation_type < LBOUND( vegetation_pars, 2 ) .AND. & 1467 1473 vegetation_type > UBOUND( vegetation_pars, 2 ) ) THEN … … 1470 1476 CALL message( 'lsm_check_parameters', 'PA0526', 2, 2, 0, 6, 0 ) 1471 1477 ENDIF 1478 ENDIF 1479 IF ( TRIM( surface_type ) == 'netcdf' ) THEN 1472 1480 IF ( vegetation_type_f%from_file ) THEN 1473 1481 DO i = nxl, nxr … … 1488 1496 ! 1489 1497 !-- Check if pavement types are set within a valid range. 1490 IF ( TRIM( surface_type ) == 'pavement' .OR. & 1491 TRIM( surface_type ) == 'netcdf' ) THEN 1498 IF ( TRIM( surface_type ) == 'pavement' ) THEN 1492 1499 IF ( pavement_type < LBOUND( pavement_pars, 2 ) .AND. & 1493 1500 pavement_type > UBOUND( pavement_pars, 2 ) ) THEN … … 1496 1503 CALL message( 'lsm_check_parameters', 'PA0527', 2, 2, 0, 6, 0 ) 1497 1504 ENDIF 1505 ENDIF 1506 IF ( TRIM( surface_type ) == 'netcdf' ) THEN 1498 1507 IF ( pavement_type_f%from_file ) THEN 1499 1508 DO i = nxl, nxr … … 1513 1522 ! 1514 1523 !-- Check if water types are set within a valid range. 1515 IF ( TRIM( surface_type ) == 'water' .OR. & 1516 TRIM( surface_type ) == 'netcdf' ) THEN 1524 IF ( TRIM( surface_type ) == 'water' ) THEN 1517 1525 IF ( water_type < LBOUND( water_pars, 2 ) .AND. & 1518 1526 water_type > UBOUND( water_pars, 2 ) ) THEN … … 1521 1529 CALL message( 'lsm_check_parameters', 'PA0528', 2, 2, 0, 6, 0 ) 1522 1530 ENDIF 1531 ENDIF 1532 IF ( TRIM( surface_type ) == 'netcdf' ) THEN 1523 1533 IF ( water_type_f%from_file ) THEN 1524 1534 DO i = nxl, nxr … … 1708 1718 ! 1709 1719 !-- Temporary message as long as NetCDF input is not available 1710 IF ( TRIM( surface_type ) == 'netcdf' .AND. .NOT. 1720 IF ( TRIM( surface_type ) == 'netcdf' .AND. .NOT. input_pids_static ) & 1711 1721 THEN 1712 1722 message_string = 'surface_type = netcdf requires static input file.' … … 1714 1724 ENDIF 1715 1725 1716 IF ( soil_type == 0 ) THEN1726 IF ( soil_type == 0 .AND. .NOT. input_pids_static ) THEN 1717 1727 1718 1728 IF ( alpha_vangenuchten == 9999999.9_wp ) THEN … … 1796 1806 ! 1797 1807 !-- Check whether valid soil temperatures are prescribed 1798 IF ( COUNT( soil_temperature /= 9999999.9_wp ) /= nzs ) THEN 1799 WRITE( message_string, * ) 'number of soil layers (', nzs, ') does not',& 1808 IF ( .NOT. input_pids_dynamic ) THEN 1809 IF ( COUNT( soil_temperature /= 9999999.9_wp ) /= nzs ) THEN 1810 WRITE( message_string, * ) & 1811 'number of soil layers (', nzs, ') does not',& 1800 1812 ' match to the number of layers specified', & 1801 1813 ' in soil_temperature (', COUNT( & 1802 soil_temperature /= 9999999.9_wp ), ')' 1803 CALL message( 'lsm_check_parameters', 'PA0471', 1, 2, 0, 6, 0 ) 1804 ENDIF 1805 1806 IF ( deep_soil_temperature == 9999999.9_wp ) THEN 1807 message_string = 'deep_soil_temperature is not set but must be'// & 1808 '/= 9999999.9' 1809 CALL message( 'lsm_check_parameters', 'PA0472', 1, 2, 0, 6, 0 ) 1814 soil_temperature /= 9999999.9_wp ), ')' 1815 CALL message( 'lsm_check_parameters', 'PA0471', 1, 2, 0, 6, 0 ) 1816 ENDIF 1817 1818 IF ( deep_soil_temperature == 9999999.9_wp ) THEN 1819 message_string = 'deep_soil_temperature is not set but must be'// & 1820 '/= 9999999.9' 1821 CALL message( 'lsm_check_parameters', 'PA0472', 1, 2, 0, 6, 0 ) 1822 ENDIF 1810 1823 ENDIF 1811 1824
Note: See TracChangeset
for help on using the changeset viewer.