Changeset 2232 for palm/trunk/SOURCE/user_init_grid.f90
- Timestamp:
- May 30, 2017 5:47:52 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/user_init_grid.f90
r2101 r2232 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! +Generic tunnel added 23 ! +Example of setting user-defined topography 23 24 ! 24 25 ! Former revisions: … … 55 56 !> Execution of user-defined grid initializing actions 56 57 !------------------------------------------------------------------------------! 57 SUBROUTINE user_init_grid( nzb_local)58 SUBROUTINE user_init_grid( topo_3d ) 58 59 59 60 … … 68 69 IMPLICIT NONE 69 70 70 INTEGER(iwp), DIMENSION(nysg:nyng,nxlg:nxrg) :: nzb_local !< 71 INTEGER(iwp) :: k_topo !< topography top index 72 INTEGER(iwp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: topo_3d !< 3D topography field 73 74 REAL(wp) :: h_topo !< user-defined topography height 71 75 72 76 ! … … 78 82 SELECT CASE ( TRIM( topography ) ) 79 83 80 CASE ( 'flat', 'single_building', 'single_street_canyon' )84 CASE ( 'flat', 'single_building', 'single_street_canyon', 'tunnel' ) 81 85 ! 82 86 !-- Not allowed here since these are the standard cases used in init_grid. … … 88 92 message_string = 'topography "' // topography // '" not available yet' 89 93 CALL message( 'user_init_grid', 'UI0005', 1, 2, 0, 6, 0 ) 94 ! 95 !-- The user is allowed to set surface-mounted as well as non-surface 96 !-- mounted topography (e.g. overhanging structures). For both, use 97 !-- 3D array topo_3d and set bit 0. The convention is: bit is zero inside 98 !-- topography, bit is 1 for atmospheric grid point. 99 !-- The following example shows how to prescribe sine-like topography 100 !-- along x-direction with amplitude of 10 * dz and wavelength 10 * dy. 101 ! DO i = nxlg, nxrg 102 ! h_topo = 10.0_wp * dz * (SIN(3.14_wp*0.5_wp)*i*dx / ( 5.0_wp * dy ) )**2 103 ! 104 ! k_topo = MINLOC( ABS( zw - h_topo ), 1 ) - 1 105 ! 106 ! topo_3d(k_topo+1:nzt+1,:,i) = & 107 ! IBSET( topo_3d(k_topo+1:nzt+1,:,i), 0 ) 108 ! ENDDO 109 ! 110 ! CALL exchange_horiz_int( topo_3d, nbgp ) 90 111 91 112 CASE DEFAULT … … 100 121 101 122 123 124 102 125 END SUBROUTINE user_init_grid 103 126
Note: See TracChangeset
for help on using the changeset viewer.