Changeset 3103


Ignore:
Timestamp:
Jul 4, 2018 5:30:52 PM (6 years ago)
Author:
suehring
Message:

Reference lowest terrain height to zero level; new check for negative terrain heights in static input file

Location:
palm/trunk/SOURCE
Files:
2 edited

Legend:

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

    r3068 r3103  
    2525! -----------------
    2626! $Id$
     27! Reference lowest terrain height to zero level
     28!
     29! 3068 2018-06-12 14:49:41Z Giersch
    2730! New warning message concerning grid stretching has been introduced
    2831!
     
    12761279
    12771280    USE control_parameters,                                                    &
    1278         ONLY:  bc_lr_cyc, bc_ns_cyc, land_surface, ocean, urban_surface
     1281        ONLY:  bc_lr_cyc, bc_ns_cyc, land_surface, message_string, ocean,      &
     1282               urban_surface
    12791283
    12801284    USE indices,                                                               &
     
    13131317
    13141318    REAL(wp)                            ::  ocean_offset        !< offset to consider inverse vertical coordinate at topography definition
     1319    REAL(wp)                            ::  oro_min = 0.0_wp    !< minimum terrain height in entire model domain, used to reference terrain to zero
    13151320    REAL(wp), DIMENSION(:), ALLOCATABLE ::  oro_max             !< maximum terrain height occupied by an building with certain id
    13161321    REAL(wp), DIMENSION(:), ALLOCATABLE ::  oro_max_l           !< maximum terrain height occupied by an building with certain id, on local subdomain
    13171322
     1323
     1324!
     1325!-- Reference lowest terrain height to zero. In case the minimum terrain height
     1326!-- is non-zero, all grid points of the lower vertical grid levels might be
     1327!-- entirely below the surface, meaning a waste of computational resources.
     1328!-- In order to avoid this, remove the lowest terrain height. Please note,
     1329!-- in case of a nested run, the global minimum from all parent and childs
     1330!-- need to be remove to avoid steep edges at the child-domain boundaries.
     1331    IF ( input_pids_static )  THEN
     1332
     1333       CALL MPI_ALLREDUCE( MINVAL( terrain_height_f%var ), oro_min, 1,         &
     1334                           MPI_REAL, MPI_MIN, MPI_COMM_WORLD, ierr )
     1335                           
     1336       terrain_height_f%var = terrain_height_f%var - oro_min
     1337!                           
     1338!--    Give an informative message that terrain height is referenced to zero   
     1339       IF ( oro_min > 0.0_wp )  THEN
     1340          WRITE( message_string, * ) 'Terrain height was internally shifted '//&
     1341                          'downwards by ', oro_min, 'meter(s) to save ' //     &
     1342                          'computational resources.'
     1343          CALL message( 'init_grid', 'PA0505', 0, 0, 0, 6, 0 )
     1344       ENDIF
     1345    ENDIF   
     1346   
    13181347!
    13191348!-- In the following, buildings and orography are further preprocessed
  • palm/trunk/SOURCE/netcdf_data_input_mod.f90

    r3089 r3103  
    2525! -----------------
    2626! $Id$
     27! New check for negative terrain heights
     28!
     29! 3089 2018-06-27 13:20:38Z suehring
    2730! Revise call for message routine in case of local data inconsistencies.
    2831!
     
    28832886          message_string = 'NetCDF variable zt is not ' //                     &
    28842887                           'allowed to have missing data'
     2888          CALL message( 'netcdf_data_input_mod', 'NDI013', 2, 2, myid, 6, 0 )
     2889       ENDIF
     2890!
     2891!--    Check for negative terrain heights
     2892       IF ( ANY( terrain_height_f%var < 0.0_wp ) )  THEN
     2893          message_string = 'NetCDF variable zt is not ' //                     &
     2894                           'allowed to have negative values'
    28852895          CALL message( 'netcdf_data_input_mod', 'NDI013', 2, 2, myid, 6, 0 )
    28862896       ENDIF
Note: See TracChangeset for help on using the changeset viewer.