- Timestamp:
- Jul 8, 2015 6:49:19 PM (9 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/inflow_turbulence.f90
r1561 r1615 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Enable turbulent inflow for passive_scalar and humidity 23 23 ! 24 24 ! Former revisions: … … 61 61 62 62 USE arrays_3d, & 63 ONLY: e, inflow_damping_factor, mean_inflow_profiles, pt, u, v, w63 ONLY: e, inflow_damping_factor, mean_inflow_profiles, pt, q, u, v, w 64 64 65 65 USE control_parameters, & 66 ONLY: recycling_plane, recycling_yshift66 ONLY: humidity, passive_scalar, recycling_plane, recycling_yshift 67 67 68 68 USE cpulog, & … … 91 91 INTEGER(iwp) :: prev !: 92 92 93 REAL(wp), DIMENSION(nzb:nzt+1, 5,nbgp) :: &93 REAL(wp), DIMENSION(nzb:nzt+1,6,nbgp) :: & 94 94 avpr, avpr_l !: 95 REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng, 5,nbgp) :: &95 REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,6,nbgp) :: & 96 96 inflow_dist, local_inflow_dist !: 97 97 … … 101 101 !-- Carry out spanwise averaging in the recycling plane 102 102 avpr_l = 0.0_wp 103 ngp_pr = ( nzt - nzb + 2 ) * 5* nbgp103 ngp_pr = ( nzt - nzb + 2 ) * 6 * nbgp 104 104 ngp_ifd = ngp_pr * ( nyn - nys + 1 + 2 * nbgp ) 105 105 … … 120 120 avpr_l(k,4,l) = avpr_l(k,4,l) + pt(k,j,i) 121 121 avpr_l(k,5,l) = avpr_l(k,5,l) + e(k,j,i) 122 IF ( humidity .OR. passive_scalar ) & 123 avpr_l(k,6,l) = avpr_l(k,6,l) + q(k,j,i) 122 124 123 125 ENDDO … … 130 132 !-- Now, averaging over all PEs 131 133 IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) 132 CALL MPI_ALLREDUCE( avpr_l(nzb,1,1), avpr(nzb,1,1), ngp_pr, MPI_REAL, &134 CALL MPI_ALLREDUCE( avpr_l(nzb,1,1), avpr(nzb,1,1), ngp_pr, MPI_REAL, & 133 135 MPI_SUM, comm2d, ierr ) 134 136 … … 143 145 avpr_l(k,4,l) = avpr_l(k,4,l) + pt(k,j,i) 144 146 avpr_l(k,5,l) = avpr_l(k,5,l) + e(k,j,i) 147 IF ( humidity .OR. passive_scalar ) & 148 avpr_l(k,6,l) = avpr_l(k,6,l) + q(k,j,i) 145 149 146 150 ENDDO … … 168 172 inflow_dist(k,j,4,l) = pt(k,j,i) - avpr(k,4,l) 169 173 inflow_dist(k,j,5,l) = e(k,j,i) - avpr(k,5,l) 170 174 IF ( humidity .OR. passive_scalar ) & 175 inflow_dist(k,j,6,l) = q(k,j,i) - avpr(k,6,l) 171 176 ENDDO 172 177 ENDDO … … 185 190 inflow_dist(k,j,4,l) = pt(k,j,i) - avpr(k,4,l) 186 191 inflow_dist(k,j,5,l) = e(k,j,i) - avpr(k,5,l) 192 IF ( humidity .OR. passive_scalar ) & 193 inflow_dist(k,j,6,l) = q(k,j,i) - avpr(k,6,l) 187 194 188 195 ENDDO … … 263 270 e(k,j,-nbgp:-1) = MAX( e(k,j,-nbgp:-1), 0.0_wp ) 264 271 272 IF ( humidity .OR. passive_scalar ) & 273 q(k,j,-nbgp:-1) = mean_inflow_profiles(k,6) + & 274 local_inflow_dist(k,j,6,1:nbgp) * & 275 inflow_damping_factor(k) 276 265 277 ENDDO 266 278 ENDDO … … 271 283 DO k = nzb, nzt + 1 272 284 273 u(k,j,-nbgp+1:0) = mean_inflow_profiles(k,1) +&274 275 v(k,j,-nbgp:-1) = mean_inflow_profiles(k,2) +&276 277 w(k,j,-nbgp:-1) =&285 u(k,j,-nbgp+1:0) = mean_inflow_profiles(k,1) + & 286 inflow_dist(k,j,1,1:nbgp) * inflow_damping_factor(k) 287 v(k,j,-nbgp:-1) = mean_inflow_profiles(k,2) + & 288 inflow_dist(k,j,2,1:nbgp) * inflow_damping_factor(k) 289 w(k,j,-nbgp:-1) = & 278 290 inflow_dist(k,j,3,1:nbgp) * inflow_damping_factor(k) 279 pt(k,j,-nbgp:-1) = mean_inflow_profiles(k,4) +&291 pt(k,j,-nbgp:-1) = mean_inflow_profiles(k,4) + & 280 292 inflow_dist(k,j,4,1:nbgp) * inflow_damping_factor(k) 281 e(k,j,-nbgp:-1) = mean_inflow_profiles(k,5) +&293 e(k,j,-nbgp:-1) = mean_inflow_profiles(k,5) + & 282 294 inflow_dist(k,j,5,1:nbgp) * inflow_damping_factor(k) 283 e(k,j,-nbgp:-1) = MAX( e(k,j,-nbgp:-1), 0.0_wp ) 295 e(k,j,-nbgp:-1) = MAX( e(k,j,-nbgp:-1), 0.0_wp ) 296 297 IF ( humidity .OR. passive_scalar ) & 298 q(k,j,-nbgp:-1) = mean_inflow_profiles(k,6) + & 299 inflow_dist(k,j,6,1:nbgp) * inflow_damping_factor(k) 284 300 285 301 ENDDO -
palm/trunk/SOURCE/init_3d_model.f90
r1586 r1615 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! Enable turbulent inflow for passive_scalar and humidity 23 23 ! 24 24 ! Former revisions: … … 1248 1248 !-- profiles from the prerun. Alternatively, prescribed profiles 1249 1249 !-- for u,v-components can be used. 1250 ALLOCATE( mean_inflow_profiles(nzb:nzt+1, 5) )1250 ALLOCATE( mean_inflow_profiles(nzb:nzt+1,6) ) 1251 1251 1252 1252 IF ( use_prescribed_profile_data ) THEN … … 1259 1259 mean_inflow_profiles(:,4) = hom_sum(:,4,0) ! pt 1260 1260 mean_inflow_profiles(:,5) = hom_sum(:,8,0) ! e 1261 mean_inflow_profiles(:,6) = hom_sum(:,41,0) ! q 1261 1262 1262 1263 ! … … 1285 1286 pt(k,j,nxlg:-1) = mean_inflow_profiles(k,4) 1286 1287 e(k,j,nxlg:-1) = mean_inflow_profiles(k,5) 1288 IF ( humidity .OR. passive_scalar ) & 1289 q(k,j,nxlg:-1) = mean_inflow_profiles(k,6) 1287 1290 ENDDO 1288 1291 ENDDO -
palm/trunk/SOURCE/read_var_list.f90
r1586 r1615 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! Enable turbulent inflow for passive_scalar and humidity 23 23 ! 24 24 ! Former revisions: … … 442 442 CASE ( 'mean_inflow_profiles' ) 443 443 IF ( .NOT. ALLOCATED( mean_inflow_profiles ) ) THEN 444 ALLOCATE( mean_inflow_profiles(0:nz+1, 5) )444 ALLOCATE( mean_inflow_profiles(0:nz+1,6) ) 445 445 ENDIF 446 446 READ ( 13 ) mean_inflow_profiles
Note: See TracChangeset
for help on using the changeset viewer.