@@ -315,7 +315,7 @@ subroutine CorAdCalc(u, v, h, uh, vh, CAu, CAv, OBC, AD, G, GV, US, CS, pbv, Wav
315
315
316
316
! $OMP parallel do default(private) shared(u,v,h,uh,vh,CAu,CAv,G,GV,CS,AD,Area_h,Area_q,&
317
317
! $OMP RV,PV,is,ie,js,je,Isq,Ieq,Jsq,Jeq,nz,vol_neglect,h_tiny,OBC,eps_vel, &
318
- ! $OMP area_neglect, pbv, Stokes_VF)
318
+ ! $OMP area_neglect, pbv, Stokes_VF, stencil )
319
319
do k= 1 ,nz
320
320
321
321
Isq = G% IscB - stencil + 2
@@ -1519,7 +1519,7 @@ subroutine weno_three_h_weight_reconstruction(q4, h4, u4, &
1519
1519
w1 = C1_3 * fac_fn(tau, b1)
1520
1520
1521
1521
s = 1 . / (w0 + w1)
1522
- w0 = w0 * s
1522
+ w0 = w0 * s ! Weights of stencils
1523
1523
w1 = w1 * s
1524
1524
1525
1525
vr = w0 * c0 + w1 * c1
@@ -1531,10 +1531,10 @@ subroutine weno_three_h_weight_reconstruction(q4, h4, u4, &
1531
1531
1532
1532
end subroutine weno_three_h_weight_reconstruction
1533
1533
1534
- ! > Compute weights for the two-point stencil of the third-order WENO scheme
1534
+ ! > Compute the smoothness indicator for the two-point stencil of the third-order WENO scheme
1535
1535
subroutine weno_three_weight (q2 , w0 )
1536
1536
real , intent (in ) :: q2(2 ) ! < Tracer values on the two-point stencil [A ~> a]
1537
- real , intent (inout ) :: w0 ! < Weight for this stencil [A2 ~> a2]
1537
+ real , intent (inout ) :: w0 ! < Smoothness indicator for this stencil [A2 ~> a2]
1538
1538
1539
1539
w0 = q2(1 ) * q2(1 ) - 2 * q2(1 ) * q2(2 ) + q2(2 ) * q2(2 )
1540
1540
@@ -1628,7 +1628,7 @@ subroutine weno_five_h_weight_reconstruction(q6, h6, u6, &
1628
1628
w2 = C1_10 * fac_fn(tau, b2)
1629
1629
1630
1630
s = 1 . / (w0 + w1 + w2)
1631
- w0 = w0 * s
1631
+ w0 = w0 * s ! Weights of stencils
1632
1632
w1 = w1 * s
1633
1633
w2 = w2 * s
1634
1634
@@ -1641,30 +1641,30 @@ subroutine weno_five_h_weight_reconstruction(q6, h6, u6, &
1641
1641
1642
1642
end subroutine weno_five_h_weight_reconstruction
1643
1643
1644
- ! > Compute weights for the third upwind stencil of the fifth-order WENO scheme
1644
+ ! > Compute the smoothness indicator for the third upwind stencil of the fifth-order WENO scheme
1645
1645
subroutine weno_five_weight_0 (q3 , w0 )
1646
1646
real , intent (in ) :: q3(3 ) ! < Tracer values on the three-point stencil [A ~> a]
1647
- real , intent (inout ) :: w0 ! < Weight for this stencil [A2 ~> a2]
1647
+ real , intent (inout ) :: w0 ! < Smoothness indicator for this stencil [A2 ~> a2]
1648
1648
1649
1649
w0 = q3(1 ) * (10 * q3(1 ) - 31 * q3(2 ) + 11 * q3(3 )) + &
1650
1650
q3(2 ) * (25 * q3(2 ) - 19 * q3(3 )) + 4 * q3(3 ) * q3(3 )
1651
1651
1652
1652
end subroutine weno_five_weight_0
1653
1653
1654
- ! > Compute weights for the second upwind stencil of the fifth-order WENO scheme
1654
+ ! > Compute the smoothness indicator for the second upwind stencil of the fifth-order WENO scheme
1655
1655
subroutine weno_five_weight_1 (q3 , w1 )
1656
1656
real , intent (in ) :: q3(3 ) ! < Tracer values on the three-point stencil [A ~> a]
1657
- real , intent (inout ) :: w1 ! < Weight for this stencil [A2 ~> a2]
1657
+ real , intent (inout ) :: w1 ! < Smoothness indicator for this stencil [A2 ~> a2]
1658
1658
1659
1659
w1 = q3(1 ) * (4 * q3(1 ) - 13 * q3(2 ) + 5 * q3(3 )) + &
1660
1660
q3(2 ) * (13 * q3(2 ) - 13 * q3(3 )) + 4 * q3(3 ) * q3(3 )
1661
1661
1662
1662
end subroutine weno_five_weight_1
1663
1663
1664
- ! > Compute weights for the first upwind stencil of the fifth-order WENO scheme
1664
+ ! > Compute the smoothness indicator for the first upwind stencil of the fifth-order WENO scheme
1665
1665
subroutine weno_five_weight_2 (q3 , w2 )
1666
1666
real , intent (in ) :: q3(3 ) ! < Tracer values on the three-point stencil [A ~> a]
1667
- real , intent (inout ) :: w2 ! < Weight for this stencil [A2 ~> a2]
1667
+ real , intent (inout ) :: w2 ! < Smoothness indicator for this stencil [A2 ~> a2]
1668
1668
1669
1669
w2 = q3(1 ) * (4 * q3(1 ) - 19 * q3(2 ) + 11 * q3(3 )) + &
1670
1670
q3(2 ) * (25 * q3(2 ) - 31 * q3(3 )) + 10 * q3(3 ) * q3(3 )
@@ -1781,7 +1781,7 @@ subroutine weno_seven_h_weight_reconstruction(q8, h8, u8, &
1781
1781
w3 = C1_35 * fac_fn(tau, b3)
1782
1782
1783
1783
s = 1 . / (w0 + w1 + w2 + w3)
1784
- w0 = w0 * s
1784
+ w0 = w0 * s ! Weights of the stencils
1785
1785
w1 = w1 * s
1786
1786
w2 = w2 * s
1787
1787
w3 = w3 * s
@@ -1797,44 +1797,48 @@ subroutine weno_seven_h_weight_reconstruction(q8, h8, u8, &
1797
1797
1798
1798
end subroutine weno_seven_h_weight_reconstruction
1799
1799
1800
- ! > Compute weights for the fourth upwind stencil of the seventh-order WENO scheme
1800
+ ! > Compute the smoothness indicator for the fourth upwind stencil of the seventh-order WENO scheme
1801
1801
subroutine weno_seven_weight_0 (q4 , w0 )
1802
1802
real , intent (in ) :: q4(4 ) ! < Tracer values on the four-point stencil [A ~> a]
1803
- real , intent (inout ) :: w0 ! < Weight for this stencil [A2 ~> a2]
1803
+ real , intent (inout ) :: w0 ! < Smoothness indicator for this stencil [A2 ~> a2]
1804
1804
1805
+ ! Coefficients from Balsara and Shu (2000). The division by 1000 will be normalized out by fac_fn
1805
1806
w0 = q4(1 ) * (2.107 * q4(1 ) - 9.402 * q4(2 ) + 7.042 * q4(3 ) - 1.854 * q4(4 )) + &
1806
1807
q4(2 ) * (11.003 * q4(2 ) - 17.246 * q4(3 ) + 4.642 * q4(4 )) + &
1807
1808
q4(3 ) * (7.043 * q4(3 ) - 3.882 * q4(4 )) + 0.547 * q4(4 ) * q4(4 )
1808
1809
1809
1810
end subroutine weno_seven_weight_0
1810
1811
1811
- ! > Compute weights for the third upwind stencil of the seventh-order WENO scheme
1812
+ ! > Compute the smoothness indicator for the third upwind stencil of the seventh-order WENO scheme
1812
1813
subroutine weno_seven_weight_1 (q4 , w1 )
1813
1814
real , intent (in ) :: q4(4 ) ! < Tracer values on the four-point stencil [A ~> a]
1814
- real , intent (inout ) :: w1 ! < Weight for this stencil [A2 ~> a2]
1815
+ real , intent (inout ) :: w1 ! < Smoothness indicator for this stencil [A2 ~> a2]
1815
1816
1817
+ ! Coefficients from Balsara and Shu (2000). The division by 1000 will be normalized out by fac_fn
1816
1818
w1 = q4(1 ) * (0.547 * q4(1 ) - 2.522 * q4(2 ) + 1.922 * q4(3 ) - 0.494 * q4(4 )) + &
1817
1819
q4(2 ) * (3.443 * q4(2 ) - 5.966 * q4(3 ) + 1.602 * q4(4 )) + &
1818
1820
q4(3 ) * (2.843 * q4(3 ) - 1.642 * q4(4 )) + 0.267 * q4(4 ) * q4(4 )
1819
1821
1820
1822
end subroutine weno_seven_weight_1
1821
1823
1822
- ! > Compute weights for the second upwind stencil of the seventh-order WENO scheme
1824
+ ! > Compute the smoothness indicator for the second upwind stencil of the seventh-order WENO scheme
1823
1825
subroutine weno_seven_weight_2 (q4 , w2 )
1824
1826
real , intent (in ) :: q4(4 ) ! < Tracer values on the four-point stencil [A ~> a]
1825
- real , intent (inout ) :: w2 ! < Weight for this stencil [A2 ~> a2]
1827
+ real , intent (inout ) :: w2 ! < Smoothness indicator for this stencil [A2 ~> a2]
1826
1828
1829
+ ! Coefficients from Balsara and Shu (2000). The division by 1000 will be normalized out by fac_fn
1827
1830
w2 = q4(1 ) * (0.267 * q4(1 ) - 1.642 * q4(2 ) + 1.602 * q4(3 ) - 0.494 * q4(4 )) + &
1828
1831
q4(2 ) * (2.843 * q4(2 ) - 5.966 * q4(3 ) + 1.922 * q4(4 )) + &
1829
1832
q4(3 ) * (3.443 * q4(3 ) - 2.522 * q4(4 )) + 0.547 * q4(4 ) * q4(4 )
1830
1833
1831
1834
end subroutine weno_seven_weight_2
1832
1835
1833
- ! > Compute weights for the first upwind stencil of the seventh-order WENO scheme
1836
+ ! > Compute smoothness indicator for the first upwind stencil of the seventh-order WENO scheme
1834
1837
subroutine weno_seven_weight_3 (q4 , w3 )
1835
1838
real , intent (in ) :: q4(4 ) ! < Tracer values on the four-point stencil [A ~> a]
1836
- real , intent (inout ) :: w3 ! < Weight for this stencil [A2 ~> a2]
1839
+ real , intent (inout ) :: w3 ! < Smoothness indicator for this stencil [A2 ~> a2]
1837
1840
1841
+ ! Coefficients from Balsara and Shu (2000). The division by 1000 will be normalized out by fac_fn
1838
1842
w3 = q4(1 ) * (0.547 * q4(1 ) - 3.882 * q4(2 ) + 4.642 * q4(3 ) - 1.854 * q4(4 )) + &
1839
1843
q4(2 ) * (7.043 * q4(2 ) - 17.246 * q4(3 ) + 7.042 * q4(4 )) + &
1840
1844
q4(3 ) * (11.003 * q4(3 ) - 9.402 * q4(4 )) + 2.107 * q4(4 ) * q4(4 )
0 commit comments