Skip to content
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
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 3.12)
project (WW3)

execute_process (
COMMAND sh ${CMAKE_SOURCE_DIR}/model/bin/ww3_from_ftp.sh
)
execute_process (
COMMAND sh ${CMAKE_SOURCE_DIR}/model/bin/w3_setup ${CMAKE_SOURCE_DIR}/model -c intel -s NCEP_st4
)

execute_process(COMMAND ${CMAKE_SOURCE_DIR}/model/bin/w3_automake)

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The WAVEWATCH III Framework

WAVEWATCH III ™ is a community wave modeling framework that includes the
WAVEWATCH III ® is a community wave modeling framework that includes the
latest scientific advancements in the field of wind-wave modeling and dynamics.

## General Features
Expand All @@ -11,7 +11,7 @@ for shallow-water (surf zone) applications, as well as wetting and drying of
grid points. Propagation of a wave spectrum can be solved using regular
(rectilinear or curvilinear) and unstructured (triangular) grids. See
[About WW3](https://github.com/NOAA-EMC/WW3/wiki/About-WW3) for a
detailed description of WAVEWATCH III ™.
detailed description of WAVEWATCH III ®.

## Installation

Expand Down
2 changes: 1 addition & 1 deletion manual/defs.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\newcommand{\WWver}{6.07}
\newcommand{\WWver}{7.00}
\newcommand{\guidever}{1.2}
\newcommand{\guideref}{tol:MMABguide}
\newcommand{\genever}{1.5}
Expand Down
27 changes: 2 additions & 25 deletions manual/intro/about.tex
Original file line number Diff line number Diff line change
Expand Up @@ -42,38 +42,15 @@ \subsection{~About this manual}
\vspace{\baselineskip}
\noindent
The present model version (\WWver) is the new public version based on the
previous official model release (version 5.16). The following are new features added
previous official model release (version 6.07). The following are new features added
and code-structure modifications made in \ws\ \WWver since the previous release.

\begin{list}{$\bullet$}{\rightmargin 5mm \parsep 0mm \itemsep 0mm}

\item Preparing for next model version, adding optional instrumentation to code
for profiling of memory use (model version 6.00).

\item Separates Stokes drift spectrum calculation (US3D) from OUTG and provides
new option to output surface Stokes drift partitioned into run-time defined
frequencies (USSP) (model version 6.01).

\item Adds a new module for ESMF interface (model version 6.02).

\item Adds a capability to update restart file's total energy based on independent
significant wave height analysis (model version 6.03).

\item Adds domain decomposition for unstructured implicit schemes using PDLIB
(Parallel Domain Decomposition Library) and ParMetis (model version 6.04).

\item Updates the namelist options for the following programs: ww3\_ounf, ww3\_ounp,
ww3\_trnc, ww3\_bounc, and ww3\_shel (model version 6.05).

\item Adding IC5 (the extended FS model) as a sea ice source term option (model version 6.06)

\item Public release (model version 6.07)
\item Preparing for next model version (model version 7.00).

\end{list}

Other additions include updates on source term parameterizations such IC2, IS2, ST4, REF1.


\vspace{\baselineskip} \noindent
Up to date information on this model can be found (including bugs and bug
fixes) on the \ws\ GitHub wiki page
Expand Down
8 changes: 4 additions & 4 deletions manual/start.tex
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
\vfill

March 2019 \\
%(DRAFT) \\
(DRAFT) \\
%Last Changed Rev: \SVNRevision\ % on \SVNDate \\
\vspace{\baselineskip}
%This model version will not be distributed \\
% This model version is an alpha distribution \\
% This model version is a beta distribution \\
%{\sc please do not refer to this manuscript} \\
%Please use the following citation from the previous release:
{\sc please do not refer to this manuscript} \\
Please use the following citation from the previous release:
%Use \cite{\prevman} and reference in section 1.1 instead.
{\sc To refer to this manual, please use the following citation:} \\
%{\sc To refer to this manual, please use the following citation:} \\
\end{center}
\noindent The WAVEWATCH III\textsuperscript{\textregistered} Development Group (\citetalias{ww3man2019}), \citeyearpar{ww3man2019}: User manual and system documentation of WAVEWATCH III\textsuperscript{\textregistered} version 6.07. Tech. Note 333, NOAA/NWS/NCEP/MMAB, College Park, MD, USA, 465 pp. + Appendices.

Expand Down
10 changes: 8 additions & 2 deletions model/bin/link.cray_xc.Intel
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@

# Intel compiler ------------------------------------------------------------
# 3.a Build options and determine compiler name
# No GRIB libraries for this one

opt="-o $prog"
opt="$opt -xHost -O3 -ip -fno-alias -fp-model strict -no-fma -ftz"
Expand Down Expand Up @@ -121,7 +120,14 @@
fi
fi

# netcdf library dir
if [ "$ncep_grib_compile" = 'yes' ]
then
# GRIB libraries for this one
opt="$opt -convert big_endian -assume byterecl -prec-div -prec-sqrt -ip"
libs="$libs ${G2_LIB4} ${W3NCO_LIB4} ${BACIO_LIB4} ${JASPER_LIB} ${PNG_LIB} ${Z_LIB}"
fi

# netcdf library dir
if [ "$netcdf_compile" = 'yes' ]
then
case $WWATCH3_NETCDF in
Expand Down
5 changes: 4 additions & 1 deletion model/bin/link.wcoss_phase2
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,11 @@
esac
fi

if [ "$prog" = 'ww3_grib' ]
# NCEP grib creation
if [ "$ncep_grib_compile" = 'yes' ]
then
# GRIB libraries for this one
opt="$opt -convert big_endian -assume byterecl -prec-div -prec-sqrt -ip"
libs="$libs ${G2_LIB4} ${W3NCO_LIB4} ${BACIO_LIB4} ${JASPER_LIB} ${PNG_LIB} ${Z_LIB}"
fi

Expand Down
1 change: 1 addition & 0 deletions model/bin/switch_NCEP_glwu
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
F90 NCO NOPA LRB4 NCEP2 DIST MPI SCRIP SCRIPNC NC4 PR3 UQ ST4 STAB0 FLX0 LN1 NL3 BT1 DB1 IC0 IS0 REF0 MLIM TR0 BS0 XX0 WNX1 WNT1 CRX1 CRT1 O0 O1 O2 O4 O5 O6 O7 O14 O15
1 change: 1 addition & 0 deletions model/bin/switch_NCEP_gwm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
F90 NCO NOPA LRB4 NOGRB DIST MPI OMPH OMPG SCRIP SCRIPNC NC4 PR3 UQ ST4 STAB0 FLX0 LN1 NL1 BT1 DB1 IC4 IS0 REF0 TR0 BS0 XX0 WNX1 WNT1 CRX1 CRT1 RWND O0 O1 O2 O4 O5 O6 O7 O14 O15
7 changes: 7 additions & 0 deletions model/bin/w3_make
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@
cdf_programs="$cdf_programs ww3_prtide"
fi

# NCEP GRIB
export ncep_grib_compile="no"
if [ -n "`grep NCEP $switch_file`" ]
then
export ncep_grib_compile="yes"
fi

# MULTI MULTI_ESMF SBS1
if [ -n "`grep SCRIPNC $switch_file`" ] || [ -n "`grep OASIS $switch_file`" ] || [ -n "`grep PDLIB $switch_file`" ]
then
Expand Down
4 changes: 2 additions & 2 deletions model/bin/ww3_from_ftp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ wget ftp://polar.ncep.noaa.gov/tempor/ww3ftp/ww3_from_ftp.v6.07.tar.gz
tar -xvzf ww3_from_ftp.v6.07.tar.gz

#Move regtest info from data_regtests to regtests:
echo -e "Moving data from data_regtests to regtets"
echo -e "Moving data from data_regtests to regtests"
cp -r data_regtests/ww3_tp2.15/input/*.nc regtests/ww3_tp2.15/input/
cp -r data_regtests/ww3_tp2.13/*.png regtests/ww3_tp2.13/
cp -r data_regtests/ww3_tic1.4/input/*.nc regtests/ww3_tic1.4/input/
Expand Down Expand Up @@ -53,7 +53,7 @@ else
echo -e ' Not deleting tar file.'
fi

echo -e "\n\n Files were copied from the data_regtests to the regtets folder."
echo -e "\n\n Files were copied from the data_regtests to the regstets folder."
echo -e "Do you want to delete the data_regtests folder? [y|n]: "
read wnew2
if [ "${wnew2}" = "Y" ] || [ "${wnew2}" = "y" ]
Expand Down
2 changes: 1 addition & 1 deletion model/ftn/w3initmd.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
PUBLIC
!/
REAL, PARAMETER :: CRITOS = 15.
CHARACTER(LEN=10), PARAMETER :: WWVER = '6.07 '
CHARACTER(LEN=10), PARAMETER :: WWVER = '7.00 '
CHARACTER(LEN=512), PARAMETER :: SWITCHES = &
'PUT_SW1' // &
'PUT_SW2' // &
Expand Down
40 changes: 24 additions & 16 deletions model/ftn/w3sdb1md.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -57,27 +57,37 @@
!/ | FORTRAN 90 |
!/ | J. H. Alves |
!/ | H. L. Tolman |
!/ ! A. Roland |
!/ | Last update : 08-Jun-2018 |
!/ +-----------------------------------+
!/
!/ 25-Apr-2007 : Origination of module. ( version 3.11 )
!/ 08-Jun-2018 : Add DEBUGDB1. ( version 6.04 )
!/ 03-Apr-2019 : Rewrite in terms of energy density (A. Roland,version 6.07)
!/ 03-Apr-2019 : Add Thornton & Guza, 1983 (A. Roland,version 6.07)
!/
! 1. Purpose :
!
! Compute depth-induced breaking using Battjes and Janssen bore
! model approach
!
! 2. Method :
!
! Sdb = - CDB * FMEAN * QB * B * B * SPEC
!
! Where CDB = SDBC1 = 0.25 * BJALFA (defaults to BJALFA = 1)
! modified via ww3_grid namelist parameter BJALFA
! B = HM / HRMS
! HM = GAMMA * DEP
! GAMMA = SDBC2 defaults to 0.73 (mean Battjes/Janssen value)
! modified via ww3_grid namelist parameter BJGAM
! 2. Method : Battjes & Janssen (1978),
!
! Sbr = Dtot/Etot*WA = D * WA
! Dtot = 0.25*alpha*Qb*fm*Hmax²
! fm = sigma/2Pi
! BB = Hrms²/Hmax² = 8Etot/Hmax²
! D = Dtot/Etot = BJALFA * sigma / pi * Qb/BB = 2 * BJALFA * fm * Qb/BB
!
! AR: only valid for Hrms .le. Hm, Qb .le. 1, otherwise, in the degenrative regime it is
! due to Qb > 1 that all wave are broken and Hrms .le. Hmax
! MLIM can be used to enforce this conditions, source term will smoothly converge to this limit.
!
! Where CDB = SDBC1 = BJALFA (defaults to BJALFA = 1)
! modified via ww3_grid namelist parameter BJALFA
! HM = GAMMA * DEP
! GAMMA = SDBC2 defaults to 0.73 (mean Battjes/Janssen value)
! modified via ww3_grid namelist parameter BJGAM
!
! And QB is estimated by iterations using the nonlinear expression
!
Expand Down Expand Up @@ -145,7 +155,6 @@
!/
INTEGER, INTENT(IN) :: IX ! Local grid number
REAL, INTENT(IN) :: A(NSPEC)
!AR: This below is not good I know ... we need more inlined methods ...
REAL, INTENT(INOUT) :: EMEAN, FMEAN, WNMEAN, DEPTH
REAL, INTENT(OUT) :: S(NSPEC), D(NSPEC)
REAL, INTENT(IN) :: CG(NK)
Expand Down Expand Up @@ -179,7 +188,7 @@
!
!/T WRITE (NDST,9000) SDBC1, SDBC2, FDONLY
!
! 1. Integral quantities ... only for the case when it is used nonlinear in the solver ...
! 1. Integral quantities. AR: make sure mean quantities are computed, need to move upward
!
ETOT = 0.
FMEAN2 = 0.
Expand Down Expand Up @@ -256,16 +265,16 @@
IF (IWB == 1) THEN
IF ( ( BB .GT. THR) .AND. ( ABS ( BB - QB ) .GT. THR) ) THEN
IF ( BB .LT. 1.0) THEN
CBJ = DBLE(SDBC1) * QB * DBLE(FMEAN) / BB
CBJ = 2 * DBLE(SDBC1) * QB * DBLE(FMEAN) / BB
ELSE
CBJ = DBLE(SDBC1) * DBLE(FMEAN) * BB ! Make sure the energy vanishes ...
CBJ = 2 * DBLE(SDBC1) * DBLE(FMEAN) * BB ! AR: degenerative regime, all waves must be .le. Hmax, we just smoothly let the excessive energy vanish by * BB.
END IF
ELSE
CBJ = 0.d0
ENDIF
D = - CBJ
S = D * A
ELSE IF (IWB == 2) THEN
ELSE IF (IWB == 2) THEN
IF (ETOT .GT. THR) THEN
HRMS = SQRT(8*EMEAN)
FAK = (1+4./SQRT(PI)*(B*BB+1.5*B)*exp(-BB)-ERF(B))
Expand All @@ -275,7 +284,6 @@
ENDIF
D = - CBJ
S = D * A
ELSE IF (IWB == 3) THEN
ENDIF

IF (CBJ .GT. 0.) THEN
Expand Down
2 changes: 1 addition & 1 deletion model/ftn/ww3_grid.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -1888,7 +1888,7 @@
!/DB1 ' Using Hmax/d in Miche style formulation.'
!/DB1 END IF
!/DB1 WRITE (NDSO,*)
!/DB1 SDBC1 = 0.25 * BJALFA
!/DB1 SDBC1 = BJALFA
!/DB1 SDBC2 = BJGAM
!/DB1 FDONLY = BJFLAG
!
Expand Down
10 changes: 7 additions & 3 deletions model/ftn/ww3_ounf.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
!/ | F. Ardhuin |
!/ | M. Accensi |
!/ | FORTRAN 90 |
!/ | Last update : 12-Sep-2018 |
!/ | Last update : 28-Mar-2019 |
!/ +-----------------------------------+
!/
!/ 17-Mar-2010 : Creation ( version 3.14_SHOM )
Expand All @@ -31,6 +31,7 @@
!/ 26-Jul-2018 : Changed reading of TABIPART ( version 6.05 )
!/ 12-Sep-2018 : Added extra partitioned fields ( version 6.06 )
!/ 25-Sep-2018 : Add WBT parameter ( version 6.06 )
!/ 28-Mar-2019 : Bugfix to NBIPART check. ( version 6.07 )
!/
!/ Copyright 2009-2013 National Weather Service (NWS),
!/ National Oceanic and Atmospheric Administration. All rights
Expand Down Expand Up @@ -381,7 +382,7 @@

! Alternative processing of TABIPART to capture requests
! greater than NOSWLL (C.Bunney):
ALLOCATE(TABIPART(NOSWLL))
ALLOCATE(TABIPART(NOSWLL + 1))
NBIPART=0
DO I=1,30
IF(STRINGIPART(I:I) .EQ. ' ') CYCLE
Expand All @@ -391,7 +392,7 @@
CYCLE
ENDIF
NBIPART = NBIPART + 1
IF(NBIPART .GT. NOSWLL) THEN
IF(NBIPART .GT. NOSWLL + 1) THEN
GOTO 803
ENDIF
TABIPART(NBIPART) = IPART
Expand Down Expand Up @@ -3397,6 +3398,9 @@
FNAMENC(S1+S2+1:S1+S2+3) = '.nc'
FNAMENC(S1+S2+4:S1+S2+6) = ' '

!/NCO ! For NCEP application, requires fixed netcdf file name
!/NCO FNAMENC='ww3.gridded.nc'

! If the flag frequency is .TRUE., defines the fourth dimension
IF (FLFRQ) THEN
UNITVAR(:)=UNITS
Expand Down
2 changes: 1 addition & 1 deletion model/ftn/ww3_ounp.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
!/MPI INTEGER :: IERR_MPI
!/O14 INTEGER :: NDBO
!/S INTEGER, SAVE :: IENT = 0
!/NCO INTEGER :: NDSTAB
!/NCO INTEGER :: NDSTAB, NDST
!
INTEGER, ALLOCATABLE :: INDREQ(:), INDREQTMP(:)
INTEGER,ALLOCATABLE :: NCID(:)
Expand Down
Loading