Changeset 4189 for palm/trunk
- Timestamp:
- Aug 26, 2019 4:19:38 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/init_grid.f90
r4182 r4189 25 25 ! ----------------- 26 26 ! $Id$ 27 ! - Add check for proper setting of namelist parameter topography 28 ! - Set flag to indicate land surfaces in case no topography is provided 29 ! 30 ! 4182 2019-08-22 15:20:23Z scharf 27 31 ! Corrected "Former revisions" section 28 32 ! … … 1333 1337 !-- Hence, in this case, also a building flag. 1334 1338 IF ( zu(k) - ocean_offset <= terrain_height_f%var(j,i) ) THEN 1335 1336 1337 1339 topo_3d(k,j,i) = IBCLR( topo_3d(k,j,i), 0 ) 1340 topo_3d(k,j,i) = IBSET( topo_3d(k,j,i), 1 ) 1341 topo_top_index = k ! topo_top_index + 1 1338 1342 ENDIF 1339 1343 ! … … 1456 1460 !-- Note, each topography is flagged as building. 1457 1461 IF ( zu(k) - ocean_offset <= buildings_f%var_2d(j,i) ) THEN 1458 1459 1462 topo_3d(k,j,i) = IBCLR( topo_3d(k,j,i), 0 ) 1463 topo_3d(k,j,i) = IBSET( topo_3d(k,j,i), 2 ) !indicates building 1460 1464 ENDIF 1461 1465 ENDDO … … 1712 1716 1713 1717 USE kinds 1718 1719 USE netcdf_data_input_mod, & 1720 ONLY: buildings_f, terrain_height_f 1714 1721 1715 1722 USE pegrid … … 1749 1756 INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE :: nzb_local !< index for topography top at cell-center 1750 1757 INTEGER(iwp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: topo !< input array for 3D topography and dummy array for setting "outer"-flags 1751 1752 1758 ! 1759 !-- Check for correct setting of the namelist parameter topography. If 1760 !-- topography information is read from file but topography = 'flat', 1761 !-- initialization does not properly. 1762 IF ( ( buildings_f%from_file .OR. terrain_height_f%from_file ) .AND. & 1763 TRIM( topography ) /= 'read_from_file' ) THEN 1764 message_string = 'If topography information is provided (via ' // & 1765 'Netcdf or ASCII input) topography = ' // & 1766 '"read_from_file" is required.' 1767 CALL message( 'init_grid', 'PA0437', 1, 2, 0, 6, 0 ) 1768 ENDIF 1753 1769 ! 1754 1770 !-- Set outer and inner index arrays for non-flat topography. … … 2263 2279 USE control_parameters, & 2264 2280 ONLY: bc_lr_cyc, bc_ns_cyc, constant_flux_layer, land_surface, & 2265 scalar_advec, use_surface_fluxes, use_top_fluxes, urban_surface 2281 scalar_advec, topography, use_surface_fluxes, use_top_fluxes, & 2282 urban_surface 2266 2283 2267 2284 USE indices, & … … 2526 2543 ! 2527 2544 !-- Finally, set identification flags indicating natural terrain or buildings. 2528 !-- Natural terrain grid points. 2545 !-- Natural terrain grid points. Information on the type of the surface is 2546 !-- stored in bit 1 of 3D Integer array topo. However, this bit is only set 2547 !-- when topography is read from file. In order to run the land-surface model 2548 !-- also without topography information, set bit 1 explicitely in this case. 2529 2549 IF ( land_surface ) THEN 2530 DO i = nxl, nxr 2531 DO j = nys, nyn 2532 DO k = nzb, nzt+1 2533 ! 2534 !-- Natural terrain grid point 2535 IF ( BTEST( topo(k,j,i), 1 ) ) & 2536 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 5 ) 2550 ! 2551 !-- If no topography is initialized, the land-surface is at k = nzb. 2552 IF ( TRIM( topography ) /= 'read_from_file' ) THEN 2553 wall_flags_0(nzb,:,:) = IBSET( wall_flags_0(nzb,:,:), 5 ) 2554 ELSE 2555 DO i = nxl, nxr 2556 DO j = nys, nyn 2557 DO k = nzb, nzt+1 2558 ! 2559 !-- Natural terrain grid point 2560 IF ( BTEST( topo(k,j,i), 1 ) ) & 2561 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 5 ) 2562 ENDDO 2537 2563 ENDDO 2538 2564 ENDDO 2539 END DO2565 ENDIF 2540 2566 ENDIF 2541 2567 !
Note: See TracChangeset
for help on using the changeset viewer.