Changeset 240 for palm/trunk/SOURCE/init_3d_model.f90
- Timestamp:
- Feb 18, 2009 5:50:38 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/init_3d_model.f90
r198 r240 7 7 ! Actual revisions: 8 8 ! ----------------- 9 ! 9 ! Set the starting level and the vertical smoothing factor used for 10 ! the external pressure gradient 10 11 ! 11 12 ! Former revisions: … … 91 92 IMPLICIT NONE 92 93 93 INTEGER :: i, j, k, sr94 INTEGER :: i, ind_array(1), j, k, sr 94 95 95 96 INTEGER, DIMENSION(:), ALLOCATABLE :: ngp_2dh_l, ngp_3d_inner_l … … 111 112 sums_divnew_l(0:statistic_regions), & 112 113 sums_divold_l(0:statistic_regions) ) 113 ALLOCATE( rdf(nzb+1:nzt) )114 ALLOCATE( dp_smooth_factor(nzb:nzt), rdf(nzb+1:nzt) ) 114 115 ALLOCATE( ngp_2dh_outer(nzb:nzt+1,0:statistic_regions), & 115 116 ngp_2dh_outer_l(nzb:nzt+1,0:statistic_regions), & … … 1264 1265 1265 1266 ! 1267 !-- Initialize the starting level and the vertical smoothing factor used for 1268 !-- the external pressure gradient 1269 dp_smooth_factor = 1.0 1270 IF ( dp_external ) THEN 1271 ! 1272 !-- Set the starting level dp_level_ind_b only if it has not been set before 1273 !-- (e.g. in init_grid). 1274 IF ( dp_level_ind_b == 0 ) THEN 1275 ind_array = MINLOC( ABS( dp_level_b - zu ) ) 1276 dp_level_ind_b = ind_array(1) - 1 + nzb 1277 ! MINLOC uses lower array bound 1 1278 ENDIF 1279 IF ( dp_smooth ) THEN 1280 dp_smooth_factor(:dp_level_ind_b) = 0.0 1281 DO k = dp_level_ind_b+1, nzt 1282 dp_smooth_factor(k) = 0.5 * ( 1.0 + SIN( pi * & 1283 ( REAL( k - dp_level_ind_b ) / & 1284 REAL( nzt - dp_level_ind_b ) - 0.5 ) ) ) 1285 ENDDO 1286 ENDIF 1287 ENDIF 1288 1289 ! 1266 1290 !-- Initialize diffusivities used within the outflow damping layer in case of 1267 1291 !-- non-cyclic lateral boundaries. A linear increase is assumed over the first
Note: See TracChangeset
for help on using the changeset viewer.