Changeset 4346 for palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90
- Timestamp:
- Dec 18, 2019 11:55:56 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90
r4335 r4346 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Introduction of wall_flags_total_0, which currently sets bits based on static 28 ! topography information used in wall_flags_static_0 29 ! 30 ! 4335 2019-12-12 16:39:05Z suehring 27 31 ! Commentation of last commit 28 32 ! … … 204 208 nyng, & 205 209 nysg, & 206 wall_flags_ static_0210 wall_flags_total_0 207 211 208 212 USE kinds … … 986 990 nr_non_topo_yz_l(1) = SUM( & 987 991 MERGE( 1, 0, & 988 BTEST( wall_flags_static_0(nzb:nzt,nys:nyn,i), 1 ) ) )992 BTEST( wall_flags_total_0(nzb:nzt,nys:nyn,i), 1 ) ) ) 989 993 ! 990 994 !-- Number of grid points where perturbations are imposed on v and w … … 994 998 nr_non_topo_yz_l(2) = SUM( & 995 999 MERGE( 1, 0, & 996 BTEST( wall_flags_static_0(nzb:nzt,nysv:nyn,i), 2 ) ) )1000 BTEST( wall_flags_total_0(nzb:nzt,nysv:nyn,i), 2 ) ) ) 997 1001 nr_non_topo_yz_l(3) = SUM( & 998 1002 MERGE( 1, 0, & 999 BTEST( wall_flags_static_0(nzb:nzt,nys:nyn,i), 3 ) ) )1003 BTEST( wall_flags_total_0(nzb:nzt,nys:nyn,i), 3 ) ) ) 1000 1004 1001 1005 #if defined( __parallel ) … … 1015 1019 nr_non_topo_xz_l(2) = SUM( & 1016 1020 MERGE( 1, 0, & 1017 BTEST( wall_flags_static_0(nzb:nzt,j,nxl:nxr), 2 ) ) )1021 BTEST( wall_flags_total_0(nzb:nzt,j,nxl:nxr), 2 ) ) ) 1018 1022 ! 1019 1023 !-- Number of grid points where perturbations are imposed on u and w … … 1023 1027 nr_non_topo_xz_l(1) = SUM( & 1024 1028 MERGE( 1, 0, & 1025 BTEST( wall_flags_static_0(nzb:nzt,j,nxlu:nxr), 1 ) ) )1029 BTEST( wall_flags_total_0(nzb:nzt,j,nxlu:nxr), 1 ) ) ) 1026 1030 nr_non_topo_xz_l(3) = SUM( & 1027 1031 MERGE( 1, 0, & 1028 BTEST( wall_flags_static_0(nzb:nzt,j,nxl:nxr), 3 ) ) )1032 BTEST( wall_flags_total_0(nzb:nzt,j,nxl:nxr), 3 ) ) ) 1029 1033 1030 1034 #if defined( __parallel ) … … 1351 1355 dist_yz(k,j,1) = MIN( a11(k) * fu_yz(k,j), 3.0_wp ) * & 1352 1356 MERGE( 1.0_wp, 0.0_wp, & 1353 BTEST( wall_flags_static_0(k,j,i), 1 ) )1357 BTEST( wall_flags_total_0(k,j,i), 1 ) ) 1354 1358 ENDDO 1355 1359 ENDDO … … 1368 1372 + a22(k) * fv_yz(k,j) ), 3.0_wp ) * & 1369 1373 MERGE( 1.0_wp, 0.0_wp, & 1370 BTEST( wall_flags_static_0(k,j,i), 2 ) )1374 BTEST( wall_flags_total_0(k,j,i), 2 ) ) 1371 1375 dist_yz(k,j,3) = MIN( ( SQRT(a33(k) / MAXVAL(a33) ) & 1372 1376 * 1.3_wp ) & … … 1375 1379 + a33(k) * fw_yz(k,j) ), 3.0_wp ) * & 1376 1380 MERGE( 1.0_wp, 0.0_wp, & 1377 BTEST( wall_flags_static_0(k,j,i), 3 ) )1381 BTEST( wall_flags_total_0(k,j,i), 3 ) ) 1378 1382 ENDDO 1379 1383 ENDDO … … 1398 1402 mc_factor_l(1) = SUM( dist_yz(nzb:nzt,nys:nyn,1) & 1399 1403 * MERGE( 1.0_wp, 0.0_wp, & 1400 BTEST( wall_flags_static_0(nzb:nzt,nys:nyn,i), 1 ) ) )1404 BTEST( wall_flags_total_0(nzb:nzt,nys:nyn,i), 1 ) ) ) 1401 1405 1402 1406 IF ( myidx == id_stg_left ) i = nxl-1 … … 1405 1409 mc_factor_l(2) = SUM( dist_yz(nzb:nzt,nysv:nyn,2) & 1406 1410 * MERGE( 1.0_wp, 0.0_wp, & 1407 BTEST( wall_flags_static_0(nzb:nzt,nysv:nyn,i), 2 ) ) )1411 BTEST( wall_flags_total_0(nzb:nzt,nysv:nyn,i), 2 ) ) ) 1408 1412 mc_factor_l(3) = SUM( dist_yz(nzb:nzt,nys:nyn,3) & 1409 1413 * MERGE( 1.0_wp, 0.0_wp, & 1410 BTEST( wall_flags_static_0(nzb:nzt,nys:nyn,i), 3 ) ) )1414 BTEST( wall_flags_total_0(nzb:nzt,nys:nyn,i), 3 ) ) ) 1411 1415 1412 1416 #if defined( __parallel ) … … 1425 1429 dist_yz(:,:,1) = ( dist_yz(:,:,1) - mc_factor(1) ) & 1426 1430 * MERGE( 1.0_wp, 0.0_wp, & 1427 BTEST( wall_flags_static_0(:,:,i), 1 ) )1431 BTEST( wall_flags_total_0(:,:,i), 1 ) ) 1428 1432 1429 1433 … … 1433 1437 dist_yz(:,:,2) = ( dist_yz(:,:,2) - mc_factor(2) ) & 1434 1438 * MERGE( 1.0_wp, 0.0_wp, & 1435 BTEST( wall_flags_static_0(:,:,i), 2 ) )1439 BTEST( wall_flags_total_0(:,:,i), 2 ) ) 1436 1440 1437 1441 dist_yz(:,:,3) = ( dist_yz(:,:,3) - mc_factor(3) ) & 1438 1442 * MERGE( 1.0_wp, 0.0_wp, & 1439 BTEST( wall_flags_static_0(:,:,i), 3 ) )1443 BTEST( wall_flags_total_0(:,:,i), 3 ) ) 1440 1444 ! 1441 1445 !-- Add disturbances … … 1453 1457 dist_yz(k,j,1) ) & 1454 1458 * MERGE( 1.0_wp, 0.0_wp, & 1455 BTEST( wall_flags_static_0(k,j,0), 1 ) )1459 BTEST( wall_flags_total_0(k,j,0), 1 ) ) 1456 1460 v(k,j,-nbgp:-1) = ( mean_inflow_profiles(k,2) + & 1457 1461 dist_yz(k,j,2) ) & 1458 1462 * MERGE( 1.0_wp, 0.0_wp, & 1459 BTEST( wall_flags_static_0(k,j,-1), 2 ) )1463 BTEST( wall_flags_total_0(k,j,-1), 2 ) ) 1460 1464 w(k,j,-nbgp:-1) = dist_yz(k,j,3) & 1461 1465 * MERGE( 1.0_wp, 0.0_wp, & 1462 BTEST( wall_flags_static_0(k,j,-1), 3 ) )1466 BTEST( wall_flags_total_0(k,j,-1), 3 ) ) 1463 1467 ENDDO 1464 1468 ENDDO … … 1469 1473 u(k,j,0) = ( u(k,j,0) + dist_yz(k,j,1) ) & 1470 1474 * MERGE( 1.0_wp, 0.0_wp, & 1471 BTEST( wall_flags_static_0(k,j,0), 1 ) )1475 BTEST( wall_flags_total_0(k,j,0), 1 ) ) 1472 1476 u(k,j,-1) = u(k,j,0) 1473 1477 v(k,j,-1) = ( v(k,j,-1) + dist_yz(k,j,2) ) & 1474 1478 * MERGE( 1.0_wp, 0.0_wp, & 1475 BTEST( wall_flags_static_0(k,j,-1), 2 ) )1479 BTEST( wall_flags_total_0(k,j,-1), 2 ) ) 1476 1480 w(k,j,-1) = ( w(k,j,-1) + dist_yz(k,j,3) ) & 1477 1481 * MERGE( 1.0_wp, 0.0_wp, & 1478 BTEST( wall_flags_static_0(k,j,-1), 3 ) )1482 BTEST( wall_flags_total_0(k,j,-1), 3 ) ) 1479 1483 ENDDO 1480 1484 ENDDO … … 1486 1490 u(k,j,nxr+1) = ( u(k,j,nxr+1) + dist_yz(k,j,1) ) & 1487 1491 * MERGE( 1.0_wp, 0.0_wp, & 1488 BTEST( wall_flags_static_0(k,j,nxr+1), 1 ) )1492 BTEST( wall_flags_total_0(k,j,nxr+1), 1 ) ) 1489 1493 v(k,j,nxr+1) = ( v(k,j,nxr+1) + dist_yz(k,j,2) ) & 1490 1494 * MERGE( 1.0_wp, 0.0_wp, & 1491 BTEST( wall_flags_static_0(k,j,nxr+1), 2 ) )1495 BTEST( wall_flags_total_0(k,j,nxr+1), 2 ) ) 1492 1496 w(k,j,nxr+1) = ( w(k,j,nxr+1) + dist_yz(k,j,3) ) & 1493 1497 * MERGE( 1.0_wp, 0.0_wp, & 1494 BTEST( wall_flags_static_0(k,j,nxr+1), 3 ) )1498 BTEST( wall_flags_total_0(k,j,nxr+1), 3 ) ) 1495 1499 ENDDO 1496 1500 ENDDO … … 1551 1555 + a22(k) * fv_xz(k,i) ), 3.0_wp ) * & 1552 1556 MERGE( 1.0_wp, 0.0_wp, & 1553 BTEST( wall_flags_static_0(k,j,i), 2 ) )1557 BTEST( wall_flags_total_0(k,j,i), 2 ) ) 1554 1558 ENDDO 1555 1559 ENDDO … … 1564 1568 dist_xz(k,i,1) = MIN( a11(k) * fu_xz(k,i), 3.0_wp ) * & 1565 1569 MERGE( 1.0_wp, 0.0_wp, & 1566 BTEST( wall_flags_static_0(k,j,i), 1 ) )1570 BTEST( wall_flags_total_0(k,j,i), 1 ) ) 1567 1571 1568 1572 dist_xz(k,i,3) = MIN( ( SQRT(a33(k) / MAXVAL(a33) ) & … … 1572 1576 + a33(k) * fw_xz(k,i) ), 3.0_wp ) * & 1573 1577 MERGE( 1.0_wp, 0.0_wp, & 1574 BTEST( wall_flags_static_0(k,j,i), 3 ) )1578 BTEST( wall_flags_total_0(k,j,i), 3 ) ) 1575 1579 ENDDO 1576 1580 ENDDO … … 1593 1597 mc_factor_l(2) = SUM( dist_xz(nzb:nzt,nxl:nxr,2) & 1594 1598 * MERGE( 1.0_wp, 0.0_wp, & 1595 BTEST( wall_flags_static_0(nzb:nzt,j,nxl:nxr), 2 ) ) )1599 BTEST( wall_flags_total_0(nzb:nzt,j,nxl:nxr), 2 ) ) ) 1596 1600 1597 1601 IF ( myidy == id_stg_south ) j = nys-1 … … 1600 1604 mc_factor_l(1) = SUM( dist_xz(nzb:nzt,nxlu:nxr,1) & 1601 1605 * MERGE( 1.0_wp, 0.0_wp, & 1602 BTEST( wall_flags_static_0(nzb:nzt,j,nxlu:nxr), 1 ) ) )1606 BTEST( wall_flags_total_0(nzb:nzt,j,nxlu:nxr), 1 ) ) ) 1603 1607 mc_factor_l(3) = SUM( dist_xz(nzb:nzt,nxl:nxr,3) & 1604 1608 * MERGE( 1.0_wp, 0.0_wp, & 1605 BTEST( wall_flags_static_0(nzb:nzt,j,nxl:nxr), 3 ) ) )1609 BTEST( wall_flags_total_0(nzb:nzt,j,nxl:nxr), 3 ) ) ) 1606 1610 1607 1611 #if defined( __parallel ) … … 1619 1623 dist_xz(:,:,2) = ( dist_xz(:,:,2) - mc_factor(2) ) & 1620 1624 * MERGE( 1.0_wp, 0.0_wp, & 1621 BTEST( wall_flags_static_0(:,j,:), 2 ) )1625 BTEST( wall_flags_total_0(:,j,:), 2 ) ) 1622 1626 1623 1627 … … 1627 1631 dist_xz(:,:,1) = ( dist_xz(:,:,1) - mc_factor(1) ) & 1628 1632 * MERGE( 1.0_wp, 0.0_wp, & 1629 BTEST( wall_flags_static_0(:,j,:), 1 ) )1633 BTEST( wall_flags_total_0(:,j,:), 1 ) ) 1630 1634 1631 1635 dist_xz(:,:,3) = ( dist_xz(:,:,3) - mc_factor(3) ) & 1632 1636 * MERGE( 1.0_wp, 0.0_wp, & 1633 BTEST( wall_flags_static_0(:,j,:), 3 ) )1637 BTEST( wall_flags_total_0(:,j,:), 3 ) ) 1634 1638 ! 1635 1639 !-- Add disturbances … … 1639 1643 u(k,-1,i) = ( u(k,-1,i) + dist_xz(k,i,1) ) & 1640 1644 * MERGE( 1.0_wp, 0.0_wp, & 1641 BTEST( wall_flags_static_0(k,-1,i), 1 ) )1645 BTEST( wall_flags_total_0(k,-1,i), 1 ) ) 1642 1646 v(k,0,i) = ( v(k,0,i) + dist_xz(k,i,2) ) & 1643 1647 * MERGE( 1.0_wp, 0.0_wp, & 1644 BTEST( wall_flags_static_0(k,0,i), 2 ) )1648 BTEST( wall_flags_total_0(k,0,i), 2 ) ) 1645 1649 v(k,-1,i) = v(k,0,i) 1646 1650 w(k,-1,i) = ( w(k,-1,i) + dist_xz(k,i,3) ) & 1647 1651 * MERGE( 1.0_wp, 0.0_wp, & 1648 BTEST( wall_flags_static_0(k,-1,i), 3 ) )1652 BTEST( wall_flags_total_0(k,-1,i), 3 ) ) 1649 1653 ENDDO 1650 1654 ENDDO … … 1656 1660 u(k,nyn+1,i) = ( u(k,nyn+1,i) + dist_xz(k,i,1) ) & 1657 1661 * MERGE( 1.0_wp, 0.0_wp, & 1658 BTEST( wall_flags_static_0(k,nyn+1,i), 1 ) )1662 BTEST( wall_flags_total_0(k,nyn+1,i), 1 ) ) 1659 1663 v(k,nyn+1,i) = ( v(k,nyn+1,i) + dist_xz(k,i,2) ) & 1660 1664 * MERGE( 1.0_wp, 0.0_wp, & 1661 BTEST( wall_flags_static_0(k,nyn+1,i), 2 ) )1665 BTEST( wall_flags_total_0(k,nyn+1,i), 2 ) ) 1662 1666 w(k,nyn+1,i) = ( w(k,nyn+1,i) + dist_xz(k,i,3) ) & 1663 1667 * MERGE( 1.0_wp, 0.0_wp, & 1664 BTEST( wall_flags_static_0(k,nyn+1,i), 3 ) )1668 BTEST( wall_flags_total_0(k,nyn+1,i), 3 ) ) 1665 1669 ENDDO 1666 1670 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.