Changeset 3186 for palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90
 Timestamp:
 Jul 30, 2018 5:07:14 PM (6 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90
r3183 r3186 25 25 !  26 26 ! $Id$ 27 ! Mask topography while imposing inflow perturbations at the boundaries; do not 28 ! impose perturbations at top boundary as well as ghost points 29 ! 30 ! 3183 20180727 14:25:55Z suehring 27 31 ! Rename variables and extend error message 28 32 ! Enable geneartor also for stretched grids … … 1270 1274 IF ( myidx == id_stg_left ) THEN 1271 1275 1272 DO j = nysg, nyng 1273 DO k = nzb, nzt+1 1274 u(k,j,nbgp+1:0) = ( u(k,j,nbgp+1:0) + dist_yz(k,j,1) ) & 1275 * mc_factor 1276 v(k,j,nbgp:1) = ( v(k,j,nbgp:1) + dist_yz(k,j,2) ) & 1277 * mc_factor 1278 w(k,j,nbgp:1) = ( w(k,j,nbgp:1) + dist_yz(k,j,3) ) & 1279 * mc_factor 1276 DO j = nys, nyn 1277 DO k = nzb, nzt 1278 u(k,j,0) = ( u(k,j,0) + dist_yz(k,j,1) ) & 1279 * mc_factor * MERGE( 1.0_wp, 0.0_wp, & 1280 BTEST( wall_flags_0(k,j,0), 1 ) ) 1281 v(k,j,1) = ( v(k,j,1) + dist_yz(k,j,2) ) & 1282 * mc_factor * MERGE( 1.0_wp, 0.0_wp, & 1283 BTEST( wall_flags_0(k,j,1), 2 ) ) 1284 w(k,j,1) = ( w(k,j,1) + dist_yz(k,j,3) ) & 1285 * mc_factor * MERGE( 1.0_wp, 0.0_wp, & 1286 BTEST( wall_flags_0(k,j,1), 3 ) ) 1280 1287 ENDDO 1281 1288 ENDDO … … 1283 1290 IF ( myidx == id_stg_right ) THEN 1284 1291 1285 DO j = nysg, nyng 1286 DO k = nzb, nzt+1 1287 u(k,j,nxr+1:nxr+nbgp) = ( u(k,j,nxr+1:nxr+nbgp) + & 1288 dist_yz(k,j,1) ) * mc_factor 1289 v(k,j,nxr+1:nxr+nbgp) = ( v(k,j,nxr+1:nxr+nbgp) + & 1290 dist_yz(k,j,2) ) * mc_factor 1291 w(k,j,nxr+1:nxr+nbgp) = ( w(k,j,nxr+1:nxr+nbgp) + & 1292 dist_yz(k,j,3) ) * mc_factor 1292 DO j = nys, nyn 1293 DO k = nzb, nzt 1294 u(k,j,nxr+1) = ( u(k,j,nxr+1) + dist_yz(k,j,1) ) & 1295 * mc_factor * MERGE( 1.0_wp, 0.0_wp, & 1296 BTEST( wall_flags_0(k,j,nxr+1), 1 ) ) 1297 v(k,j,nxr+1) = ( v(k,j,nxr+1) + dist_yz(k,j,2) ) & 1298 * mc_factor * MERGE( 1.0_wp, 0.0_wp, & 1299 BTEST( wall_flags_0(k,j,nxr+1), 2 ) ) 1300 w(k,j,nxr+1) = ( w(k,j,nxr+1) + dist_yz(k,j,3) ) & 1301 * mc_factor * MERGE( 1.0_wp, 0.0_wp, & 1302 BTEST( wall_flags_0(k,j,nxr+1), 3 ) ) 1293 1303 ENDDO 1294 1304 ENDDO … … 1389 1399 IF ( myidy == id_stg_south ) THEN 1390 1400 1391 DO i = nxlg, nxrg 1392 DO k = nzb, nzt+1 1393 u(k,nbgp:1,i) = ( u(k,nbgp:1,i) + dist_xz(k,i,1) ) & 1394 * mc_factor 1395 v(k,nbgp:0,i) = ( v(k,nbgp:0,i) + dist_xz(k,i,2) ) & 1396 * mc_factor 1397 w(k,nbgp:1,i) = ( w(k,nbgp:1,i) + dist_xz(k,i,3) ) & 1398 * mc_factor 1401 DO i = nxl, nxr 1402 DO k = nzb, nzt 1403 u(k,1,i) = ( u(k,1,i) + dist_xz(k,i,1) ) & 1404 * mc_factor * MERGE( 1.0_wp, 0.0_wp, & 1405 BTEST( wall_flags_0(k,1,i), 1 ) ) 1406 v(k,0,i) = ( v(k,0,i) + dist_xz(k,i,2) ) & 1407 * mc_factor * MERGE( 1.0_wp, 0.0_wp, & 1408 BTEST( wall_flags_0(k,0,i), 2 ) ) 1409 w(k,1,i) = ( w(k,1,i) + dist_xz(k,i,3) ) & 1410 * mc_factor * MERGE( 1.0_wp, 0.0_wp, & 1411 BTEST( wall_flags_0(k,1,i), 3 ) ) 1399 1412 ENDDO 1400 1413 ENDDO … … 1402 1415 IF ( myidy == id_stg_north ) THEN 1403 1416 1404 DO i = nxlg, nxrg 1405 DO k = nzb, nzt+1 1406 u(k,nyn+1:nyn+nbgp,i) = ( u(k,nyn+1:nyn+nbgp,i) + & 1407 dist_xz(k,i,1) ) * mc_factor 1408 v(k,nyn+1:nyn+nbgp,i) = ( v(k,nyn+1:nyn+nbgp,i) + & 1409 dist_xz(k,i,2) ) * mc_factor 1410 w(k,nyn+1:nyn+nbgp,i) = ( w(k,nyn+1:nyn+nbgp,i) + & 1411 dist_xz(k,i,3) ) * mc_factor 1417 DO i = nxl, nxr 1418 DO k = nzb, nzt 1419 u(k,nyn+1,i) = ( u(k,nyn+1,i) + dist_xz(k,i,1) ) & 1420 * mc_factor * MERGE( 1.0_wp, 0.0_wp, & 1421 BTEST( wall_flags_0(k,nyn+1,i), 1 ) ) 1422 v(k,nyn+1,i) = ( v(k,nyn+1,i) + dist_xz(k,i,1) ) & 1423 * mc_factor * MERGE( 1.0_wp, 0.0_wp, & 1424 BTEST( wall_flags_0(k,nyn+1,i), 2 ) ) 1425 w(k,nyn+1,i) = ( w(k,nyn+1,i) + dist_xz(k,i,1) ) & 1426 * mc_factor * MERGE( 1.0_wp, 0.0_wp, & 1427 BTEST( wall_flags_0(k,nyn+1,i), 3 ) ) 1412 1428 ENDDO 1413 1429 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.