Changeset 1560 for palm/trunk/SOURCE
- Timestamp:
- Mar 6, 2015 10:48:54 AM (10 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/header.f90
r1558 r1560 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! output for recycling y shift 23 23 ! 24 24 ! Former revisions: … … 1101 1101 WRITE ( io, 318 ) use_cmax, pt_damping_width, pt_damping_factor 1102 1102 IF ( turbulent_inflow ) THEN 1103 WRITE ( io, 319 ) recycling_width, recycling_plane, & 1104 inflow_damping_height, inflow_damping_width 1103 IF ( .NOT. recycling_yshift ) THEN 1104 WRITE ( io, 319 ) recycling_width, recycling_plane, & 1105 inflow_damping_height, inflow_damping_width 1106 ELSE 1107 WRITE ( io, 322 ) recycling_width, recycling_plane, & 1108 inflow_damping_height, inflow_damping_width 1109 END IF 1105 1110 ENDIF 1106 1111 ENDIF … … 2047 2052 321 FORMAT (//' Initial profiles:'/ & 2048 2053 ' ----------------') 2054 322 FORMAT (' turbulence recycling at inflow switched on'/ & 2055 ' y shift of the recycled inflow turbulence switched on'/ & 2056 ' width of recycling domain: ',F7.1,' m grid index: ',I4/ & 2057 ' inflow damping height: ',F6.1,' m width: ',F6.1,' m'/q) 2049 2058 325 FORMAT (//' List output:'/ & 2050 2059 ' -----------'// & -
palm/trunk/SOURCE/inflow_turbulence.f90
r1354 r1560 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Option recycling_yshift added. If this option is switched on, the turbulence 23 ! data, which is mapped from the recycling plane to the inflow, is shifted in 24 ! y direction (by ny * dy / 2 ) 23 25 ! 24 26 ! Former revisions: … … 59 61 60 62 USE control_parameters, & 61 ONLY: recycling_plane 63 ONLY: recycling_plane, recycling_yshift 62 64 63 65 USE cpulog, & … … 81 83 INTEGER(iwp) :: k !: 82 84 INTEGER(iwp) :: l !: 85 INTEGER(iwp) :: next !: 83 86 INTEGER(iwp) :: ngp_ifd !: 84 87 INTEGER(iwp) :: ngp_pr !: 88 INTEGER(iwp) :: prev !: 85 89 86 90 REAL(wp), DIMENSION(nzb:nzt+1,5,nbgp) :: & 87 91 avpr, avpr_l !: 88 92 REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,5,nbgp) :: & 89 inflow_dist 93 inflow_dist, local_inflow_dist !: 90 94 91 95 CALL cpu_log( log_point(40), 'inflow_turbulence', 'start' ) … … 190 194 IF ( myidx == id_recycling .AND. myidx /= id_inflow ) THEN 191 195 192 CALL MPI_SEND( inflow_dist(nzb,nysg,1,1), ngp_ifd, MPI_REAL, &196 CALL MPI_SEND( inflow_dist(nzb,nysg,1,1), ngp_ifd, MPI_REAL, & 193 197 id_inflow, 1, comm1dx, ierr ) 194 198 … … 196 200 197 201 inflow_dist = 0.0_wp 198 CALL MPI_RECV( inflow_dist(nzb,nysg,1,1), ngp_ifd, MPI_REAL, &202 CALL MPI_RECV( inflow_dist(nzb,nysg,1,1), ngp_ifd, MPI_REAL, & 199 203 id_recycling, 1, comm1dx, status, ierr ) 200 204 201 205 ENDIF 206 207 208 IF ( recycling_yshift .AND. myidx == id_inflow ) THEN 209 210 IF ( pdims(2) >= 2 ) THEN 211 212 IF ( myidy >= INT( pdims(2) / 2 ) ) THEN 213 prev = myidy - INT( pdims(2) / 2 ) 214 ELSE 215 prev = pdims(2) - ( INT( pdims(2) / 2 ) - myidy ) 216 ENDIF 217 218 IF ( myidy < pdims(2) - INT( pdims(2) / 2 ) ) THEN 219 next = myidy + INT( pdims(2) / 2 ) 220 ELSE 221 next = INT( pdims(2) / 2 ) - ( pdims(2) - myidy ) 222 ENDIF 223 224 ENDIF 225 226 local_inflow_dist = 0.0_wp 227 228 CALL MPI_SENDRECV( inflow_dist(nzb,nysg,1,1), ngp_ifd, MPI_REAL, & 229 next, 1, local_inflow_dist(nzb,nysg,1,1), ngp_ifd, & 230 MPI_REAL, prev, 1, comm1dy, status, ierr ) 231 232 ENDIF 233 202 234 #endif 203 235 … … 205 237 !-- Add the disturbance at the inflow 206 238 IF ( nxl == 0 ) THEN 207 208 DO j = nysg, nyng 209 DO k = nzb, nzt + 1 210 211 u(k,j,-nbgp+1:0) = mean_inflow_profiles(k,1) + & 212 inflow_dist(k,j,1,1:nbgp) * inflow_damping_factor(k) 213 v(k,j,-nbgp:-1) = mean_inflow_profiles(k,2) + & 214 inflow_dist(k,j,2,1:nbgp) * inflow_damping_factor(k) 215 w(k,j,-nbgp:-1) = & 239 240 IF ( recycling_yshift ) THEN 241 242 DO j = nysg, nyng 243 DO k = nzb, nzt + 1 244 245 u(k,j,-nbgp+1:0) = mean_inflow_profiles(k,1) + & 246 local_inflow_dist(k,j,1,1:nbgp) * & 247 inflow_damping_factor(k) 248 v(k,j,-nbgp:-1) = mean_inflow_profiles(k,2) + & 249 local_inflow_dist(k,j,2,1:nbgp) * & 250 inflow_damping_factor(k) 251 w(k,j,-nbgp:-1) = & 252 local_inflow_dist(k,j,3,1:nbgp) * & 253 inflow_damping_factor(k) 254 pt(k,j,-nbgp:-1) = mean_inflow_profiles(k,4) + & 255 local_inflow_dist(k,j,4,1:nbgp) * & 256 inflow_damping_factor(k) 257 e(k,j,-nbgp:-1) = mean_inflow_profiles(k,5) + & 258 local_inflow_dist(k,j,5,1:nbgp) * & 259 inflow_damping_factor(k) 260 e(k,j,-nbgp:-1) = MAX( e(k,j,-nbgp:-1), 0.0_wp ) 261 262 ENDDO 263 ENDDO 264 265 ELSE 266 267 DO j = nysg, nyng 268 DO k = nzb, nzt + 1 269 270 u(k,j,-nbgp+1:0) = mean_inflow_profiles(k,1) + & 271 inflow_dist(k,j,1,1:nbgp) * inflow_damping_factor(k) 272 v(k,j,-nbgp:-1) = mean_inflow_profiles(k,2) + & 273 inflow_dist(k,j,2,1:nbgp) * inflow_damping_factor(k) 274 w(k,j,-nbgp:-1) = & 216 275 inflow_dist(k,j,3,1:nbgp) * inflow_damping_factor(k) 217 pt(k,j,-nbgp:-1) = mean_inflow_profiles(k,4) +&276 pt(k,j,-nbgp:-1) = mean_inflow_profiles(k,4) + & 218 277 inflow_dist(k,j,4,1:nbgp) * inflow_damping_factor(k) 219 e(k,j,-nbgp:-1) = mean_inflow_profiles(k,5) +&278 e(k,j,-nbgp:-1) = mean_inflow_profiles(k,5) + & 220 279 inflow_dist(k,j,5,1:nbgp) * inflow_damping_factor(k) 221 e(k,j,-nbgp:-1) = MAX( e(k,j,-nbgp:-1), 0.0_wp ) 222 223 ENDDO 224 ENDDO 225 226 ENDIF 280 e(k,j,-nbgp:-1) = MAX( e(k,j,-nbgp:-1), 0.0_wp ) 281 282 ENDDO 283 ENDDO 284 285 ENDIF 286 287 ENDIF 288 227 289 228 290 CALL cpu_log( log_point(40), 'inflow_turbulence', 'stop' ) -
palm/trunk/SOURCE/modules.f90
r1558 r1560 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! +recycling_yshift 23 23 ! 24 24 ! Former revisions: … … 669 669 prandtl_layer = .TRUE., & 670 670 precipitation = .FALSE., & 671 random_heatflux = .FALSE., &671 random_heatflux = .FALSE., recycling_yshift = .FALSE.,& 672 672 run_control_header = .FALSE., run_coupled = .TRUE., & 673 673 scalar_rayleigh_damping = .TRUE., sloping_surface = .FALSE., & -
palm/trunk/SOURCE/parin.f90
r1497 r1560 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! +recycling_yshift 23 23 ! 24 24 ! Former revisions: … … 214 214 q_vertical_gradient_level, random_generator, & 215 215 random_heatflux, rayleigh_damping_factor, & 216 rayleigh_damping_height, recycling_width, reference_state, & 217 residual_limit, restart_time, return_addres, return_username, & 216 rayleigh_damping_height, recycling_width, recycling_yshift, & 217 reference_state, residual_limit, & 218 restart_time, return_addres, return_username, & 218 219 revision, rif_max, rif_min, roughness_length, runnr, & 219 220 run_identifier, sa_surface, sa_vertical_gradient, & … … 307 308 q_vertical_gradient, q_vertical_gradient_level, & 308 309 random_generator, random_heatflux, & 309 rayleigh_damping_factor, rayleigh_damping_height, recycling_width,& 310 rayleigh_damping_factor, rayleigh_damping_height, & 311 recycling_width, recycling_yshift, & 310 312 reference_state, residual_limit, & 311 313 rif_max, rif_min, roughness_length, sa_surface, & -
palm/trunk/SOURCE/read_var_list.f90
r1551 r1560 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! +recycling_yshift 23 23 ! 24 24 ! Former revisions: … … 528 528 CASE ( 'recycling_width' ) 529 529 READ ( 13 ) recycling_width 530 CASE ( 'recycling_yshift' ) 531 READ ( 13 ) recycling_yshift 530 532 CASE ( 'reference_state' ) 531 533 READ ( 13 ) reference_state
Note: See TracChangeset
for help on using the changeset viewer.