Changeset 4346 for palm/trunk/SOURCE/init_3d_model.f90
- Timestamp:
- Dec 18, 2019 11:55:56 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/init_3d_model.f90
r4329 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 ! 4329 2019-12-10 15:46:36Z motisi 27 31 ! Renamed wall_flags_0 to wall_flags_static_0 28 32 ! … … 777 781 !-- Set velocity components at non-atmospheric / oceanic grid points to 778 782 !-- zero. 779 u = MERGE( u, 0.0_wp, BTEST( wall_flags_ static_0, 1 ) )780 v = MERGE( v, 0.0_wp, BTEST( wall_flags_ static_0, 2 ) )781 w = MERGE( w, 0.0_wp, BTEST( wall_flags_ static_0, 3 ) )783 u = MERGE( u, 0.0_wp, BTEST( wall_flags_total_0, 1 ) ) 784 v = MERGE( v, 0.0_wp, BTEST( wall_flags_total_0, 2 ) ) 785 w = MERGE( w, 0.0_wp, BTEST( wall_flags_total_0, 3 ) ) 782 786 ! 783 787 !-- Initialize surface variables, e.g. friction velocity, momentum … … 827 831 ! 828 832 !-- Set velocities back to zero 829 u = MERGE( u, 0.0_wp, BTEST( wall_flags_ static_0, 1 ) )830 v = MERGE( v, 0.0_wp, BTEST( wall_flags_ static_0, 2 ) )833 u = MERGE( u, 0.0_wp, BTEST( wall_flags_total_0, 1 ) ) 834 v = MERGE( v, 0.0_wp, BTEST( wall_flags_total_0, 2 ) ) 831 835 ! 832 836 !-- WARNING: The extra boundary conditions set after running the … … 871 875 ! 872 876 !-- Mask topography 873 u = MERGE( u, 0.0_wp, BTEST( wall_flags_ static_0, 1 ) )874 v = MERGE( v, 0.0_wp, BTEST( wall_flags_ static_0, 2 ) )877 u = MERGE( u, 0.0_wp, BTEST( wall_flags_total_0, 1 ) ) 878 v = MERGE( v, 0.0_wp, BTEST( wall_flags_total_0, 2 ) ) 875 879 ! 876 880 !-- Set initial horizontal velocities at the lowest computational grid … … 887 891 DO k = nzb, nzt 888 892 u(k,j,i) = MERGE( u(k,j,i), 0.0_wp, & 889 BTEST( wall_flags_static_0(k,j,i), 20 ) )893 BTEST( wall_flags_total_0(k,j,i), 20 ) ) 890 894 v(k,j,i) = MERGE( v(k,j,i), 0.0_wp, & 891 BTEST( wall_flags_static_0(k,j,i), 21 ) )895 BTEST( wall_flags_total_0(k,j,i), 21 ) ) 892 896 ENDDO 893 897 ENDDO … … 1313 1317 DO k = nzb, nzt 1314 1318 u(k,j,i) = MERGE( u(k,j,i), 0.0_wp, & 1315 BTEST( wall_flags_static_0(k,j,i), 1 ) )1319 BTEST( wall_flags_total_0(k,j,i), 1 ) ) 1316 1320 v(k,j,i) = MERGE( v(k,j,i), 0.0_wp, & 1317 BTEST( wall_flags_static_0(k,j,i), 2 ) )1321 BTEST( wall_flags_total_0(k,j,i), 2 ) ) 1318 1322 w(k,j,i) = MERGE( w(k,j,i), 0.0_wp, & 1319 BTEST( wall_flags_static_0(k,j,i), 3 ) )1323 BTEST( wall_flags_total_0(k,j,i), 3 ) ) 1320 1324 ENDDO 1321 1325 ENDDO … … 1395 1399 DO j = nys, nyn 1396 1400 DO k = nzb+1, nzt 1397 volume_flow_initial_l(1) = volume_flow_initial_l(1) + &1398 u_init(k) * dzw(k) &1399 * MERGE( 1.0_wp, 0.0_wp, &1400 BTEST( wall_flags_static_0(k,j,nxr), 1 )&1401 volume_flow_initial_l(1) = volume_flow_initial_l(1) + & 1402 u_init(k) * dzw(k) & 1403 * MERGE( 1.0_wp, 0.0_wp, & 1404 BTEST( wall_flags_total_0(k,j,nxr), 1 )& 1401 1405 ) 1402 1406 1403 volume_flow_area_l(1) = volume_flow_area_l(1) + dzw(k) &1404 * MERGE( 1.0_wp, 0.0_wp, &1405 BTEST( wall_flags_static_0(k,j,nxr), 1 )&1407 volume_flow_area_l(1) = volume_flow_area_l(1) + dzw(k) & 1408 * MERGE( 1.0_wp, 0.0_wp, & 1409 BTEST( wall_flags_total_0(k,j,nxr), 1 )& 1406 1410 ) 1407 1411 ENDDO … … 1412 1416 DO i = nxl, nxr 1413 1417 DO k = nzb+1, nzt 1414 volume_flow_initial_l(2) = volume_flow_initial_l(2) + &1415 v_init(k) * dzw(k) &1416 * MERGE( 1.0_wp, 0.0_wp, &1417 BTEST( wall_flags_static_0(k,nyn,i), 2 )&1418 volume_flow_initial_l(2) = volume_flow_initial_l(2) + & 1419 v_init(k) * dzw(k) & 1420 * MERGE( 1.0_wp, 0.0_wp, & 1421 BTEST( wall_flags_total_0(k,nyn,i), 2 )& 1418 1422 ) 1419 volume_flow_area_l(2) = volume_flow_area_l(2) + dzw(k) &1420 * MERGE( 1.0_wp, 0.0_wp, &1421 BTEST( wall_flags_static_0(k,nyn,i), 2 )&1423 volume_flow_area_l(2) = volume_flow_area_l(2) + dzw(k) & 1424 * MERGE( 1.0_wp, 0.0_wp, & 1425 BTEST( wall_flags_total_0(k,nyn,i), 2 )& 1422 1426 ) 1423 1427 ENDDO … … 1444 1448 DO j = nys, nyn 1445 1449 DO k = nzb+1, nzt 1446 volume_flow_initial_l(1) = volume_flow_initial_l(1) + &1447 hom_sum(k,1,0) * dzw(k) &1448 * MERGE( 1.0_wp, 0.0_wp, &1449 BTEST( wall_flags_static_0(k,j,nx), 1 ) &1450 volume_flow_initial_l(1) = volume_flow_initial_l(1) + & 1451 hom_sum(k,1,0) * dzw(k) & 1452 * MERGE( 1.0_wp, 0.0_wp, & 1453 BTEST( wall_flags_total_0(k,j,nx), 1 ) & 1450 1454 ) 1451 volume_flow_area_l(1) = volume_flow_area_l(1) + dzw(k) &1452 * MERGE( 1.0_wp, 0.0_wp, &1453 BTEST( wall_flags_static_0(k,j,nx), 1 ) &1455 volume_flow_area_l(1) = volume_flow_area_l(1) + dzw(k) & 1456 * MERGE( 1.0_wp, 0.0_wp, & 1457 BTEST( wall_flags_total_0(k,j,nx), 1 ) & 1454 1458 ) 1455 1459 ENDDO … … 1460 1464 DO i = nxl, nxr 1461 1465 DO k = nzb+1, nzt 1462 volume_flow_initial_l(2) = volume_flow_initial_l(2) + &1463 hom_sum(k,2,0) * dzw(k) &1464 * MERGE( 1.0_wp, 0.0_wp, &1465 BTEST( wall_flags_static_0(k,ny,i), 2 ) &1466 volume_flow_initial_l(2) = volume_flow_initial_l(2) + & 1467 hom_sum(k,2,0) * dzw(k) & 1468 * MERGE( 1.0_wp, 0.0_wp, & 1469 BTEST( wall_flags_total_0(k,ny,i), 2 ) & 1466 1470 ) 1467 volume_flow_area_l(2) = volume_flow_area_l(2) + dzw(k) &1468 * MERGE( 1.0_wp, 0.0_wp, &1469 BTEST( wall_flags_static_0(k,ny,i), 2 ) &1471 volume_flow_area_l(2) = volume_flow_area_l(2) + dzw(k) & 1472 * MERGE( 1.0_wp, 0.0_wp, & 1473 BTEST( wall_flags_total_0(k,ny,i), 2 ) & 1470 1474 ) 1471 1475 ENDDO … … 1492 1496 DO j = nys, nyn 1493 1497 DO k = nzb+1, nzt 1494 volume_flow_initial_l(1) = volume_flow_initial_l(1) + &1495 u(k,j,nx) * dzw(k) &1496 * MERGE( 1.0_wp, 0.0_wp, &1497 BTEST( wall_flags_static_0(k,j,nx), 1 ) &1498 volume_flow_initial_l(1) = volume_flow_initial_l(1) + & 1499 u(k,j,nx) * dzw(k) & 1500 * MERGE( 1.0_wp, 0.0_wp, & 1501 BTEST( wall_flags_total_0(k,j,nx), 1 ) & 1498 1502 ) 1499 volume_flow_area_l(1) = volume_flow_area_l(1) + dzw(k) &1500 * MERGE( 1.0_wp, 0.0_wp, &1501 BTEST( wall_flags_static_0(k,j,nx), 1 ) &1503 volume_flow_area_l(1) = volume_flow_area_l(1) + dzw(k) & 1504 * MERGE( 1.0_wp, 0.0_wp, & 1505 BTEST( wall_flags_total_0(k,j,nx), 1 ) & 1502 1506 ) 1503 1507 ENDDO … … 1508 1512 DO i = nxl, nxr 1509 1513 DO k = nzb+1, nzt 1510 volume_flow_initial_l(2) = volume_flow_initial_l(2) + &1511 v(k,ny,i) * dzw(k) &1512 * MERGE( 1.0_wp, 0.0_wp, &1513 BTEST( wall_flags_static_0(k,ny,i), 2 ) &1514 volume_flow_initial_l(2) = volume_flow_initial_l(2) + & 1515 v(k,ny,i) * dzw(k) & 1516 * MERGE( 1.0_wp, 0.0_wp, & 1517 BTEST( wall_flags_total_0(k,ny,i), 2 ) & 1514 1518 ) 1515 volume_flow_area_l(2) = volume_flow_area_l(2) + dzw(k) &1516 * MERGE( 1.0_wp, 0.0_wp, &1517 BTEST( wall_flags_static_0(k,ny,i), 2 ) &1519 volume_flow_area_l(2) = volume_flow_area_l(2) + dzw(k) & 1520 * MERGE( 1.0_wp, 0.0_wp, & 1521 BTEST( wall_flags_total_0(k,ny,i), 2 ) & 1518 1522 ) 1519 1523 ENDDO … … 1696 1700 !-- xy-grid points above topography 1697 1701 ngp_2dh_outer_l(k,sr) = ngp_2dh_outer_l(k,sr) + & 1698 MERGE( 1, 0, BTEST( wall_flags_static_0(k,j,i), 24 ) )1702 MERGE( 1, 0, BTEST( wall_flags_total_0(k,j,i), 24 ) ) 1699 1703 1700 1704 ngp_2dh_s_inner_l(k,sr) = ngp_2dh_s_inner_l(k,sr) + & 1701 MERGE( 1, 0, BTEST( wall_flags_static_0(k,j,i), 22 ) )1705 MERGE( 1, 0, BTEST( wall_flags_total_0(k,j,i), 22 ) ) 1702 1706 1703 1707 ENDDO … … 1795 1799 !$ACC COPYIN(rho_air(nzb:nzt+1), rho_air_zw(nzb:nzt+1)) & 1796 1800 !$ACC COPYIN(ddzu(1:nzt+1), ddzw(1:nzt+1)) & 1797 !$ACC COPYIN(wall_flags_ static_0(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) &1801 !$ACC COPYIN(wall_flags_total_0(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) & 1798 1802 !$ACC COPYIN(bc_h(0:1)) & 1799 1803 !$ACC COPYIN(bc_h(0)%i(1:bc_h(0)%ns)) &
Note: See TracChangeset
for help on using the changeset viewer.