Changeset 3168


Ignore:
Timestamp:
Jul 25, 2018 6:40:29 AM (6 years ago)
Author:
sward
Message:

Updated NetCDF variable names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/UTIL/nav_mesh/nav_mesh.f90

    • Property svn:keywords set to Id
    r3159 r3168  
    2424! Former revisions:
    2525! -----------------!
    26 !
     26! $Id$
     27! Updated NetCDF ororgraphy and building input
     28!
    2729! Initial revision
    28 !
    2930!
    3031!
     
    6768    CHARACTER(LEN=10) ::  char_fill = '_FillValue'  !< name of fill value attribute in NetCDF file
    6869    CHARACTER(LEN=128) ::  runname                  !< Run name
    69    
     70
    7071    LOGICAL ::  internal_buildings = .FALSE.  !< Flag that indicates whether buildings within closed courtyards should be deleted
     72    LOGICAL ::  flag_2d            = .FALSE.  !< Flag that indicates that 2d buildings will be used in all cases
    7173
    7274    INTEGER(iwp) ::  i                          !< Index along x
     
    291293!
    292294!--       Terrain height. First, get variable-related _FillValue attribute
    293           IF ( check_existence( var_names, 'orography_2D' ) )  THEN
     295          IF ( check_existence( var_names, 'zt' ) )  THEN
    294296             terrain_height_f%from_file = .TRUE.
    295297             CALL get_attribute( id_topo, char_fill,                           &
    296298                                 terrain_height_f%fill,                        &
    297                                  .FALSE., 'orography_2D' )
     299                                 .FALSE., 'zt' )
    298300!
    299301!--          PE-wise reading of 2D terrain height.
    300302             ALLOCATE ( terrain_height_f%var(0:ny,0:nx)  )
    301303             DO  i = 0, nx
    302                 CALL get_variable( id_topo, 'orography_2D',                    &
     304                CALL get_variable( id_topo, 'zt',                    &
    303305                                   i, terrain_height_f%var(:,i) ) 
    304306             ENDDO
     
    310312!--       Read building height. First, read its _FillValue attribute,
    311313!--       as well as lod attribute
    312           buildings_f%from_file = .FALSE. 
    313           IF ( check_existence( var_names, 'buildings_2D' ) )  THEN
     314          buildings_f%from_file = .FALSE.
     315          IF ( check_existence( var_names, 'buildings_2d' ) )  THEN
    314316             buildings_f%from_file = .TRUE.
    315317             CALL get_attribute( id_topo, char_lod, buildings_f%lod,           &
    316                                  .FALSE., 'buildings_2D' )
     318                                 .FALSE., 'buildings_2d' )
    317319
    318320             CALL get_attribute( id_topo, char_fill,                           &
    319321                                 buildings_f%fill1,                            &
    320                                  .FALSE., 'buildings_2D' )
     322                                 .FALSE., 'buildings_2d' )
    321323
    322324!
     
    325327                ALLOCATE ( buildings_f%var_2d(0:ny,0:nx) )
    326328                DO  i = 0, nx
    327                    CALL get_variable( id_topo, 'buildings_2D',                 &
     329                   CALL get_variable( id_topo, 'buildings_2d',                 &
    328330                                      i, buildings_f%var_2d(:,i) )
    329331                ENDDO
     
    335337!
    336338!--       If available, also read 3D building information. If both are
    337 !--       available, use 3D information.
    338           IF ( check_existence( var_names, 'buildings_3D' ) )  THEN
     339!--       available, use 3D information. Do this only if the flag that indicates
     340!--       that 2d buildings shall be used no matter what is false.
     341          IF ( check_existence( var_names, 'buildings_3d' )                    &
     342               .AND. .NOT. flag_2d )                                           &
     343          THEN
    339344             lod_flag = .TRUE.
    340345             buildings_f%from_file = .TRUE.
    341346             CALL get_attribute( id_topo, char_lod, buildings_f%lod,           &
    342                                  .FALSE., 'buildings_3D' )     
     347                                 .FALSE., 'buildings_3d' )     
    343348
    344349             CALL get_attribute( id_topo, char_fill,                           &
    345350                                 buildings_f%fill2,                            &
    346                                  .FALSE., 'buildings_3D' )
     351                                 .FALSE., 'buildings_3d' )
    347352
    348353             CALL get_dimension_length( id_topo, buildings_f%nz, 'z' )
     
    359364                DO  i = 0, nx
    360365                   DO  j = 0, ny
    361                       CALL get_variable( id_topo, 'buildings_3D',              &
     366                      CALL get_variable( id_topo, 'buildings_3d',              &
    362367                                         i, j,                                 &
    363368                                         buildings_f%var_3d(:,j,i) )
     
    12401245       LOGICAL ::  p3d_flag = .FALSE.  !< indicates whether p3d file was found
    12411246
    1242        NAMELIST /prepro_par/  tolerance_dp, internal_buildings
     1247       NAMELIST /prepro_par/  flag_2d, internal_buildings, tolerance_dp
    12431248
    12441249       WRITE(*,'(X,A)')                                                        &
Note: See TracChangeset for help on using the changeset viewer.