Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync develop to dev/ufs-weather-model #957

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 0 deletions model/bin/ww3_from_ftp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ cp -r data_regtests/ww3_tp2.14/input/toy/toy_coupled_field.nc.OASACM regtests/ww
cp -r data_regtests/ww3_tp2.14/input/toy/toy_coupled_field.nc.OASACM regtests/ww3_tp2.14/input/toy/toy_coupled_field.nc.OASACM6
cp -r data_regtests/ww3_tp2.14/input/toy/*.nc regtests/ww3_tp2.14/input/toy/
cp -r data_regtests/ww3_tp2.17/input/* regtests/ww3_tp2.17/input/
cp -r data_regtests/ww3_tp2.19/input/* regtests/ww3_tp2.19/input/
cp -r data_regtests/ww3_tp2.21/input/* regtests/ww3_tp2.21/input/
cp -r data_regtests/mww3_test_09/input/* regtests/mww3_test_09/input/
cp -r data_regtests/ww3_ufs1.1/input/* regtests/ww3_ufs1.1/input/
cp -r data_regtests/ww3_ufs1.1/input_unstr/* regtests/ww3_ufs1.1/input_unstr/
cp -r data_regtests/ww3_ufs1.1/input/*.nc regtests/ww3_ufs1.2/input/
cp -r data_regtests/ww3_ufs1.2/input/* regtests/ww3_ufs1.2/input/
cp -r data_regtests/ww3_ufs1.3/input/*nc regtests/ww3_ufs1.3/input/
Expand Down
26 changes: 15 additions & 11 deletions model/inp/ww3_grid.inp
Original file line number Diff line number Diff line change
Expand Up @@ -305,30 +305,34 @@ $ limitation and the GSE alleviation.
$
$ Unstructured grids ------------------------------------------------ $
$ UNST parameters : Namelist UNST
$ UGOBCAUTO : TRUE: OBC points are taken from type 15 elements
$ UGOBCAUTO : TRUE: OBC points are taken from type 15 elements
$ FALSE: OBC points must be listed in ww3_grid.inp
$ UGOBCDEPTH: Threshold ( < 0) depth for OBC points if UGOBCAUTO is TRUE
$ EXPFSN : Activation of N scheme
$ UGOBCDEPTH : Threshold ( < 0) depth for OBC points if UGOBCAUTO is TRUE
$ UGOBCFILE : Reading boundary files from a file
$ EXPFSN : Activation of N scheme (only one of the below 4, True - Active, False - not active)
$ EXPFSPSI : Activation of PSI scheme
$ EXPFSFCT : Activation of FCT scheme
$ IMPFSN : Activation of N implicit scheme
$ IMPFSN : Activation of N implicit scheme
$ EXPTOTAL : Activation of the Block explicit N scheme solver
$ IMPTOTAL : Activation of fully implicit scheme | Non splitting
$ EXPTOTAL : Turn on implicit refraction (only with imptotal)
$ IMPREFRACTION : Turn on implicit freq. shift (only with imptotal)
$ IMPREFRACTION : Turn on implicit freq. shift (only with imptotal)
$ IMPFREQSHIFT : Turn on implicit freq. shift terms (only with imptotal)
$ IMPSOURCE : Turn on implicit source terms (only with imptotal)
$ IMPSOURCE : Turn on implicit source terms (only with imptotal)
$ JGS_TERMINATE_MAXITER : max. Number of iterations
$ JGS_TERMINATE_DIFFERENCE : terminate based on the total change of wave action
$ JGS_TERMINATE_NORM : terminate based on the norm of the solution
$ JGS_USE_JACOBI : Use Jacobi solver for imptotal
$ JGS_BLOCK_GAUSS_SEIDEL : Use Block Gauss Seidel method for imptotal
$ JGS_TERMINATE_DIFFERENCE : Terminate based on the total change of the unweightet sum of wave action
$ JGS_TERMINATE_NORM : Terminate based on the norm of the solution
$ JGS_USE_JACOBI : Use Jacobi solver family
$ JGS_BLOCK_GAUSS_SEIDEL : Use Block Gauss Seidel method for imptotal instead of the conservative jacobi iterator.
$ JGS_MAXITER : max. Number of solver iterations
$ JGS_PMIN : % of grid points that do not need to converge during solver iteration.
$ JGS_DIFF_THR : implicit solver threshold for JGS_TERMINATE_DIFFERENCE
$ JGS_NORM_THR : terminate based on the norm of the solution
$ JGS_LIMITER : use total (quasi-steady: limits whole equation) instead of local limiter (un-steady: limits only source terms)
$ JGS_LIMITER_FUNC : 1 - old limiter; 2 - alternatnive limiter
$ SETUP_APPLY_WLV : Compute wave setup (experimental)
$ SOLVERTHR_SETUP : Solver threshold for setup computations
$ CRIT_DEP_SETUP : Critical depths for setup computations

$
$ SMC grid propagation : Namelist PSMC and default values
$ CFLSM : Maximum CFL no. for propagation, 0.7
Expand Down
27 changes: 15 additions & 12 deletions model/nml/namelists.nml
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ $ w3sic4md.ftn
$
$ Triad nonlinear interactions - - - - - - - - - - - - - - - - - - - -
$ Lumped Triad Interaction (LTA) : Namelist STR1 (To be implemented)
$ PTRIAD1 : Proportionality coefficient (default 0.05)
$ PTRIAD1 : Proportionality coefficient (default 1.)
$ PTRIAD2 : Multiple of Tm01 up to which interaction
$ is computed (2.5)
$ PTRIAD3 : Ursell upper limit for computing
Expand Down Expand Up @@ -284,27 +284,30 @@ $ limitation and the GSE alleviation.
$
$ Unstructured grids ------------------------------------------------ $
$ UNST parameters : Namelist UNST
$ UGOBCAUTO : TRUE: OBC points are taken from type 15 elements
$ UGOBCAUTO : TRUE: OBC points are taken from type 15 elements
$ FALSE: OBC points must be listed in ww3_grid.inp
$ UGOBCDEPTH: Threshold ( < 0) depth for OBC points if UGOBCAUTO is TRUE
$ EXPFSN : Activation of N scheme
$ UGOBCDEPTH : Threshold ( < 0) depth for OBC points if UGOBCAUTO is TRUE
$ UGOBCFILE : Reading boundary files from a file
$ EXPFSN : Activation of N scheme (only one of the below 4, True - Active, False - not active)
$ EXPFSPSI : Activation of PSI scheme
$ EXPFSFCT : Activation of FCT scheme
$ IMPFSN : Activation of N implicit scheme
$ IMPFSN : Activation of N implicit scheme
$ EXPTOTAL : Activation of the Block explicit N scheme solver
$ IMPTOTAL : Activation of fully implicit scheme | Non splitting
$ EXPTOTAL : Turn on implicit refraction (only with imptotal)
$ IMPREFRACTION : Turn on implicit freq. shift (only with imptotal)
$ IMPREFRACTION : Turn on implicit freq. shift (only with imptotal)
$ IMPFREQSHIFT : Turn on implicit freq. shift terms (only with imptotal)
$ IMPSOURCE : Turn on implicit source terms (only with imptotal)
$ IMPSOURCE : Turn on implicit source terms (only with imptotal)
$ JGS_TERMINATE_MAXITER : max. Number of iterations
$ JGS_TERMINATE_DIFFERENCE : terminate based on the total change of wave action
$ JGS_TERMINATE_NORM : terminate based on the norm of the solution
$ JGS_USE_JACOBI : Use Jacobi solver for imptotal
$ JGS_BLOCK_GAUSS_SEIDEL : Use Block Gauss Seidel method for imptotal
$ JGS_TERMINATE_DIFFERENCE : Terminate based on the total change of the unweightet sum of wave action
$ JGS_TERMINATE_NORM : Terminate based on the norm of the solution
$ JGS_USE_JACOBI : Use Jacobi solver family
$ JGS_BLOCK_GAUSS_SEIDEL : Use Block Gauss Seidel method for imptotal instead of the conservative jacobi iterator.
$ JGS_MAXITER : max. Number of solver iterations
$ JGS_PMIN : % of grid points that do not need to converge during solver iteration.
$ JGS_DIFF_THR : implicit solver threshold for JGS_TERMINATE_DIFFERENCE
$ JGS_NORM_THR : terminate based on the norm of the solution
$ JGS_LIMITER : use total (quasi-steady: limits whole equation) instead of local limiter (un-steady: limits only source terms)
$ JGS_LIMITER_FUNC : 1 - old limiter; 2 - alternatnive limiter
$ SETUP_APPLY_WLV : Compute wave setup (experimental)
$ SOLVERTHR_SETUP : Solver threshold for setup computations
$ CRIT_DEP_SETUP : Critical depths for setup computations
Expand Down
3 changes: 3 additions & 0 deletions model/src/PDLIB/yowexchangeModule.F90
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ module yowExchangeModule
!> number of the second dimension for exchange
integer, public :: n2ndDim = 1

!> number of the second dimension for exchange (nth only for wave model)
integer, public :: nnthDim = 1


contains

Expand Down
6 changes: 3 additions & 3 deletions model/src/PDLIB/yowpdlibmain.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1309,8 +1309,8 @@ subroutine ComputeTRIA_IEN_SI_CCON
use yowNodepool, only: x, y, z, PDLIB_SI, PDLIB_IEN, PDLIB_TRIA, PDLIB_CCON, PDLIB_TRIA03

integer I1, I2, I3, stat, IE, NI(3)
real(rkind) :: DXP1, DXP2, DXP3, DYP1, DYP2, DYP3, DBLTMP, TRIA03
logical :: CROSSES_DATELINE
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)
if(stat/=0) call parallel_abort('SI allocation failure')
Expand Down Expand Up @@ -1354,7 +1354,7 @@ subroutine ComputeTRIA_IEN_SI_CCON
PDLIB_CCON(I1) = PDLIB_CCON(I1) + 1
PDLIB_CCON(I2) = PDLIB_CCON(I2) + 1
PDLIB_CCON(I3) = PDLIB_CCON(I3) + 1
TRIA03 = PDLIB_TRIA(IE)/3.d0
TRIA03 = PDLIB_TRIA(IE)/3.d0
PDLIB_SI(I1) = PDLIB_SI(I1) + TRIA03
PDLIB_SI(I2) = PDLIB_SI(I2) + TRIA03
PDLIB_SI(I3) = PDLIB_SI(I3) + TRIA03
Expand Down
29 changes: 23 additions & 6 deletions model/src/pdlib_field_vec.F90
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,11 @@ SUBROUTINE GET_ARRAY_SIZE(TheSize)
IF ( FLGRDALL( 6, 11) ) THEN
IH = IH + 1
END IF
IF ( FLGRDALL( 6, 12) ) THEN
DO IK=1,2*NK
IH = IH + 1
END DO
END IF
IF ( FLGRDALL( 6, 13) ) THEN
IH = IH + 1
IH = IH + 1
Expand Down Expand Up @@ -803,7 +808,7 @@ SUBROUTINE DO_OUTPUT_EXCHANGES(IMOD)
!
! 4. Subroutines used :
!
USE W3ADATMD, ONLY: W3XDMA, W3SETA, W3XETA
USE W3ADATMD, ONLY: W3XDMA, W3SETA, W3XETA, WADATS
USE W3SERVMD, ONLY: EXTCDE
USE W3GDATMD, ONLY: NSEA
USE W3GDATMD, ONLY: NX, NSPEC, MAPFS, E3DF, P2MSF, US3DF
Expand All @@ -825,7 +830,7 @@ SUBROUTINE DO_OUTPUT_EXCHANGES(IMOD)
STH2M, HSIG, TAUICE, PHICE, PTHP0, PQP,&
PPE, PGW, PSW, PTM1, PT1, PT2, PEP, &
QP, MSSD, MSCD, STMAXE, STMAXD, HMAXE, &
HCMAXE, HMAXD, HCMAXD, WBT
HCMAXE, HMAXD, HCMAXD, WBT, USSP
USE W3GDATMD, ONLY: NK, NSEAL
USE W3ODATMD, ONLY: NDST, IAPROC, NAPROC, NTPROC, FLOUT, &
NAPFLD, NAPPNT, NAPRST, NAPBPT, NAPTRK,&
Expand Down Expand Up @@ -1093,11 +1098,11 @@ SUBROUTINE DO_OUTPUT_EXCHANGES(IMOD)
END IF
IF ( FLGRDALL( 5, 1) ) THEN
IH = IH + 1
Arrexch(IH,JSEA)=UST(JSEA)
Arrexch(IH,JSEA)=UST(ISEA)
IH = IH + 1
Arrexch(IH,JSEA)=USTDIR(JSEA)
Arrexch(IH,JSEA)=USTDIR(ISEA)
IH = IH + 1
Arrexch(IH,JSEA)=ASF(JSEA)
Arrexch(IH,JSEA)=ASF(ISEA)
END IF
IF ( FLGRDALL( 5, 2) ) THEN
IH = IH + 1
Expand Down Expand Up @@ -1201,6 +1206,12 @@ SUBROUTINE DO_OUTPUT_EXCHANGES(IMOD)
IH = IH + 1
Arrexch(IH,JSEA)=PHICE(JSEA)
END IF
IF ( FLGRDALL( 6, 12) ) THEN
DO IK=1,2*NK
IH = IH + 1
Arrexch(IH,JSEA)=USSP(JSEA,IK)
END DO
END IF
IF ( FLGRDALL( 6, 13) ) THEN
IH = IH + 1
Arrexch(IH,JSEA)=TAUOCX(JSEA)
Expand Down Expand Up @@ -1325,7 +1336,7 @@ SUBROUTINE DO_OUTPUT_EXCHANGES(IMOD)
END DO
END IF
IF ( IAPROC .EQ. NAPFLD ) THEN
! CALL W3XDMA ( IMOD, NDSE, NDST, FLGRDALL )
IF (.not. WADATS(IMOD)%AINIT2) CALL W3XDMA ( IMOD, NDSE, NDST, FLGRDALL )
CALL W3XETA ( IMOD, NDSE, NDST )
IH = 0
IF ( FLGRDALL( 2, 1) ) THEN
Expand Down Expand Up @@ -1638,6 +1649,12 @@ SUBROUTINE DO_OUTPUT_EXCHANGES(IMOD)
IH = IH + 1
PHICE(1:NSEA) = ARRtotal(IH,:)
END IF
IF ( FLGRDALL( 6, 12) ) THEN
DO IK=1,2*NK
IH = IH + 1
USSP(1:NSEA,IK) = ARRtotal(IH,:)
END DO
END IF
IF ( FLGRDALL( 6, 13) ) THEN
IH = IH + 1
TAUOCX(1:NSEA) = ARRtotal(IH,:)
Expand Down
3 changes: 3 additions & 0 deletions model/src/w3gdatmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,7 @@ MODULE W3GDATMD
LOGICAL :: B_JGS_USE_JACOBI
LOGICAL :: B_JGS_BLOCK_GAUSS_SEIDEL
INTEGER :: B_JGS_MAXITER
INTEGER :: B_JGS_LIMITER_FUNC
REAL*8 :: B_JGS_PMIN
REAL*8 :: B_JGS_DIFF_THR
REAL*8 :: B_JGS_NORM_THR
Expand Down Expand Up @@ -1388,6 +1389,7 @@ MODULE W3GDATMD
LOGICAL, POINTER :: B_JGS_USE_JACOBI
LOGICAL, POINTER :: B_JGS_BLOCK_GAUSS_SEIDEL
INTEGER, POINTER :: B_JGS_MAXITER
INTEGER, POINTER :: B_JGS_LIMITER_FUNC
REAL(8), POINTER :: B_JGS_PMIN
REAL(8), POINTER :: B_JGS_DIFF_THR
REAL(8), POINTER :: B_JGS_NORM_THR
Expand Down Expand Up @@ -2805,6 +2807,7 @@ SUBROUTINE W3SETG ( IMOD, NDSE, NDST )
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_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
B_JGS_DIFF_THR => MPARS(IMOD)%SCHMS%B_JGS_DIFF_THR
B_JGS_NORM_THR => MPARS(IMOD)%SCHMS%B_JGS_NORM_THR
Expand Down
16 changes: 13 additions & 3 deletions model/src/w3gridmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,7 @@ MODULE W3GRIDMD
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.
Expand Down Expand Up @@ -1078,6 +1079,7 @@ MODULE W3GRIDMD
JGS_TERMINATE_DIFFERENCE, &
JGS_TERMINATE_NORM, &
JGS_LIMITER, &
JGS_LIMITER_FUNC, &
JGS_USE_JACOBI, &
JGS_BLOCK_GAUSS_SEIDEL, &
JGS_MAXITER, &
Expand Down Expand Up @@ -2390,13 +2392,14 @@ SUBROUTINE W3GRID()
IMPREFRACTION = .FALSE.
IMPFREQSHIFT = .FALSE.
IMPSOURCE = .FALSE.
SETUP_APPLY_WLV = .FALSE.
SOLVERTHR_SETUP=1E-14
SETUP_APPLY_WLV = .TRUE.
SOLVERTHR_SETUP=1E-6
CRIT_DEP_SETUP=0.1
JGS_TERMINATE_MAXITER = .TRUE.
JGS_TERMINATE_DIFFERENCE = .TRUE.
JGS_TERMINATE_NORM = .FALSE.
JGS_LIMITER = .FALSE.
JGS_LIMITER_FUNC = 1
JGS_BLOCK_GAUSS_SEIDEL = .TRUE.
JGS_USE_JACOBI = .TRUE.
JGS_MAXITER=100
Expand All @@ -2413,6 +2416,7 @@ SUBROUTINE W3GRID()
B_JGS_TERMINATE_DIFFERENCE = JGS_TERMINATE_DIFFERENCE
B_JGS_TERMINATE_NORM = JGS_TERMINATE_NORM
B_JGS_LIMITER = JGS_LIMITER
B_JGS_LIMITER_FUNC = JGS_LIMITER_FUNC
B_JGS_BLOCK_GAUSS_SEIDEL = JGS_BLOCK_GAUSS_SEIDEL
B_JGS_MAXITER = JGS_MAXITER
B_JGS_PMIN = JGS_PMIN
Expand Down Expand Up @@ -3266,6 +3270,7 @@ SUBROUTINE W3GRID()
JGS_TERMINATE_DIFFERENCE, &
JGS_TERMINATE_NORM, &
JGS_LIMITER, &
JGS_LIMITER_FUNC, &
JGS_USE_JACOBI, &
JGS_BLOCK_GAUSS_SEIDEL, &
JGS_MAXITER, &
Expand Down Expand Up @@ -3600,6 +3605,10 @@ SUBROUTINE W3GRID()
FSTOTALEXP = EXPTOTAL
PNAME2 = 'N Explicit (Fluctuation Splitting) for one exchange explicit DC HPCF '
END SELECT

IF (FSTOTALIMP .or. FSTOTALEXP) THEN
LPDLIB = .TRUE.
ENDIF
!
IF (SUM(UNSTSCHEMES).GT.1) WRITE(NDSO,1035)
WRITE (NDSO,2951) PNAME2
Expand Down Expand Up @@ -3628,7 +3637,7 @@ SUBROUTINE W3GRID()
END IF
IF (SETUP_APPLY_WLV) THEN
DO_CHANGE_WLV = SETUP_APPLY_WLV
PNAME2 = ' we change WLV'
PNAME2 = 'Wave setup is added to the WLV'
WRITE (NDSO,2952) PNAME2
END IF
SOLVERTHR_STP = SOLVERTHR_SETUP
Expand Down Expand Up @@ -6571,6 +6580,7 @@ SUBROUTINE W3GRID()
', JGS_TERMINATE_DIFFERENCE=', L3, &
', JGS_TERMINATE_NORM=', L3, &
', JGS_LIMITER=', L3, &
', JGS_LIMITER_FUNC=', I3, &
', JGS_USE_JACOBI=', L3, &
', JGS_BLOCK_GAUSS_SEIDEL=', L3, &
', JGS_MAXITER=', I5, &
Expand Down
Loading