Skip to content

Commit 4c46ae5

Browse files
committed
Merge branch 'fb_stvp' of github.com:CarstenHansen/WW3 into fb_xsmf
2 parents 23af9d4 + 70a7ef3 commit 4c46ae5

101 files changed

Lines changed: 1469 additions & 1391 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/gnu.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ concurrency:
88

99
env:
1010
cache_key: gnu11
11-
CC: gcc-10
12-
FC: gfortran-10
13-
CXX: g++-10
11+
CC: gcc-14
12+
FC: gfortran-14
13+
CXX: g++-14
1414

1515

1616
# Split into a steup step, and a WW3 build step which
@@ -45,7 +45,8 @@ jobs:
4545
run: |
4646
# Install NetCDF, ESMF, g2, etc using Spack
4747
sudo apt install cmake
48-
git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
48+
#git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
49+
git clone -c feature.manyFiles=true --depth=2 --branch=spack-stack-1.9.3 https://github.com/JCSDA/spack.git
4950
source spack/share/spack/setup-env.sh
5051
spack env create ww3-gnu ww3/model/ci/spack_gnu.yaml
5152
spack env activate ww3-gnu

.github/workflows/intel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ env:
2626

2727
jobs:
2828
setup:
29-
runs-on: ubuntu-latest
29+
runs-on: ubuntu-22.04
3030

3131
steps:
3232

.github/workflows/regtest_gnu.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ concurrency:
88

99
env:
1010
cache_key: gnu11-1
11-
CC: gcc-10
12-
FC: gfortran-10
13-
CXX: g++-10
11+
CC: gcc-14
12+
FC: gfortran-14
13+
CXX: g++-14
1414

1515

1616
# Split into a steup step, and a WW3 build step which
@@ -45,7 +45,7 @@ jobs:
4545
run: |
4646
# Install NetCDF, ESMF, g2, etc using Spack
4747
sudo apt install cmake
48-
git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
48+
git clone -c feature.manyFiles=true --depth=2 --branch=spack-stack-1.9.3 https://github.com/JCSDA/spack.git
4949
source spack/share/spack/setup-env.sh
5050
spack env create ww3-gnu ww3/model/ci/spack_gnu.yaml
5151
spack env activate ww3-gnu

manual/eqs/output.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ \subsection{~Output parameters} \label{sub:outpars}
128128
\frac{a_1(f)^2+b_1(f)^2}{E(f)^2} \right )^{1/2} \right \} \right ]^{1/2}
129129
\: , \label{eq:sig_th1} \end{equation}
130130
\item \textbf{TH2M} Mean direction from $a_2$ and $b_2$ (degr.)
131-
\begin{equation} \theta_2 (f)= \mbox{atan} \left ( \frac{b_2(f)}{a_2(f)} \right )
131+
\begin{equation} \theta_2 (f)= 0.5 \mbox{atan} \left ( \frac{b_2(f)}{a_2(f)} \right )
132132
\: , \label{eq:theta_2} \end{equation} \begin{equation}
133133
a_2(f) = 2 \pi \int_0^{2\pi} \int_0^\infty \cos(2 \theta) F(\sigma,\theta) \:
134134
\mathrm{d}\theta \: , \end{equation} \begin{equation}

model/bin/switch_NCEP_rwps

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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

model/ci/spack_gnu.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ spack:
77
- metis@5.1.0~shared
88
- parmetis@4.0.3~shared
99
- scotch@7.0.1+mpi+metis~shared
10-
- netcdf-c@4.7.4~dap
11-
- netcdf-fortran@4.5.3
10+
- netcdf-c@4.9.2~dap
11+
- netcdf-fortran@4.6.1
1212
- jasper@2.0.32
1313
- g2@3.4.5
1414
- bacio@2.4.1
15-
- w3emc@2.9.2
15+
- w3emc@2.12.0
1616
- parallelio@2.5.9+fortran~pnetcdf
1717
- esmf@8.4.2~debug~xerces+external-parallelio
1818
view: true

model/ci/spack_intel.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ spack:
55
providers:
66
mpi: [intel-oneapi-mpi]
77
specs:
8-
- netcdf-c@4.7.4~dap
9-
- netcdf-fortran@4.5.3
8+
- netcdf-c@4.9.2~dap
9+
- netcdf-fortran@4.6.1
1010
- bacio@2.4.1
1111
- g2@3.4.5
1212
- metis@5.1.0~shared

model/inp/ww3_grid.inp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ $ JGS_LIMITER : TRUE: Use total (quasi-steady: limits
358358
$ FALSE: default
359359
$ JGS_LIMITER_FUNC : 1 - old limiter (default)
360360
$ 2 - alternatnive limiter
361+
$                           JGS_TRUNK_DIGITS  : [Only with switch TRNK] Number of digits of precision to truncate solution to at the end of iterative solver.
362+
$                                               Can be used to force bit-for-bit reproducibility.
361363
$ SETUP_APPLY_WLV : Compute wave setup (TRUE/FALSE, default TRUE)
362364
$ SOLVERTHR_SETUP : Solver threshold for setup computations (default 1E-6)
363365
$ CRIT_DEP_SETUP : Critical depth for setup computations (default 0.1)

model/src/CMakeLists.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,17 @@ foreach(program ${programs})
207207
target_link_libraries(${program} PRIVATE ww3_lib)
208208
endforeach()
209209

210-
target_compile_options(ww3_lib PUBLIC "$<$<COMPILE_LANGUAGE:Fortran>:${compile_flags}>")
211-
target_compile_options(ww3_lib PUBLIC "$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:Fortran>>:${compile_flags_debug}>")
212-
target_compile_options(ww3_lib PUBLIC "$<$<AND:$<CONFIG:Release>,$<COMPILE_LANGUAGE:Fortran>>:${compile_flags_release}>")
210+
if (UFS_CAP)
211+
# Building as part of UFS (submodule)
212+
set(WW3_FLAG_SCOPE PRIVATE)
213+
else()
214+
# Standalone WW3 build
215+
set(WW3_FLAG_SCOPE PUBLIC)
216+
endif()
217+
218+
target_compile_options(ww3_lib ${WW3_FLAG_SCOPE} "$<$<COMPILE_LANGUAGE:Fortran>:${compile_flags}>")
219+
target_compile_options(ww3_lib ${WW3_FLAG_SCOPE} "$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:Fortran>>:${compile_flags_debug}>")
220+
target_compile_options(ww3_lib ${WW3_FLAG_SCOPE} "$<$<AND:$<CONFIG:Release>,$<COMPILE_LANGUAGE:Fortran>>:${compile_flags_release}>")
213221

214222
install(
215223
TARGETS ${programs} ww3_lib

model/src/PDLIB/yowdatapool.F90

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
!
3838
!> Has fancy data
3939
module yowDatapool
40-
use MPI, only: MPI_COMM_WORLD, MPI_INTEGER, MPI_REAL4, MPI_REAL8, MPI_STATUS_SIZE
40+
use mpi_f08, only: MPI_COMM_WORLD, MPI_INTEGER, MPI_REAL4, MPI_REAL8, &
41+
MPI_COMM, MPI_STATUS, MPI_Datatype
4142
implicit none
4243
!#ifdef USE_SINGLE
4344
! !> single precision. Enable with compiler flag -DUSE_SINGLE
@@ -63,17 +64,17 @@ module yowDatapool
6364

6465
!> MPI Communicator.
6566
!> Should be MPI_COMM_WORLD. If pdlib is run into a existing MPI enviroment, comm is set to a new communicator
66-
integer,public,save :: comm
67+
type(MPI_COMM),public,save :: comm
6768

6869
!> MPI Integer Type.
6970
!> Should be MPI_INTEGER
70-
integer,save :: itype = MPI_INTEGER
71+
type(MPI_Datatype),save :: itype = MPI_INTEGER
7172

7273
!> MPI Real Type
7374
!> Shpuld be MPI_REAL8
74-
integer :: istatus(MPI_STATUS_SIZE)
75+
type(MPI_STATUS) :: istatus
7576
!#ifdef USE_SINGLE
76-
integer, save :: rtype = MPI_REAL4
77+
type(MPI_Datatype), save :: rtype = MPI_REAL4
7778
!#else
7879
! integer, save :: rtype = MPI_REAL8
7980
!#endif

0 commit comments

Comments
 (0)