Skip to content

Commit

Permalink
ww3_gr3: initial commit ... still testing with issues at the wave bou…
Browse files Browse the repository at this point in the history
…ndary for gr3 files
  • Loading branch information
aronroland committed Sep 20, 2023
1 parent 991daf8 commit f3a647f
Show file tree
Hide file tree
Showing 3 changed files with 364 additions and 5 deletions.
3 changes: 3 additions & 0 deletions model/src/w3gdatmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,7 @@ MODULE W3GDATMD
LOGICAL :: FSFREQSHIFT = .FALSE.
LOGICAL :: FSSOURCE = .FALSE.
LOGICAL :: FSBCCFL = .FALSE.
LOGICAL :: LGR3 = .FALSE.
LOGICAL :: DO_CHANGE_WLV
REAL(8) :: SOLVERTHR_STP
REAL(8) :: CRIT_DEP_STP
Expand Down Expand Up @@ -1380,6 +1381,7 @@ MODULE W3GDATMD
LOGICAL, POINTER :: FSN,FSPSI,FSFCT,FSNIMP,FSTOTALIMP,FSTOTALEXP
LOGICAL, POINTER :: FSREFRACTION, FSFREQSHIFT, FSSOURCE, FSBCCFL
LOGICAL, POINTER :: DO_CHANGE_WLV
LOGICAL, POINTER :: LGR3
REAL(8), POINTER :: SOLVERTHR_STP
REAL(8), POINTER :: CRIT_DEP_STP
LOGICAL, POINTER :: B_JGS_TERMINATE_MAXITER
Expand Down Expand Up @@ -2797,6 +2799,7 @@ SUBROUTINE W3SETG ( IMOD, NDSE, NDST )
FSREFRACTION => MPARS(IMOD)%SCHMS%FSREFRACTION
FSFREQSHIFT => MPARS(IMOD)%SCHMS%FSFREQSHIFT
FSSOURCE => MPARS(IMOD)%SCHMS%FSSOURCE
LGR3 => MPARS(IMOD)%SCHMS%LGR3
DO_CHANGE_WLV => MPARS(IMOD)%SCHMS%DO_CHANGE_WLV
SOLVERTHR_STP => MPARS(IMOD)%SCHMS%SOLVERTHR_STP
CRIT_DEP_STP => MPARS(IMOD)%SCHMS%CRIT_DEP_STP
Expand Down
12 changes: 9 additions & 3 deletions model/src/w3gridmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ MODULE W3GRIDMD
UGBCCFL, EXPFSN, EXPFSPSI, EXPFSFCT, &
IMPFSN, IMPTOTAL, EXPTOTAL, &
IMPREFRACTION, IMPFREQSHIFT, &
IMPSOURCE, &
IMPSOURCE, READGR3 &
JGS_TERMINATE_MAXITER, &
JGS_TERMINATE_DIFFERENCE, &
JGS_TERMINATE_NORM, &
Expand Down Expand Up @@ -2392,6 +2392,7 @@ SUBROUTINE W3GRID()
IMPREFRACTION = .FALSE.
IMPFREQSHIFT = .FALSE.
IMPSOURCE = .FALSE.
READGR3 = .FALSE.
SETUP_APPLY_WLV = .TRUE.
SOLVERTHR_SETUP=1E-6
CRIT_DEP_SETUP=0.1
Expand All @@ -2411,6 +2412,7 @@ SUBROUTINE W3GRID()
! read data from the unstructured devoted namelist
CALL READNL ( NDSS, 'UNST', STATUS )

LGR3 = READGR3
B_JGS_USE_JACOBI = JGS_USE_JACOBI
B_JGS_TERMINATE_MAXITER = JGS_TERMINATE_MAXITER
B_JGS_TERMINATE_DIFFERENCE = JGS_TERMINATE_DIFFERENCE
Expand Down Expand Up @@ -3265,7 +3267,7 @@ SUBROUTINE W3GRID()
WRITE (NDSO,2956) UGBCCFL, UGOBCAUTO, UGOBCDEPTH,TRIM(UGOBCFILE), &
EXPFSN, EXPFSPSI, EXPFSFCT, IMPFSN, EXPTOTAL,&
IMPTOTAL, IMPREFRACTION, IMPFREQSHIFT, &
IMPSOURCE, SETUP_APPLY_WLV, &
IMPSOURCE, READGR3, SETUP_APPLY_WLV, &
JGS_TERMINATE_MAXITER, &
JGS_TERMINATE_DIFFERENCE, &
JGS_TERMINATE_NORM, &
Expand Down Expand Up @@ -3944,7 +3946,11 @@ SUBROUTINE W3GRID()
!
! Reading depths on unstructured grid (this also sets number of mesh points, NX)
!
CALL READMSH(NDSG,FNAME)
IF (LGR3) THEN
CALL READGR3(NDSG,FNAME)
ELSE
CALL READMSH(NDSG,FNAME)
ENDIF
ALLOCATE(ZBIN(NX, NY),OBSX(NX,NY),OBSY(NX,NY))
ZBIN(:,1) = VSC * ZB(:)
!
Expand Down
Loading

0 comments on commit f3a647f

Please sign in to comment.