Changeset 4329 for palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90
- Timestamp:
- Dec 10, 2019 3:46:36 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90
r4309 r4329 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Renamed wall_flags_0 to wall_flags_static_0 28 ! 29 ! 4309 2019-11-26 18:49:59Z suehring 27 30 ! Computation of velocity seeds optimized. This implies that random numbers 28 31 ! are computed now using the parallel random number generator. Random numbers … … 193 196 nyng, & 194 197 nysg, & 195 wall_flags_ 0198 wall_flags_static_0 196 199 197 200 USE kinds … … 972 975 nr_non_topo_yz_l(1) = SUM( & 973 976 MERGE( 1, 0, & 974 BTEST( wall_flags_ 0(nzb:nzt,nys:nyn,i), 1 ) ) )977 BTEST( wall_flags_static_0(nzb:nzt,nys:nyn,i), 1 ) ) ) 975 978 ! 976 979 !-- Number of grid points where perturbations are imposed on v and w … … 980 983 nr_non_topo_yz_l(2) = SUM( & 981 984 MERGE( 1, 0, & 982 BTEST( wall_flags_ 0(nzb:nzt,nysv:nyn,i), 2 ) ) )985 BTEST( wall_flags_static_0(nzb:nzt,nysv:nyn,i), 2 ) ) ) 983 986 nr_non_topo_yz_l(3) = SUM( & 984 987 MERGE( 1, 0, & 985 BTEST( wall_flags_ 0(nzb:nzt,nys:nyn,i), 3 ) ) )988 BTEST( wall_flags_static_0(nzb:nzt,nys:nyn,i), 3 ) ) ) 986 989 987 990 #if defined( __parallel ) … … 1001 1004 nr_non_topo_xz_l(2) = SUM( & 1002 1005 MERGE( 1, 0, & 1003 BTEST( wall_flags_ 0(nzb:nzt,j,nxl:nxr), 2 ) ) )1006 BTEST( wall_flags_static_0(nzb:nzt,j,nxl:nxr), 2 ) ) ) 1004 1007 ! 1005 1008 !-- Number of grid points where perturbations are imposed on u and w … … 1009 1012 nr_non_topo_xz_l(1) = SUM( & 1010 1013 MERGE( 1, 0, & 1011 BTEST( wall_flags_ 0(nzb:nzt,j,nxlu:nxr), 1 ) ) )1014 BTEST( wall_flags_static_0(nzb:nzt,j,nxlu:nxr), 1 ) ) ) 1012 1015 nr_non_topo_xz_l(3) = SUM( & 1013 1016 MERGE( 1, 0, & 1014 BTEST( wall_flags_ 0(nzb:nzt,j,nxl:nxr), 3 ) ) )1017 BTEST( wall_flags_static_0(nzb:nzt,j,nxl:nxr), 3 ) ) ) 1015 1018 1016 1019 #if defined( __parallel ) … … 1337 1340 dist_yz(k,j,1) = MIN( a11(k) * fu_yz(k,j), 3.0_wp ) * & 1338 1341 MERGE( 1.0_wp, 0.0_wp, & 1339 BTEST( wall_flags_ 0(k,j,i), 1 ) )1342 BTEST( wall_flags_static_0(k,j,i), 1 ) ) 1340 1343 ENDDO 1341 1344 ENDDO … … 1354 1357 + a22(k) * fv_yz(k,j) ), 3.0_wp ) * & 1355 1358 MERGE( 1.0_wp, 0.0_wp, & 1356 BTEST( wall_flags_ 0(k,j,i), 2 ) )1359 BTEST( wall_flags_static_0(k,j,i), 2 ) ) 1357 1360 dist_yz(k,j,3) = MIN( ( SQRT(a33(k) / MAXVAL(a33) ) & 1358 1361 * 1.3_wp ) & … … 1361 1364 + a33(k) * fw_yz(k,j) ), 3.0_wp ) * & 1362 1365 MERGE( 1.0_wp, 0.0_wp, & 1363 BTEST( wall_flags_ 0(k,j,i), 3 ) )1366 BTEST( wall_flags_static_0(k,j,i), 3 ) ) 1364 1367 ENDDO 1365 1368 ENDDO … … 1384 1387 mc_factor_l(1) = SUM( dist_yz(nzb:nzt,nys:nyn,1) & 1385 1388 * MERGE( 1.0_wp, 0.0_wp, & 1386 BTEST( wall_flags_ 0(nzb:nzt,nys:nyn,i), 1 ) ) )1389 BTEST( wall_flags_static_0(nzb:nzt,nys:nyn,i), 1 ) ) ) 1387 1390 1388 1391 IF ( myidx == id_stg_left ) i = nxl-1 … … 1391 1394 mc_factor_l(2) = SUM( dist_yz(nzb:nzt,nysv:nyn,2) & 1392 1395 * MERGE( 1.0_wp, 0.0_wp, & 1393 BTEST( wall_flags_ 0(nzb:nzt,nysv:nyn,i), 2 ) ) )1396 BTEST( wall_flags_static_0(nzb:nzt,nysv:nyn,i), 2 ) ) ) 1394 1397 mc_factor_l(3) = SUM( dist_yz(nzb:nzt,nys:nyn,3) & 1395 1398 * MERGE( 1.0_wp, 0.0_wp, & 1396 BTEST( wall_flags_ 0(nzb:nzt,nys:nyn,i), 3 ) ) )1399 BTEST( wall_flags_static_0(nzb:nzt,nys:nyn,i), 3 ) ) ) 1397 1400 1398 1401 #if defined( __parallel ) … … 1411 1414 dist_yz(:,:,1) = ( dist_yz(:,:,1) - mc_factor(1) ) & 1412 1415 * MERGE( 1.0_wp, 0.0_wp, & 1413 BTEST( wall_flags_ 0(:,:,i), 1 ) )1416 BTEST( wall_flags_static_0(:,:,i), 1 ) ) 1414 1417 1415 1418 … … 1419 1422 dist_yz(:,:,2) = ( dist_yz(:,:,2) - mc_factor(2) ) & 1420 1423 * MERGE( 1.0_wp, 0.0_wp, & 1421 BTEST( wall_flags_ 0(:,:,i), 2 ) )1424 BTEST( wall_flags_static_0(:,:,i), 2 ) ) 1422 1425 1423 1426 dist_yz(:,:,3) = ( dist_yz(:,:,3) - mc_factor(3) ) & 1424 1427 * MERGE( 1.0_wp, 0.0_wp, & 1425 BTEST( wall_flags_ 0(:,:,i), 3 ) )1428 BTEST( wall_flags_static_0(:,:,i), 3 ) ) 1426 1429 ! 1427 1430 !-- Add disturbances … … 1439 1442 dist_yz(k,j,1) ) & 1440 1443 * MERGE( 1.0_wp, 0.0_wp, & 1441 BTEST( wall_flags_ 0(k,j,0), 1 ) )1444 BTEST( wall_flags_static_0(k,j,0), 1 ) ) 1442 1445 v(k,j,-nbgp:-1) = ( mean_inflow_profiles(k,2) + & 1443 1446 dist_yz(k,j,2) ) & 1444 1447 * MERGE( 1.0_wp, 0.0_wp, & 1445 BTEST( wall_flags_ 0(k,j,-1), 2 ) )1448 BTEST( wall_flags_static_0(k,j,-1), 2 ) ) 1446 1449 w(k,j,-nbgp:-1) = dist_yz(k,j,3) & 1447 1450 * MERGE( 1.0_wp, 0.0_wp, & 1448 BTEST( wall_flags_ 0(k,j,-1), 3 ) )1451 BTEST( wall_flags_static_0(k,j,-1), 3 ) ) 1449 1452 ENDDO 1450 1453 ENDDO … … 1455 1458 u(k,j,0) = ( u(k,j,0) + dist_yz(k,j,1) ) & 1456 1459 * MERGE( 1.0_wp, 0.0_wp, & 1457 BTEST( wall_flags_ 0(k,j,0), 1 ) )1460 BTEST( wall_flags_static_0(k,j,0), 1 ) ) 1458 1461 u(k,j,-1) = u(k,j,0) 1459 1462 v(k,j,-1) = ( v(k,j,-1) + dist_yz(k,j,2) ) & 1460 1463 * MERGE( 1.0_wp, 0.0_wp, & 1461 BTEST( wall_flags_ 0(k,j,-1), 2 ) )1464 BTEST( wall_flags_static_0(k,j,-1), 2 ) ) 1462 1465 w(k,j,-1) = ( w(k,j,-1) + dist_yz(k,j,3) ) & 1463 1466 * MERGE( 1.0_wp, 0.0_wp, & 1464 BTEST( wall_flags_ 0(k,j,-1), 3 ) )1467 BTEST( wall_flags_static_0(k,j,-1), 3 ) ) 1465 1468 ENDDO 1466 1469 ENDDO … … 1472 1475 u(k,j,nxr+1) = ( u(k,j,nxr+1) + dist_yz(k,j,1) ) & 1473 1476 * MERGE( 1.0_wp, 0.0_wp, & 1474 BTEST( wall_flags_ 0(k,j,nxr+1), 1 ) )1477 BTEST( wall_flags_static_0(k,j,nxr+1), 1 ) ) 1475 1478 v(k,j,nxr+1) = ( v(k,j,nxr+1) + dist_yz(k,j,2) ) & 1476 1479 * MERGE( 1.0_wp, 0.0_wp, & 1477 BTEST( wall_flags_ 0(k,j,nxr+1), 2 ) )1480 BTEST( wall_flags_static_0(k,j,nxr+1), 2 ) ) 1478 1481 w(k,j,nxr+1) = ( w(k,j,nxr+1) + dist_yz(k,j,3) ) & 1479 1482 * MERGE( 1.0_wp, 0.0_wp, & 1480 BTEST( wall_flags_ 0(k,j,nxr+1), 3 ) )1483 BTEST( wall_flags_static_0(k,j,nxr+1), 3 ) ) 1481 1484 ENDDO 1482 1485 ENDDO … … 1537 1540 + a22(k) * fv_xz(k,i) ), 3.0_wp ) * & 1538 1541 MERGE( 1.0_wp, 0.0_wp, & 1539 BTEST( wall_flags_ 0(k,j,i), 2 ) )1542 BTEST( wall_flags_static_0(k,j,i), 2 ) ) 1540 1543 ENDDO 1541 1544 ENDDO … … 1550 1553 dist_xz(k,i,1) = MIN( a11(k) * fu_xz(k,i), 3.0_wp ) * & 1551 1554 MERGE( 1.0_wp, 0.0_wp, & 1552 BTEST( wall_flags_ 0(k,j,i), 1 ) )1555 BTEST( wall_flags_static_0(k,j,i), 1 ) ) 1553 1556 1554 1557 dist_xz(k,i,3) = MIN( ( SQRT(a33(k) / MAXVAL(a33) ) & … … 1558 1561 + a33(k) * fw_xz(k,i) ), 3.0_wp ) * & 1559 1562 MERGE( 1.0_wp, 0.0_wp, & 1560 BTEST( wall_flags_ 0(k,j,i), 3 ) )1563 BTEST( wall_flags_static_0(k,j,i), 3 ) ) 1561 1564 ENDDO 1562 1565 ENDDO … … 1579 1582 mc_factor_l(2) = SUM( dist_xz(nzb:nzt,nxl:nxr,2) & 1580 1583 * MERGE( 1.0_wp, 0.0_wp, & 1581 BTEST( wall_flags_ 0(nzb:nzt,j,nxl:nxr), 2 ) ) )1584 BTEST( wall_flags_static_0(nzb:nzt,j,nxl:nxr), 2 ) ) ) 1582 1585 1583 1586 IF ( myidy == id_stg_south ) j = nys-1 … … 1586 1589 mc_factor_l(1) = SUM( dist_xz(nzb:nzt,nxlu:nxr,1) & 1587 1590 * MERGE( 1.0_wp, 0.0_wp, & 1588 BTEST( wall_flags_ 0(nzb:nzt,j,nxlu:nxr), 1 ) ) )1591 BTEST( wall_flags_static_0(nzb:nzt,j,nxlu:nxr), 1 ) ) ) 1589 1592 mc_factor_l(3) = SUM( dist_xz(nzb:nzt,nxl:nxr,3) & 1590 1593 * MERGE( 1.0_wp, 0.0_wp, & 1591 BTEST( wall_flags_ 0(nzb:nzt,j,nxl:nxr), 3 ) ) )1594 BTEST( wall_flags_static_0(nzb:nzt,j,nxl:nxr), 3 ) ) ) 1592 1595 1593 1596 #if defined( __parallel ) … … 1605 1608 dist_xz(:,:,2) = ( dist_xz(:,:,2) - mc_factor(2) ) & 1606 1609 * MERGE( 1.0_wp, 0.0_wp, & 1607 BTEST( wall_flags_ 0(:,j,:), 2 ) )1610 BTEST( wall_flags_static_0(:,j,:), 2 ) ) 1608 1611 1609 1612 … … 1613 1616 dist_xz(:,:,1) = ( dist_xz(:,:,1) - mc_factor(1) ) & 1614 1617 * MERGE( 1.0_wp, 0.0_wp, & 1615 BTEST( wall_flags_ 0(:,j,:), 1 ) )1618 BTEST( wall_flags_static_0(:,j,:), 1 ) ) 1616 1619 1617 1620 dist_xz(:,:,3) = ( dist_xz(:,:,3) - mc_factor(3) ) & 1618 1621 * MERGE( 1.0_wp, 0.0_wp, & 1619 BTEST( wall_flags_ 0(:,j,:), 3 ) )1622 BTEST( wall_flags_static_0(:,j,:), 3 ) ) 1620 1623 ! 1621 1624 !-- Add disturbances … … 1625 1628 u(k,-1,i) = ( u(k,-1,i) + dist_xz(k,i,1) ) & 1626 1629 * MERGE( 1.0_wp, 0.0_wp, & 1627 BTEST( wall_flags_ 0(k,-1,i), 1 ) )1630 BTEST( wall_flags_static_0(k,-1,i), 1 ) ) 1628 1631 v(k,0,i) = ( v(k,0,i) + dist_xz(k,i,2) ) & 1629 1632 * MERGE( 1.0_wp, 0.0_wp, & 1630 BTEST( wall_flags_ 0(k,0,i), 2 ) )1633 BTEST( wall_flags_static_0(k,0,i), 2 ) ) 1631 1634 v(k,-1,i) = v(k,0,i) 1632 1635 w(k,-1,i) = ( w(k,-1,i) + dist_xz(k,i,3) ) & 1633 1636 * MERGE( 1.0_wp, 0.0_wp, & 1634 BTEST( wall_flags_ 0(k,-1,i), 3 ) )1637 BTEST( wall_flags_static_0(k,-1,i), 3 ) ) 1635 1638 ENDDO 1636 1639 ENDDO … … 1642 1645 u(k,nyn+1,i) = ( u(k,nyn+1,i) + dist_xz(k,i,1) ) & 1643 1646 * MERGE( 1.0_wp, 0.0_wp, & 1644 BTEST( wall_flags_ 0(k,nyn+1,i), 1 ) )1647 BTEST( wall_flags_static_0(k,nyn+1,i), 1 ) ) 1645 1648 v(k,nyn+1,i) = ( v(k,nyn+1,i) + dist_xz(k,i,2) ) & 1646 1649 * MERGE( 1.0_wp, 0.0_wp, & 1647 BTEST( wall_flags_ 0(k,nyn+1,i), 2 ) )1650 BTEST( wall_flags_static_0(k,nyn+1,i), 2 ) ) 1648 1651 w(k,nyn+1,i) = ( w(k,nyn+1,i) + dist_xz(k,i,3) ) & 1649 1652 * MERGE( 1.0_wp, 0.0_wp, & 1650 BTEST( wall_flags_ 0(k,nyn+1,i), 3 ) )1653 BTEST( wall_flags_static_0(k,nyn+1,i), 3 ) ) 1651 1654 ENDDO 1652 1655 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.