Ignore:
Timestamp:
Jul 22, 2019 5:00:34 PM (5 years ago)
Author:
suehring
Message:

Control discretization of advection term: separate initialization of WS advection flags for momentum and scalars. In this context, resort the bits and do some minor formatting; Make initialization of scalar-advection flags more flexible, i.e. introduce an arguemnt list to indicate non-cyclic boundaries (required for decycled scalars such as chemical species or aerosols); Introduce extended 'degradation zones', where horizontal advection of passive scalars is discretized by first-order scheme at all grid points that in the vicinity of buildings (<= 3 grid points). Even though no building is within the numerical stencil, first-order scheme is used. At fourth and fifth grid point the order of the horizontal advection scheme is successively upgraded. These extended degradation zones are used to avoid stationary numerical oscillations, which are responsible for high concentration maxima that may appear under shear-free stable conditions. Therefore, an additional 3D interger array used to store control flags is introduced; Change interface for scalar advection routine; Bugfix, avoid uninitialized value sk_num in vector version of WS scalar advection; Chemistry: Decycling boundary conditions are only set at the ghost points not on the prognostic grid points; Land-surface model: Relax checks for non-consistent initialization in case static or dynamic input is provided. For example, soil_temperature or deep_soil_temperature is not mandatory any more if dynamic input is available. Also, improper settings of x_type in namelist are only checked if no static file is available.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/land_surface_model_mod.f90

    r4026 r4109  
    2020! Current revisions:
    2121! -----------------
    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.
    2327!
    2428! Former revisions:
     
    591595
    592596    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,                                             &
    594600                netcdf_data_input_interpolate, netcdf_data_input_init_lsm,     &
    595601                pavement_pars_f, pavement_subsurface_pars_f, pavement_type_f,  &
     
    727733                                   soil_temperature = 9999999.9_wp,  & !< NAMELIST soil temperature (K) +1
    728734                                   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)
    730736                                 
    731737    TYPE(surf_type_lsm), POINTER ::  t_soil_h,    & !< Soil temperature (K), horizontal surface elements
     
    14371443!-- Check if soil types are set within a valid range.
    14381444    IF ( TRIM( surface_type ) == 'vegetation'  .OR.                            &
    1439          TRIM( surface_type ) == 'pavement'    .OR.                            &
    1440          TRIM( surface_type ) == 'netcdf' )  THEN
     1445         TRIM( surface_type ) == 'pavement' )  THEN
    14411446       IF ( soil_type < LBOUND( soil_pars, 2 )  .AND.                          &
    14421447            soil_type > UBOUND( soil_pars, 2 ) )  THEN
     
    14451450          CALL message( 'lsm_check_parameters', 'PA0452', 2, 2, 0, 6, 0 )
    14461451       ENDIF
     1452    ENDIF
     1453    IF ( TRIM( surface_type ) == 'netcdf' )  THEN
    14471454       IF ( soil_type_f%from_file )  THEN
    14481455          DO  i = nxl, nxr
     
    14621469!
    14631470!-- 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
    14661472       IF ( vegetation_type < LBOUND( vegetation_pars, 2 )  .AND.              &
    14671473            vegetation_type > UBOUND( vegetation_pars, 2 ) )  THEN
     
    14701476          CALL message( 'lsm_check_parameters', 'PA0526', 2, 2, 0, 6, 0 )
    14711477       ENDIF
     1478    ENDIF
     1479    IF ( TRIM( surface_type ) == 'netcdf' )  THEN
    14721480       IF ( vegetation_type_f%from_file )  THEN
    14731481          DO  i = nxl, nxr
     
    14881496!
    14891497!-- 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
    14921499       IF ( pavement_type < LBOUND( pavement_pars, 2 )  .AND.                  &
    14931500            pavement_type > UBOUND( pavement_pars, 2 ) )  THEN
     
    14961503          CALL message( 'lsm_check_parameters', 'PA0527', 2, 2, 0, 6, 0 )
    14971504       ENDIF
     1505    ENDIF
     1506    IF ( TRIM( surface_type ) == 'netcdf' )  THEN
    14981507       IF ( pavement_type_f%from_file )  THEN
    14991508          DO  i = nxl, nxr
     
    15131522!
    15141523!-- 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
    15171525       IF ( water_type < LBOUND( water_pars, 2 )  .AND.                        &
    15181526            water_type > UBOUND( water_pars, 2 ) )  THEN
     
    15211529          CALL message( 'lsm_check_parameters', 'PA0528', 2, 2, 0, 6, 0 )
    15221530       ENDIF
     1531    ENDIF
     1532    IF ( TRIM( surface_type ) == 'netcdf' )  THEN
    15231533       IF ( water_type_f%from_file )  THEN
    15241534          DO  i = nxl, nxr
     
    17081718!
    17091719!-- Temporary message as long as NetCDF input is not available
    1710     IF ( TRIM( surface_type ) == 'netcdf'  .AND.  .NOT.  input_pids_static )   &
     1720    IF ( TRIM( surface_type ) == 'netcdf'  .AND.  .NOT. input_pids_static )   &
    17111721    THEN
    17121722       message_string = 'surface_type = netcdf requires static input file.'
     
    17141724    ENDIF
    17151725
    1716     IF ( soil_type == 0 )  THEN
     1726    IF ( soil_type == 0  .AND.  .NOT. input_pids_static )  THEN
    17171727
    17181728       IF ( alpha_vangenuchten == 9999999.9_wp )  THEN
     
    17961806!
    17971807!-- 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',&
    18001812                                  ' match to the number of layers specified',  &
    18011813                                  ' 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
    18101823    ENDIF
    18111824
Note: See TracChangeset for help on using the changeset viewer.