Changeset 4172 for palm/trunk/SOURCE/inflow_turbulence.f90
- Timestamp:
- Aug 20, 2019 11:55:33 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/inflow_turbulence.f90
r3655 r4172 25 25 ! ----------------- 26 26 ! $Id$ 27 ! added optional recycling of absolute values for pt and q 28 ! 29 ! 3655 2019-01-07 16:51:22Z knoop 27 30 ! Corrected "Former revisions" section 28 31 ! … … 87 90 88 91 USE control_parameters, & 89 ONLY: humidity, passive_scalar, recycling_plane, recycling_yshift 92 ONLY: humidity, passive_scalar, recycling_plane, recycling_yshift, raq 90 93 91 94 USE cpulog, & … … 101 104 102 105 IMPLICIT NONE 103 106 104 107 INTEGER(iwp) :: i !< loop index 105 108 INTEGER(iwp) :: j !< loop index … … 119 122 REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,7,nbgp) :: & 120 123 local_inflow_dist !< auxiliary variable for inflow_dist, used for yshift 121 124 122 125 CALL cpu_log( log_point(40), 'inflow_turbulence', 'start' ) 123 126 124 127 ! 125 128 !-- Carry out spanwise averaging in the recycling plane … … 187 190 ! 188 191 !-- Calculate the disturbances at the recycling plane 192 !-- for recycling of absolute quantities, the disturbance is defined as the absolute value 193 !-- (and not as the deviation from the mean profile) 189 194 i = recycling_plane 190 195 … … 198 203 inflow_dist(k,j,2,l) = v(k,j,i) - avpr(k,2,l) 199 204 inflow_dist(k,j,3,l) = w(k,j,i) - avpr(k,3,l) 200 inflow_dist(k,j,4,l) = pt(k,j,i) - avpr(k,4,l) 205 IF ( raq(4) ) THEN 206 inflow_dist(k,j,4,l) = pt(k,j,i) 207 ELSE 208 inflow_dist(k,j,4,l) = pt(k,j,i) - avpr(k,4,l) 209 ENDIF 201 210 inflow_dist(k,j,5,l) = e(k,j,i) - avpr(k,5,l) 202 IF ( humidity ) & 203 inflow_dist(k,j,6,l) = q(k,j,i) - avpr(k,6,l) 211 IF ( humidity ) THEN 212 IF ( raq(6) ) THEN 213 inflow_dist(k,j,6,l) = q(k,j,i) 214 ELSE 215 inflow_dist(k,j,6,l) = q(k,j,i) - avpr(k,6,l) 216 ENDIF 217 ENDIF 204 218 IF ( passive_scalar ) & 205 219 inflow_dist(k,j,7,l) = s(k,j,i) - avpr(k,7,l) … … 214 228 DO j = nysg, nyng 215 229 DO k = nzb, nzt+1 216 217 230 inflow_dist(k,j,1,l) = u(k,j,i+1) - avpr(k,1,l) 218 231 inflow_dist(k,j,2,l) = v(k,j,i) - avpr(k,2,l) 219 232 inflow_dist(k,j,3,l) = w(k,j,i) - avpr(k,3,l) 220 inflow_dist(k,j,4,l) = pt(k,j,i) - avpr(k,4,l) 233 IF ( raq(4) ) THEN 234 inflow_dist(k,j,4,l) = pt(k,j,i) 235 ELSE 236 inflow_dist(k,j,4,l) = pt(k,j,i) - avpr(k,4,l) 237 ENDIF 221 238 inflow_dist(k,j,5,l) = e(k,j,i) - avpr(k,5,l) 222 IF ( humidity ) & 223 inflow_dist(k,j,6,l) = q(k,j,i) - avpr(k,6,l) 239 IF ( humidity ) THEN 240 IF ( raq(6) ) THEN 241 inflow_dist(k,j,6,l) = q(k,j,i) 242 ELSE 243 inflow_dist(k,j,6,l) = q(k,j,i) - avpr(k,6,l) 244 ENDIF 245 ENDIF 224 246 IF ( passive_scalar ) & 225 247 inflow_dist(k,j,7,l) = s(k,j,i) - avpr(k,7,l) … … 291 313 w(k,j,-nbgp:-1) = & 292 314 inflow_dist(k,j,3,1:nbgp) * inflow_damping_factor(k) 293 pt(k,j,-nbgp:-1) = mean_inflow_profiles(k,4) + & 294 inflow_dist(k,j,4,1:nbgp) * inflow_damping_factor(k) 295 e(k,j,-nbgp:-1) = mean_inflow_profiles(k,5) + & 315 IF ( raq(4) ) THEN 316 pt(k,j,-nbgp:-1) = inflow_dist(k,j,4,1:nbgp) 317 ELSE 318 pt(k,j,-nbgp:-1) = mean_inflow_profiles(k,4) + & 319 inflow_dist(k,j,4,1:nbgp) * inflow_damping_factor(k) 320 ENDIF 321 e(k,j,-nbgp:-1) = mean_inflow_profiles(k,5) + & 296 322 inflow_dist(k,j,5,1:nbgp) * inflow_damping_factor(k) 297 323 e(k,j,-nbgp:-1) = MAX( e(k,j,-nbgp:-1), 0.0_wp ) 298 324 299 IF ( humidity ) & 300 q(k,j,-nbgp:-1) = mean_inflow_profiles(k,6) + & 325 IF ( humidity ) THEN 326 IF ( raq(6) ) THEN 327 q(k,j,-nbgp:-1) = inflow_dist(k,j,6,1:nbgp) 328 ELSE 329 q(k,j,-nbgp:-1) = mean_inflow_profiles(k,6) + & 301 330 inflow_dist(k,j,6,1:nbgp) * inflow_damping_factor(k) 331 ENDIF 332 ENDIF 302 333 IF ( passive_scalar ) & 303 334 s(k,j,-nbgp:-1) = mean_inflow_profiles(k,7) + & 304 335 inflow_dist(k,j,7,1:nbgp) * inflow_damping_factor(k) 305 306 336 ENDDO 307 337 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.