Skip to content
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
44de856
Update regtest ww3_ufs1.1 (#1507)
JessicaMeixner-NOAA Oct 21, 2025
c139064
Bugfix th2m (#1517)
mickaelaccensi Oct 28, 2025
1b8dbd9
add only clause to use statement in w3wavemd and fix USE MODULE remar…
mingchen-NOAA Oct 31, 2025
9c95c6e
Fix Fortran compile flag scope to avoid ifx real-size override warnin…
mingchen-NOAA Nov 5, 2025
639b398
Solve GNU & Intel build and allow to compile with switches S and T (#…
alcoat Nov 5, 2025
ac2f91c
initialize some variables to avoid ww3_multi to crash with gnu compil…
mickaelaccensi Nov 7, 2025
9171405
Modification to PDLIB_JACOBI_GAUSS_SEIDEL_BLOCK to address reproducib…
kestonsmith-noaa Nov 13, 2025
07d5ba0
replace EXTERNAL declarations with INTERFACE and CONTAINS for safer p…
mingchen-NOAA Nov 17, 2025
a6df9cd
fix MPI_WTIME interface warning in debug build using mpi_f08
Nov 18, 2025
6ec7a27
Addition of switch to activate precision truncation in PDLIB_JACOBI_G…
kestonsmith-noaa Nov 19, 2025
44a3409
fix SCOTCH and MPI_COMM_RANK explicit-interface warnings for debug bu…
mingchen-NOAA Nov 21, 2025
89b7076
Merge remote-tracking branch 'origin/develop' into develop2devufswmpl…
mingchen-NOAA Nov 21, 2025
0651900
Merge remote-tracking branch 'MC/ufs_wm/rmWarnings' into develop2devu…
mingchen-NOAA Nov 21, 2025
af7ecf2
Remove local copy of FindESMF.cmake and rename esmf target to ESMF::E…
DusanJovic-NOAA Nov 25, 2025
9d0cb94
Add explicit interfaces for BACIO and g2 routines in ww3_grib.F90 to …
mingchen-NOAA Nov 26, 2025
a707dcd
Merge branch 'NOAA-EMC:develop' into develop2devufswmplusfixwarnings
mingchen-NOAA Nov 28, 2025
eba8ccf
Merge remote-tracking branch 'MC/develop2devufswmplusfixwarnings' int…
Dec 2, 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
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ concurrency:

env:
cache_key: gnu11
CC: gcc-10
FC: gfortran-10
CXX: g++-10
CC: gcc-14
FC: gfortran-14
CXX: g++-14


# Split into a steup step, and a WW3 build step which
Expand Down Expand Up @@ -45,7 +45,8 @@ jobs:
run: |
# Install NetCDF, ESMF, g2, etc using Spack
sudo apt install cmake
git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
#git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
git clone -c feature.manyFiles=true --depth=2 --branch=spack-stack-1.9.3 https://github.com/JCSDA/spack.git
source spack/share/spack/setup-env.sh
spack env create ww3-gnu ww3/model/ci/spack_gnu.yaml
spack env activate ww3-gnu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ env:

jobs:
setup:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ concurrency:

env:
cache_key: gnu11-1
CC: gcc-10
FC: gfortran-10
CXX: g++-10
CC: gcc-14
FC: gfortran-14
CXX: g++-14


# Split into a steup step, and a WW3 build step which
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
run: |
# Install NetCDF, ESMF, g2, etc using Spack
sudo apt install cmake
git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
git clone -c feature.manyFiles=true --depth=2 --branch=spack-stack-1.9.3 https://github.com/JCSDA/spack.git
source spack/share/spack/setup-env.sh
spack env create ww3-gnu ww3/model/ci/spack_gnu.yaml
spack env activate ww3-gnu
Expand Down
2 changes: 1 addition & 1 deletion manual/eqs/output.tex
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ \subsection{~Output parameters} \label{sub:outpars}
\frac{a_1(f)^2+b_1(f)^2}{E(f)^2} \right )^{1/2} \right \} \right ]^{1/2}
\: , \label{eq:sig_th1} \end{equation}
\item \textbf{TH2M} Mean direction from $a_2$ and $b_2$ (degr.)
\begin{equation} \theta_2 (f)= \mbox{atan} \left ( \frac{b_2(f)}{a_2(f)} \right )
\begin{equation} \theta_2 (f)= 0.5 \mbox{atan} \left ( \frac{b_2(f)}{a_2(f)} \right )
\: , \label{eq:theta_2} \end{equation} \begin{equation}
a_2(f) = 2 \pi \int_0^{2\pi} \int_0^\infty \cos(2 \theta) F(\sigma,\theta) \:
\mathrm{d}\theta \: , \end{equation} \begin{equation}
Expand Down
1 change: 1 addition & 0 deletions model/bin/switch_NCEP_rwps
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NCO PDLIB SCOTCH NOGRB BIN2NC DIST MPI PR3 UQ FLX0 SEED ST4 STAB0 NL1 BT1 DB1 MLIM TR1 BS0 RWND WNX1 WNT1 CRX1 CRT1 O0 O1 O2 O3 O4 O5 O6 O7 O14 O15 IC0 IS0 REF0
6 changes: 3 additions & 3 deletions model/ci/spack_gnu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ spack:
- [email protected]~shared
- [email protected]~shared
- [email protected]+mpi+metis~shared
- netcdf-c@4.7.4~dap
- netcdf-fortran@4.5.3
- netcdf-c@4.9.2~dap
- netcdf-fortran@4.6.1
- [email protected]
- [email protected]
- [email protected]
- w3emc@2.9.2
- w3emc@2.12.0
- [email protected]+fortran~pnetcdf
- [email protected]~debug~xerces+external-parallelio
view: true
Expand Down
4 changes: 2 additions & 2 deletions model/ci/spack_intel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ spack:
providers:
mpi: [intel-oneapi-mpi]
specs:
- netcdf-c@4.7.4~dap
- netcdf-fortran@4.5.3
- netcdf-c@4.9.2~dap
- netcdf-fortran@4.6.1
- [email protected]
- [email protected]
- [email protected]~shared
Expand Down
5 changes: 3 additions & 2 deletions model/inp/ww3_grid.inp
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,11 @@ $ JGS_LIMITER : TRUE: Use total (quasi-steady: limits
$ FALSE: default
$ JGS_LIMITER_FUNC : 1 - old limiter (default)
$ 2 - alternatnive limiter
$ SETUP_APPLY_WLV : Compute wave setup (TRUE/FALSE, default TRUE)
$                           JGS_TRUNK_DIGITS  : [Only with switch TRNK] Number of digits of precision to truncate solution to at the end of iterative solver.
$                                               Can be used to force bit-for-bit reproducibility.
$ SETUP_APPLY_WLV : Compute wave setup (TRUE/FALSE, default TRUE)
$ SOLVERTHR_SETUP : Solver threshold for setup computations (default 1E-6)
$ CRIT_DEP_SETUP : Critical depth for setup computations (default 0.1)

$
$ SMC grid propagation : Namelist PSMC and default values
$ CFLSM : Maximum CFL no. for propagation, 0.7
Expand Down
14 changes: 11 additions & 3 deletions model/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,17 @@ foreach(program ${programs})
target_link_libraries(${program} PRIVATE ww3_lib)
endforeach()

target_compile_options(ww3_lib PUBLIC "$<$<COMPILE_LANGUAGE:Fortran>:${compile_flags}>")
target_compile_options(ww3_lib PUBLIC "$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:Fortran>>:${compile_flags_debug}>")
target_compile_options(ww3_lib PUBLIC "$<$<AND:$<CONFIG:Release>,$<COMPILE_LANGUAGE:Fortran>>:${compile_flags_release}>")
if (UFS_CAP)
# Building as part of UFS (submodule)
set(WW3_FLAG_SCOPE PRIVATE)
else()
# Standalone WW3 build
set(WW3_FLAG_SCOPE PUBLIC)
endif()

target_compile_options(ww3_lib ${WW3_FLAG_SCOPE} "$<$<COMPILE_LANGUAGE:Fortran>:${compile_flags}>")
target_compile_options(ww3_lib ${WW3_FLAG_SCOPE} "$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:Fortran>>:${compile_flags_debug}>")
target_compile_options(ww3_lib ${WW3_FLAG_SCOPE} "$<$<AND:$<CONFIG:Release>,$<COMPILE_LANGUAGE:Fortran>>:${compile_flags_release}>")

install(
TARGETS ${programs} ww3_lib
Expand Down
38 changes: 38 additions & 0 deletions model/src/PDLIB/yowpdlibmain.F90
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,44 @@ subroutine runParmetis(MNP)

INTEGER :: np_toSend

#ifdef W3_SCOTCH
interface
#ifdef SCOTCH_707
subroutine SCOTCHFParMETIS_V3_PartGeomKway(vtxdist, xadj, adjncy, &
vwgt, adjwgt, wgtflag, numflag, ndims, xyz, ncon, nparts, &
tpwgts, ubvec, options, edgecut, part, comm, ref)
import :: MPI_Comm
integer, intent(in) :: vtxdist(*), xadj(*), adjncy(*)
integer, intent(in) :: vwgt(*), adjwgt(*)
integer, intent(in) :: wgtflag, numflag, ndims, ncon, nparts
real(4), intent(in) :: xyz(*)
real(4), intent(in) :: tpwgts(*), ubvec(*)
integer, intent(in) :: options(*)
integer, intent(out) :: edgecut
integer, intent(inout) :: part(*)
type(MPI_Comm), intent(in) :: comm
integer, intent(out) :: ref
end subroutine SCOTCHFParMETIS_V3_PartGeomKway
#else
subroutine SCOTCH_ParMETIS_V3_PartGeomKway(vtxdist, xadj, adjncy, &
vwgt, adjwgt, wgtflag, numflag, ndims, xyz, ncon, nparts, &
tpwgts, ubvec, options, edgecut, part, comm, ref)
import :: MPI_Comm
integer, intent(in) :: vtxdist(*), xadj(*), adjncy(*)
integer, intent(in) :: vwgt(*), adjwgt(*)
integer, intent(in) :: wgtflag, numflag, ndims, ncon, nparts
real(4), intent(in) :: xyz(*)
real(4), intent(in) :: tpwgts(*), ubvec(*)
integer, intent(in) :: options(*)
integer, intent(out) :: edgecut
integer, intent(inout) :: part(*)
type(MPI_Comm), intent(in) :: comm
integer, intent(out) :: ref
end subroutine SCOTCH_ParMETIS_V3_PartGeomKway
#endif
end interface
#endif

! CALL REAL_MPI_BARRIER_PDLIB(comm, "runParmetis, step 1")
! Create xadj and adjncy arrays. They holds the nodes neighbors in CSR Format
! Here, the adjacency structure of a graph is represented by two arrays,
Expand Down
9 changes: 7 additions & 2 deletions model/src/serv_xnl4v5.f90
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,13 @@ real function z_root2(func,x1,x2,xacc,iprint,ierr)
!
implicit none
!
real func ! external function
abstract interface
real function func_proto(x)
real, intent(in) :: x
end function func_proto
end interface
procedure(func_proto) :: func
!
real, intent (in) :: x1 ! x-value at one side of interval
real, intent (in) :: x2 ! x-value at other side of interval
real, intent (in) :: xacc ! requested accuracy
Expand All @@ -512,7 +518,6 @@ real function z_root2(func,x1,x2,xacc,iprint,ierr)
logical lopen ! check if a file is opened

parameter (maxit = 20)
external func
!
integer iter ! counter for number of iterations
real fh ! function value FUNC(xh)
Expand Down
2 changes: 1 addition & 1 deletion model/src/w3adatmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1583,11 +1583,11 @@ SUBROUTINE W3XDMA ( IMOD, NDSE, NDST, OUTFLAGS )
!/ Local parameters
!/
INTEGER :: JGRID, NXXX, I
integer :: memunit
#ifdef W3_S
INTEGER, SAVE :: IENT = 0
CALL STRACE (IENT, 'W3XDMA')
#endif
integer :: memunit
!
! -------------------------------------------------------------------- /
! 1. Test input and module status
Expand Down
3 changes: 3 additions & 0 deletions model/src/w3gdatmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,7 @@ MODULE W3GDATMD
LOGICAL :: B_JGS_LIMITER
LOGICAL :: B_JGS_USE_JACOBI
LOGICAL :: B_JGS_BLOCK_GAUSS_SEIDEL
INTEGER :: B_JGS_TRUNK_DIGITS
INTEGER :: B_JGS_MAXITER
INTEGER :: B_JGS_LIMITER_FUNC
REAL*8 :: B_JGS_PMIN
Expand Down Expand Up @@ -1425,6 +1426,7 @@ MODULE W3GDATMD
LOGICAL, POINTER :: B_JGS_BLOCK_GAUSS_SEIDEL
INTEGER, POINTER :: B_JGS_MAXITER
INTEGER, POINTER :: B_JGS_LIMITER_FUNC
INTEGER, POINTER :: B_JGS_TRUNK_DIGITS
REAL(8), POINTER :: B_JGS_PMIN
REAL(8), POINTER :: B_JGS_DIFF_THR
REAL(8), POINTER :: B_JGS_NORM_THR
Expand Down Expand Up @@ -2875,6 +2877,7 @@ SUBROUTINE W3SETG ( IMOD, NDSE, NDST )
B_JGS_NORM_THR => MPARS(IMOD)%SCHMS%B_JGS_NORM_THR
B_JGS_NLEVEL => MPARS(IMOD)%SCHMS%B_JGS_NLEVEL
B_JGS_SOURCE_NONLINEAR => MPARS(IMOD)%SCHMS%B_JGS_SOURCE_NONLINEAR
B_JGS_TRUNK_DIGITS => MPARS(IMOD)%SCHMS%B_JGS_TRUNK_DIGITS
RETURN
!
! Formats
Expand Down
14 changes: 13 additions & 1 deletion model/src/w3gridmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,7 @@ MODULE W3GRIDMD
REAL*8 :: JGS_PMIN
REAL*8 :: JGS_DIFF_THR
REAL*8 :: JGS_NORM_THR
INTEGER :: JGS_TRUNK_DIGITS
REAL*8 :: SOLVERTHR_SETUP
REAL*8 :: CRIT_DEP_SETUP
!
Expand Down Expand Up @@ -1109,6 +1110,7 @@ MODULE W3GRIDMD
JGS_NORM_THR, &
JGS_NLEVEL, &
JGS_SOURCE_NONLINEAR, &
JGS_TRUNK_DIGITS, &
SETUP_APPLY_WLV, SOLVERTHR_SETUP, &
CRIT_DEP_SETUP
NAMELIST /MISC/ CICE0, CICEN, LICE, XSEED, FLAGTR, XP, XR, &
Expand Down Expand Up @@ -2481,6 +2483,7 @@ SUBROUTINE W3GRID()
JGS_NORM_THR = 1.E-20
JGS_NLEVEL = 0
JGS_SOURCE_NONLINEAR = .FALSE.
JGS_TRUNK_DIGITS = 5
! read data from the unstructured devoted namelist
CALL READNL ( NDSS, 'UNST', STATUS )

Expand All @@ -2497,6 +2500,7 @@ SUBROUTINE W3GRID()
B_JGS_NORM_THR = JGS_NORM_THR
B_JGS_NLEVEL = JGS_NLEVEL
B_JGS_SOURCE_NONLINEAR = JGS_SOURCE_NONLINEAR
B_JGS_TRUNK_DIGITS = JGS_TRUNK_DIGITS

nbSel=0

Expand Down Expand Up @@ -3373,6 +3377,9 @@ SUBROUTINE W3GRID()
JGS_DIFF_THR, &
JGS_NORM_THR, &
JGS_NLEVEL, &
#ifdef W3_TRNK
JGS_TRUNK_DIGITS, &
#endif
JGS_SOURCE_NONLINEAR
!
WRITE (NDSO,2976) P2SF, I1P2SF, I2P2SF, &
Expand Down Expand Up @@ -6352,7 +6359,7 @@ SUBROUTINE W3GRID()
2922 FORMAT ( ' &SNL1 LAMBDA =',F7.3,', NLPROP =',E10.3, &
', KDCONV =',F7.3,', KDMIN =',F7.3,','/ &
' SNLCS1 =',F7.3,', SNLCS2 =',F7.3, &
', SNLCS3 = ',F7.3,','/ &
', SNLCS3 = ',F7.3,','/ &
' IQTYPE =',I2,', TAILNL =',F5.1,','/ &
' GQMNF1 =',I2,', GQMNT1 =',I2,',', &
' GQMNQ_OM2 =',I2,', GQMTHRSAT =',E11.4,', GQMTHRCOU =',F4.3,','/ &
Expand Down Expand Up @@ -6724,7 +6731,12 @@ SUBROUTINE W3GRID()
', JGS_DIFF_THR=', F8.3, &
', JGS_NORM_THR=', F8.3, &
', JGS_NLEVEL=', I3, &
#ifdef W3_TRNK
', JGS_TRUNK_DIGITS=', I3, &
#endif
', JGS_SOURCE_NONLINEAR=', L3 / )


!
960 FORMAT (/' Miscellaneous ',A/ &
' --------------------------------------------------')
Expand Down
2 changes: 1 addition & 1 deletion model/src/w3iogomd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1720,7 +1720,7 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 )
IF ( FLOLOC( 3, 3).AND.(IK.GE.E3DF(2,3).AND.IK.LE.E3DF(3,3))) &
STH1M(JSEA,IK)= SQRT(ABS(2.*(1-M1)))*RADE
IF ( FLOLOC( 3, 4).AND.(IK.GE.E3DF(2,4).AND.IK.LE.E3DF(3,4))) &
TH2M(JSEA,IK)= MOD ( 270. - RADE*0.5*ATAN2(ABY2(JSEA),AB2X(JSEA)) , 180. )
TH2M(JSEA,IK)= MOD ( 270. - RADE*0.5*ATAN2(AB2Y(JSEA),AB2X(JSEA)) , 180. )
M2 = SQRT(AB2X(JSEA)**2+AB2Y(JSEA)**2)/MAX(1E-20,AB(JSEA))
IF ( FLOLOC( 3, 5).AND.(IK.GE.E3DF(2,5).AND.IK.LE.E3DF(3,5))) &
STH2M(JSEA,IK)= SQRT(ABS(0.5*(1-M2)))*RADE
Expand Down
20 changes: 16 additions & 4 deletions model/src/w3iogrmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,9 @@ SUBROUTINE W3IOGR ( INXOUT, NDSM, IMOD, FEXT &
B_JGS_DIFF_THR, &
B_JGS_NORM_THR, &
B_JGS_NLEVEL, &
#ifdef W3_TRNK
B_JGS_TRUNK_DIGITS, &
#endif
B_JGS_SOURCE_NONLINEAR
#ifdef W3_ASCII
WRITE (NDSA,*) &
Expand Down Expand Up @@ -839,6 +842,9 @@ SUBROUTINE W3IOGR ( INXOUT, NDSM, IMOD, FEXT &
B_JGS_DIFF_THR, &
B_JGS_NORM_THR, &
B_JGS_NLEVEL, &
#ifdef W3_TRNK
B_JGS_TRUNK_DIGITS, &
#endif
B_JGS_SOURCE_NONLINEAR
#endif
!Init COUNTCON and IOBDP to zero, it needs to be set somewhere or
Expand Down Expand Up @@ -1004,6 +1010,9 @@ SUBROUTINE W3IOGR ( INXOUT, NDSM, IMOD, FEXT &
B_JGS_DIFF_THR, &
B_JGS_NORM_THR, &
B_JGS_NLEVEL, &
#ifdef W3_TRNK
B_JGS_TRUNK_DIGITS, &
#endif
B_JGS_SOURCE_NONLINEAR
IF (IERR.NE.0) CALL EXTIOF(NDSE,IERR,'W3IOGR','mod_def.'//FILEXT(:IEXT),51)
IF (.NOT. GUGINIT) THEN
Expand Down Expand Up @@ -1657,10 +1666,13 @@ SUBROUTINE W3IOGR ( INXOUT, NDSM, IMOD, FEXT &
GQNQ_OM2, GQTHRSAT, GQTHRCOU, GQAMP
IF (IERR.NE.0) CALL EXTIOF(NDSE,IERR,'W3IOGR','mod_def.'//FILEXT(:IEXT),51)
END IF
IF ( FLTEST ) WRITE (NDST,9051) SNLC1, LAM, &
KDCON, KDMN, SNLS1, SNLS2, SNLS3, &
IQTPE, NLTAIL, GQNF1, GQNT1, GQNQ_OM2, &
GQTHRSAT, GQTHRCOU, GQAMP
IF ( FLTEST ) WRITE (NDST,*) &
'SNLC1, LAM, KDCON, KDMN, SNLS1, SNLS2, SNLS3, &
IQTPE, NLTAIL, GQNF1, GQNT1, &
GQNQ_OM2, GQTHRSAT, GQTHRCOU, GQAMP:', &
SNLC1, LAM, KDCON, KDMN, SNLS1, SNLS2, SNLS3, &
IQTPE, NLTAIL, GQNF1, GQNT1, &
GQNQ_OM2, GQTHRSAT, GQTHRCOU, GQAMP
#endif
!
#ifdef W3_NL2
Expand Down
Loading