- Timestamp:
- Jul 25, 2018 6:40:29 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/UTIL/nav_mesh/nav_mesh.f90
- Property svn:keywords set to Id
r3159 r3168 24 24 ! Former revisions: 25 25 ! -----------------! 26 ! 26 ! $Id$ 27 ! Updated NetCDF ororgraphy and building input 28 ! 27 29 ! Initial revision 28 !29 30 ! 30 31 ! … … 67 68 CHARACTER(LEN=10) :: char_fill = '_FillValue' !< name of fill value attribute in NetCDF file 68 69 CHARACTER(LEN=128) :: runname !< Run name 69 70 70 71 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 71 73 72 74 INTEGER(iwp) :: i !< Index along x … … 291 293 ! 292 294 !-- Terrain height. First, get variable-related _FillValue attribute 293 IF ( check_existence( var_names, ' orography_2D' ) ) THEN295 IF ( check_existence( var_names, 'zt' ) ) THEN 294 296 terrain_height_f%from_file = .TRUE. 295 297 CALL get_attribute( id_topo, char_fill, & 296 298 terrain_height_f%fill, & 297 .FALSE., ' orography_2D' )299 .FALSE., 'zt' ) 298 300 ! 299 301 !-- PE-wise reading of 2D terrain height. 300 302 ALLOCATE ( terrain_height_f%var(0:ny,0:nx) ) 301 303 DO i = 0, nx 302 CALL get_variable( id_topo, ' orography_2D', &304 CALL get_variable( id_topo, 'zt', & 303 305 i, terrain_height_f%var(:,i) ) 304 306 ENDDO … … 310 312 !-- Read building height. First, read its _FillValue attribute, 311 313 !-- as well as lod attribute 312 buildings_f%from_file = .FALSE. 313 IF ( check_existence( var_names, 'buildings_2 D' ) ) THEN314 buildings_f%from_file = .FALSE. 315 IF ( check_existence( var_names, 'buildings_2d' ) ) THEN 314 316 buildings_f%from_file = .TRUE. 315 317 CALL get_attribute( id_topo, char_lod, buildings_f%lod, & 316 .FALSE., 'buildings_2 D' )318 .FALSE., 'buildings_2d' ) 317 319 318 320 CALL get_attribute( id_topo, char_fill, & 319 321 buildings_f%fill1, & 320 .FALSE., 'buildings_2 D' )322 .FALSE., 'buildings_2d' ) 321 323 322 324 ! … … 325 327 ALLOCATE ( buildings_f%var_2d(0:ny,0:nx) ) 326 328 DO i = 0, nx 327 CALL get_variable( id_topo, 'buildings_2 D', &329 CALL get_variable( id_topo, 'buildings_2d', & 328 330 i, buildings_f%var_2d(:,i) ) 329 331 ENDDO … … 335 337 ! 336 338 !-- 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 339 344 lod_flag = .TRUE. 340 345 buildings_f%from_file = .TRUE. 341 346 CALL get_attribute( id_topo, char_lod, buildings_f%lod, & 342 .FALSE., 'buildings_3 D' )347 .FALSE., 'buildings_3d' ) 343 348 344 349 CALL get_attribute( id_topo, char_fill, & 345 350 buildings_f%fill2, & 346 .FALSE., 'buildings_3 D' )351 .FALSE., 'buildings_3d' ) 347 352 348 353 CALL get_dimension_length( id_topo, buildings_f%nz, 'z' ) … … 359 364 DO i = 0, nx 360 365 DO j = 0, ny 361 CALL get_variable( id_topo, 'buildings_3 D', &366 CALL get_variable( id_topo, 'buildings_3d', & 362 367 i, j, & 363 368 buildings_f%var_3d(:,j,i) ) … … 1240 1245 LOGICAL :: p3d_flag = .FALSE. !< indicates whether p3d file was found 1241 1246 1242 NAMELIST /prepro_par/ tolerance_dp, internal_buildings1247 NAMELIST /prepro_par/ flag_2d, internal_buildings, tolerance_dp 1243 1248 1244 1249 WRITE(*,'(X,A)') &
Note: See TracChangeset
for help on using the changeset viewer.