Skip to content
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
0aa1b5a
ww3_gse2: merge gse stuff ...
aronroland Oct 26, 2023
beee861
ww3_gse2: merge some missing parts ...
aronroland Nov 5, 2023
3ea6e22
Merge branch 'develop' into ww3_gse2
aronroland Dec 2, 2023
15696ac
ww3_gse2: describe new switches in the namelist file
aronroland Jan 16, 2024
ac5b104
ww3_gse2: update inp examples
aronroland Jan 16, 2024
9e07bbe
ww3_gse2: revert init part in w3grid
aronroland Jan 16, 2024
6a972bb
Merge branch 'develop' into ww3_gse2
aronroland Feb 7, 2024
afd8ae3
ww3_gse2: fix severall bugs and improve scheme for filtered points
aronroland Aug 3, 2024
5aae07d
ww3_gse2: code cleaning and consolidation
aronroland Aug 3, 2024
27ef149
ww3_gse2: add my latest work on gse ...
aronroland Aug 9, 2024
d28cbc3
ww3_gse2: try something ...
aronroland Aug 9, 2024
99957a5
Merge branch 'ww3_gse2' of https://github.com/erdc/WW3 into ww3_gse2
aronroland Aug 9, 2024
3aff39b
ww3_gse2: some checks due to grid related issues ... to be continued
aronroland Aug 28, 2024
98690ce
cleaned up merge with develop in the documentation of the namelists.n…
Dec 13, 2024
667c2dc
ww3_gse2: some leftovers ...
aronroland Dec 19, 2024
3e273ed
Merge branch 'NOAA-EMC:develop' into ww3_gse2
thesser1 Dec 31, 2024
5139344
ww3_gse2: cleaning and optimization
aronroland Jan 17, 2025
9c3a6a9
ww3_gse2: latest work ...
aronroland Jan 22, 2025
d0f8171
ww3_gse2: add my latest changes to ww3_gse2
aronroland Apr 21, 2025
224e17e
ww3_gse2: consolidate diff part
aronroland Apr 21, 2025
4358dce
ww3_gse2: add more debug output
aronroland Apr 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion model/src/PDLIB/yownodepool.F90
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ module yowNodepool

!> coordinates of the local + ghost nodes. range [1:npa]
real(rkind), public, target, allocatable :: x(:), y(:), z(:)
real(rkind), public, target, allocatable :: PDLIB_SI(:), PDLIB_TRIA(:), PDLIB_TRIA03(:), PDLIB_IEN(:,:)
real(rkind), public, target, allocatable :: PDLIB_SI(:), PDLIB_TRIA(:), PDLIB_TRIA03(:), PDLIB_IEN(:,:), PDLIB_IEND(:,:,:)
integer, public, target, allocatable :: PDLIB_CCON(:), PDLIB_IA(:), PDLIB_JA(:)
integer, public, target, allocatable :: PDLIB_IA_P(:), PDLIB_JA_P(:), PDLIB_JA_IE(:,:,:)
integer, public, target, allocatable :: PDLIB_POS_CELL(:), PDLIB_IE_CELL(:)
Expand Down
14 changes: 12 additions & 2 deletions model/src/PDLIB/yowpdlibmain.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1306,13 +1306,13 @@ subroutine ComputeTRIA_IEN_SI_CCON
use yowerr, only: parallel_abort
use yowDatapool, only: myrank
use yowNodepool, only: np_global, np, iplg, t_Node, ghostlg, ng, npa
use yowNodepool, only: x, y, z, PDLIB_SI, PDLIB_IEN, PDLIB_TRIA, PDLIB_CCON, PDLIB_TRIA03
use yowNodepool, only: x, y, z, PDLIB_SI, PDLIB_IEN, PDLIB_IEND, PDLIB_TRIA, PDLIB_CCON, PDLIB_TRIA03

integer I1, I2, I3, stat, IE, NI(3)
real :: DXP1, DXP2, DXP3, DYP1, DYP2, DYP3, DBLTMP, TRIA03
logical :: CROSSES_DATELINE

allocate(PDLIB_SI(npa), PDLIB_CCON(npa), PDLIB_IEN(6,ne), PDLIB_TRIA(ne), PDLIB_TRIA03(ne), stat=stat)
allocate(PDLIB_SI(npa), PDLIB_CCON(npa), PDLIB_IEN(6,ne), PDLIB_IEND(3,3,ne), PDLIB_TRIA(ne), PDLIB_TRIA03(ne), stat=stat)
if(stat/=0) call parallel_abort('SI allocation failure')

PDLIB_SI(:) = 0.0d0 ! Median Dual Patch Area of each Node
Expand Down Expand Up @@ -1350,6 +1350,16 @@ subroutine ComputeTRIA_IEN_SI_CCON
WRITE(*,*) 'AREA SMALLER ZERO IN PDLIB', IE, NE, PDLIB_TRIA(IE)
STOP
ENDIF
PDLIB_IEND(1,1,IE) = DOT_PRODUCT(PDLIB_IEN(1:2,IE),PDLIB_IEN(1:2,IE)) ! Tomaich. eq. 3.19 n1 * n1 etc.
PDLIB_IEND(1,2,IE) = DOT_PRODUCT(PDLIB_IEN(1:2,IE),PDLIB_IEN(3:4,IE))
PDLIB_IEND(1,3,IE) = DOT_PRODUCT(PDLIB_IEN(1:2,IE),PDLIB_IEN(5:6,IE))
PDLIB_IEND(2,1,IE) = DOT_PRODUCT(PDLIB_IEN(3:4,IE),PDLIB_IEN(1:2,IE))
PDLIB_IEND(2,2,IE) = DOT_PRODUCT(PDLIB_IEN(3:4,IE),PDLIB_IEN(3:4,IE))
PDLIB_IEND(2,3,IE) = DOT_PRODUCT(PDLIB_IEN(3:4,IE),PDLIB_IEN(5:6,IE))
PDLIB_IEND(3,1,IE) = DOT_PRODUCT(PDLIB_IEN(5:6,IE),PDLIB_IEN(1:2,IE))
PDLIB_IEND(3,2,IE) = DOT_PRODUCT(PDLIB_IEN(5:6,IE),PDLIB_IEN(3:4,IE))
PDLIB_IEND(3,3,IE) = DOT_PRODUCT(PDLIB_IEN(5:6,IE),PDLIB_IEN(5:6,IE))


PDLIB_CCON(I1) = PDLIB_CCON(I1) + 1
PDLIB_CCON(I2) = PDLIB_CCON(I2) + 1
Expand Down
15 changes: 9 additions & 6 deletions model/src/w3gdatmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -813,9 +813,7 @@ MODULE W3GDATMD
#ifdef W3_PR1
REAL :: DUMMY
#endif
#ifdef W3_PR2
REAL :: DTME, CLATMN
#endif
#ifdef W3_PR3
REAL :: WDCG, WDTH
#endif
Expand Down Expand Up @@ -1046,8 +1044,11 @@ MODULE W3GDATMD
LOGICAL :: B_JGS_LIMITER
LOGICAL :: B_JGS_USE_JACOBI
LOGICAL :: B_JGS_BLOCK_GAUSS_SEIDEL
LOGICAL :: B_JGS_LGSE
INTEGER :: B_JGS_GSE_METHOD
INTEGER :: B_JGS_MAXITER
INTEGER :: B_JGS_LIMITER_FUNC
REAL*8 :: B_JGS_GSE_TS
REAL*8 :: B_JGS_PMIN
REAL*8 :: B_JGS_DIFF_THR
REAL*8 :: B_JGS_NORM_THR
Expand Down Expand Up @@ -1244,9 +1245,7 @@ MODULE W3GDATMD
!/
!/ Data aliasses for structure PROP(S)
!/
#ifdef W3_PR2
REAL, POINTER :: DTME, CLATMN
#endif
#ifdef W3_PR3
REAL, POINTER :: WDCG, WDTH
#endif
Expand Down Expand Up @@ -1403,6 +1402,9 @@ MODULE W3GDATMD
LOGICAL, POINTER :: B_JGS_LIMITER
LOGICAL, POINTER :: B_JGS_USE_JACOBI
LOGICAL, POINTER :: B_JGS_BLOCK_GAUSS_SEIDEL
LOGICAL, POINTER :: B_JGS_LGSE
INTEGER, POINTER :: B_JGS_GSE_METHOD
REAL(8), POINTER :: B_JGS_GSE_TS
INTEGER, POINTER :: B_JGS_MAXITER
INTEGER, POINTER :: B_JGS_LIMITER_FUNC
REAL(8), POINTER :: B_JGS_PMIN
Expand Down Expand Up @@ -2532,10 +2534,8 @@ SUBROUTINE W3SETG ( IMOD, NDSE, NDST )
!
! Structure PROPS
!
#ifdef W3_PR2
DTME => MPARS(IMOD)%PROPS%DTME
CLATMN => MPARS(IMOD)%PROPS%CLATMN
#endif
#ifdef W3_PR3
WDCG => MPARS(IMOD)%PROPS%WDCG
WDTH => MPARS(IMOD)%PROPS%WDTH
Expand Down Expand Up @@ -2829,6 +2829,9 @@ SUBROUTINE W3SETG ( IMOD, NDSE, NDST )
B_JGS_LIMITER => MPARS(IMOD)%SCHMS%B_JGS_LIMITER
B_JGS_USE_JACOBI => MPARS(IMOD)%SCHMS%B_JGS_USE_JACOBI
B_JGS_BLOCK_GAUSS_SEIDEL => MPARS(IMOD)%SCHMS%B_JGS_BLOCK_GAUSS_SEIDEL
B_JGS_LGSE => MPARS(IMOD)%SCHMS%B_JGS_LGSE
B_JGS_GSE_METHOD => MPARS(IMOD)%SCHMS%B_JGS_GSE_METHOD
B_JGS_GSE_TS => MPARS(IMOD)%SCHMS%B_JGS_GSE_TS
B_JGS_MAXITER => MPARS(IMOD)%SCHMS%B_JGS_MAXITER
B_JGS_LIMITER_FUNC => MPARS(IMOD)%SCHMS%B_JGS_LIMITER_FUNC
B_JGS_PMIN => MPARS(IMOD)%SCHMS%B_JGS_PMIN
Expand Down
66 changes: 39 additions & 27 deletions model/src/w3gridmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -903,36 +903,39 @@ MODULE W3GRIDMD
#ifdef W3_PR3
REAL :: WDTHCG, WDTHTH
#endif
LOGICAL :: JGS_TERMINATE_MAXITER
LOGICAL :: JGS_TERMINATE_DIFFERENCE
LOGICAL :: JGS_TERMINATE_NORM
LOGICAL :: JGS_LIMITER
INTEGER :: JGS_LIMITER_FUNC
LOGICAL :: JGS_BLOCK_GAUSS_SEIDEL
LOGICAL :: JGS_USE_JACOBI
LOGICAL :: JGS_SOURCE_NONLINEAR
LOGICAL :: UGOBCAUTO
LOGICAL :: UGBCCFL
LOGICAL :: EXPFSN
LOGICAL :: EXPFSPSI
LOGICAL :: EXPFSFCT
LOGICAL :: IMPFSN
LOGICAL :: EXPTOTAL
LOGICAL :: IMPTOTAL
LOGICAL :: IMPREFRACTION
LOGICAL :: IMPFREQSHIFT
LOGICAL :: IMPSOURCE
LOGICAL :: SETUP_APPLY_WLV
INTEGER :: JGS_MAXITER
LOGICAL :: JGS_TERMINATE_MAXITER = .TRUE.
LOGICAL :: JGS_TERMINATE_DIFFERENCE = .TRUE.
LOGICAL :: JGS_TERMINATE_NORM = .TRUE.
LOGICAL :: JGS_LIMITER = .FALSE.
INTEGER :: JGS_LIMITER_FUNC = 1
LOGICAL :: JGS_BLOCK_GAUSS_SEIDEL = .TRUE.
LOGICAL :: JGS_USE_JACOBI = .TRUE.
LOGICAL :: JGS_SOURCE_NONLINEAR = .FALSE.
LOGICAL :: JGS_LGSE = .FALSE.
INTEGER :: JGS_GSE_METHOD = 1
REAL(8) :: JGS_GSE_TS = 1.d0
LOGICAL :: UGOBCAUTO = .FALSE.
LOGICAL :: UGBCCFL = .FALSE.
LOGICAL :: EXPFSN = .TRUE.
LOGICAL :: EXPFSPSI = .FALSE.
LOGICAL :: EXPFSFCT = .FALSE.
LOGICAL :: IMPFSN = .FALSE.
LOGICAL :: EXPTOTAL = .FALSE.
LOGICAL :: IMPTOTAL = .FALSE.
LOGICAL :: IMPREFRACTION = .FALSE.
LOGICAL :: IMPFREQSHIFT = .FALSE.
LOGICAL :: IMPSOURCE = .FALSE.
LOGICAL :: SETUP_APPLY_WLV = .FALSE.
INTEGER :: JGS_MAXITER=100
INTEGER :: nbSel
INTEGER :: UNSTSCHEMES(6)
INTEGER :: UNSTSCHEME
INTEGER :: JGS_NLEVEL
REAL*8 :: JGS_PMIN
REAL*8 :: JGS_DIFF_THR
REAL*8 :: JGS_NORM_THR
REAL*8 :: SOLVERTHR_SETUP
REAL*8 :: CRIT_DEP_SETUP
INTEGER :: JGS_NLEVEL = 0
REAL*8 :: JGS_PMIN = 0.
REAL*8 :: JGS_DIFF_THR = 1.E-10
REAL*8 :: JGS_NORM_THR = 1.E-20
REAL*8 :: SOLVERTHR_SETUP = 1.E-20
REAL*8 :: CRIT_DEP_SETUP = 0.
!
CHARACTER :: UGOBCFILE*60
REAL :: UGOBCDEPTH
Expand Down Expand Up @@ -1089,6 +1092,9 @@ MODULE W3GRIDMD
JGS_LIMITER, &
JGS_LIMITER_FUNC, &
JGS_USE_JACOBI, &
JGS_LGSE, &
JGS_GSE_METHOD, &
JGS_GSE_TS, &
JGS_BLOCK_GAUSS_SEIDEL, &
JGS_MAXITER, &
JGS_PMIN, &
Expand Down Expand Up @@ -2432,8 +2438,11 @@ SUBROUTINE W3GRID()
JGS_TERMINATE_NORM = .FALSE.
JGS_LIMITER = .FALSE.
JGS_LIMITER_FUNC = 1
JGS_GSE_TS = 350000
JGS_BLOCK_GAUSS_SEIDEL = .TRUE.
JGS_USE_JACOBI = .TRUE.
JGS_LGSE = .FALSE.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add descriptions of the new terms to model/inp/ww3_grid.inp in the UNST namelist section: https://github.com/NOAA-EMC/WW3/blob/develop/model/inp/ww3_grid.inp#L318

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aronroland once this is done I can try to do some tests of this feature, but will need additional information before I can do so. We'll wait to run regression tests once we have testing information included in the PR. Lastly, you checked the box for "If a new feature was added, a regression test for testing the new feature is added", but I don't see the new regression test included yet, so we'll need that as well before this can be merged. That being said, as soon as I have enough information to run a test on my end I can do that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding updates to ww3_grid.inp !

JGS_GSE_METHOD = 1
JGS_MAXITER=100
JGS_PMIN = 1
JGS_DIFF_THR = 1.E-10
Expand All @@ -2456,6 +2465,9 @@ SUBROUTINE W3GRID()
B_JGS_NORM_THR = JGS_NORM_THR
B_JGS_NLEVEL = JGS_NLEVEL
B_JGS_SOURCE_NONLINEAR = JGS_SOURCE_NONLINEAR
B_JGS_LGSE = JGS_LGSE
B_JGS_GSE_TS = JGS_GSE_TS
B_JGS_GSE_METHOD = JGS_GSE_METHOD

nbSel=0

Expand Down
Loading