Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feature/coastalapp
Browse files Browse the repository at this point in the history
  • Loading branch information
uturuncoglu committed Nov 3, 2023
2 parents 0d50f98 + 7bbdaca commit 651769b
Show file tree
Hide file tree
Showing 73 changed files with 1,929 additions and 836 deletions.
15 changes: 11 additions & 4 deletions manual/eqs/output.tex
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ \subsection{~Output parameters} \label{sub:outpars}
in \para\ref{sec:ww3shel}. That input file also provides a list of flags
indicating if output parameters are available in different field
output file types (ASCII, grib, igrads, NetCDF).
For any details on how these parameters are computed, the user may read the code of the {\code w3iogo} routine, in the {\code w3iogomd.ftn} module.
For any details on how these parameters are computed, the user may read the code of the {\code w3iogo} routine, in the {\code w3iogomd.F90} module.

Selection of field outputs in {\code ww3\_shel.inp} is most easily performed by providing a list of the
Selection of field outputs in {\code ww3\_shel.nml} or {\code ww3\_shel.inp} is most easily performed by providing a list of the
requested parameters, for example, {\textbf HS DIR SPR} will request the calculation of significant wave height, mean direction and directional spread. These will thus be stored in the {\code out\_grd.XX} file and can be post-processed, for example in NetCDF using {\code ww3\_ouf}. Examples are given in \para\ref{sec:ww3multi} and
\para\ref{sec:ww3ounf}. The names for these namelists are the bold names below, for
example \textbf{HS}.
Expand All @@ -26,6 +26,9 @@ \subsection{~Output parameters} \label{sub:outpars}
file extensions, NetCDF variable names and namelist-based selection (see
also \para\ref{sec:ww3ounf}), and the long parameter name/definition.

When the result is not overly sensitive to the contribution of the unresolved part of the spectrum (for $f<f_{NK}$), the contribution of the tail is parameterized assuming a power law decay of the spectrum, by default $E(f,\theta) = E(f_{NK},\theta) (f_{NK}/f)^{-5}$, for some parameters this is either unnecessary or misleading, and the integrals are computed only up to $f_{NK}$.


Finally we note that in all definitions the frequency is the \emph{relative} frequency. Thus, in the presence of currents, these can only be compared to drifting measurement data or data obtained in wavenumber and converted to frequency. Comparison to fixed instrument data requires the use of the full spectrum and proper conversion to the fixed reference frame.

\begin{list}{\Roman{outgrps})\hfill}
Expand Down Expand Up @@ -300,8 +303,12 @@ \subsection{~Output parameters} \label{sub:outpars}
\item \textbf{MSD} Direction of the maximum slope variance mss$_u$
\item \textbf{MCD} Spectral tail direction
\item \textbf{QP} Peakedness parameter \citep{art:G70}
\begin{equation} Q_p = \frac{2}{E^2} \int_0^{2\pi} \int_0^\infty
\sigma\:F(\sigma,\theta)^2\:d\sigma\:d\theta \: \label{eq:qp}
\begin{equation} Q_p = \frac{2}{E^2} \int_0^{f_{NK}} f \left( \int_0^{2\pi}
F(f,\theta) \:\rd \theta \right)^2 \: \rd f \: \label{eq:qp}
\end{equation}
\item \textbf{QKK} wavenumber peakedness \citep{art:DC23}
\begin{equation} Q_{kk} = \frac{1}{E^2} \int_0^{f_{NK}} \int_0^{2\pi}
0.5 \left[ A(k,\theta)+ A(k,\theta+\pi)\right]^2 \frac{\sigma^2}{k C_g} \:\rd \theta \: \rd \sigma \: \label{eq:qkk}
\end{equation}
\end{list}

Expand Down
10 changes: 10 additions & 0 deletions manual/manual.bib
Original file line number Diff line number Diff line change
Expand Up @@ -3654,3 +3654,13 @@ @article{vanVledder2006
volume = {53},
year = {2006}
}

@article{art:DC23,
author = {De Carlo, Marine and Fabrice Ardhuin and Annabelle Ollivier and Adrien Nigou },
journal = {Journal of Geophysical Research - Oceans},
keywords = {wave groups,altimetry},
pages = {},
title = {Wave groups and small scale variability of wave heights observed by altimeters},
volume = {},
year = {2023}
}
9 changes: 5 additions & 4 deletions model/inp/ww3_shel.inp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ $ T T 2 15 HMAXD SDMH St Dev of MXC (STE)
$ T T 2 16 HCMAXD SDMHC St Dev of MXHC (STE)
$ F T 2 17 WBT WBT Dominant wave breaking probability bT
$ F F 2 18 FP0 TP Peak period (from peak freq)
$ F F 2 19 WNMEAN WNM Mean wavenumber
$ -------------------------------------------------
$ 3 Spectral Parameters (first 5)
$ -------------------------------------------------
Expand Down Expand Up @@ -211,10 +212,10 @@ $ 8 Spectrum parameters
$ -------------------------------------------------
$ F F 8 1 MSS[X,Y] MSS Mean square slopes
$ F F 8 2 MSC[X,Y] MSC Spectral level at high frequency tail
$ F F 8 3 WL02[X,Y] WL02 East/X North/Y mean wavelength compon
$ F F 8 4 ALPXT AXT Correl sea surface gradients (x,t)
$ F F 8 5 ALPYT AYT Correl sea surface gradients (y,t)
$ F F 8 6 ALPXY AXY Correl sea surface gradients (x,y)
! F F 8 3 MSSD MSD Slope direction
! F F 8 4 MSCD MCD Tail slope direction
! F F 8 5 QP QP Goda peakedness parameter
! F F 8 6 QKK QKK Wavenumber peakedness
$ -------------------------------------------------
$ 9 Numerical diagnostics
$ -------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions model/nml/ww3_multi.nml
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,13 @@
!
! * the detailed list of field names is given in model/nml/ww3_shel.nml :
! DPT CUR WND AST WLV ICE IBG TAU RHO D50 IC1 IC5
! HS LM T02 T0M1 T01 FP DIR SPR DP HIG
! HS LM T02 T0M1 T01 FP DIR SPR DP HIG MXE MXES MXH MXHC SDMH SDMHC WBT TP WNM
! EF TH1M STH1M TH2M STH2M WN
! PHS PTP PLP PDIR PSPR PWS PDP PQP PPE PGW PSW PTM10 PT01 PT02 PEP TWS PNR
! UST CHA CGE FAW TAW TWA WCC WCF WCH WCM FWS
! SXY TWO BHD FOC TUS USS P2S USF P2L TWI FIC USP TOC
! ABR UBR BED FBB TBB
! MSS MSC WL02 AXT AYT AXY
! MSS MSC MSD MCD QP QKK
! DTD FC CFX CFD CFK
! U1 U2
!
Expand Down
9 changes: 5 additions & 4 deletions model/nml/ww3_shel.nml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
! T T 2 16 HCMAXD SDMHC St Dev of MXHC (STE)
! F T 2 17 WBT WBT Dominant wave breaking probability bT
! F F 2 18 FP0 TP Peak period (from peak freq)
! F F 2 19 WNMEAN WNM Mean wavenumber
! -------------------------------------------------
! 3 Spectral Parameters (first 5)
! -------------------------------------------------
Expand Down Expand Up @@ -201,10 +202,10 @@
! -------------------------------------------------
! F F 8 1 MSS[X,Y] MSS Mean square slopes
! F F 8 2 MSC[X,Y] MSC Spectral level at high frequency tail
! F F 8 3 WL02[X,Y] WL02 East/X North/Y mean wavelength compon
! F F 8 4 ALPXT AXT Correl sea surface gradients (x,t)
! F F 8 5 ALPYT AYT Correl sea surface gradients (y,t)
! F F 8 6 ALPXY AXY Correl sea surface gradients (x,y)
! F F 8 3 MSSD MSD Slope direction
! F F 8 4 MSCD MCD Tail slope direction
! F F 8 5 QP QP Goda peakedness parameter
! F F 8 6 QKK QKK Wavenumber peakedness
! -------------------------------------------------
! 9 Numerical diagnostics
! -------------------------------------------------
Expand Down
42 changes: 42 additions & 0 deletions model/src/gx_outf.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
!> @file
!> @brief Generate GrADS input files from raw WAVEWATCH data file.
!>
!> @author H. L. Tolman
!> @author A. Chawla
!> @author J.H.G.M. Alves
!> @date 22-Mar-2021
!>
#include "w3macros.h"

!/ ------------------------------------------------------------------- /
!>
!> @brief Generate GrADS input files from raw WAVEWATCH data file.
!>
!> @details
!> Data is read from the grid output file out_grd.ww3 (raw data)
!> and from the file gx_outf.inp ( NDSI, output requests ).
!> Model definition and raw data files are read using WAVEWATCH III
!> subroutines.
!>
!> Output files are ww3.ctl and ww3.grads. The output files
!> contains a land-sea map, followed by requested fields. See the
!> control file for the names of the fields.
!>
!> @author H. L. Tolman
!> @author A. Chawla
!> @author J.H.G.M. Alves
!> @date 22-Mar-2021
!>
!> @copyright Copyright 2009-2022 National Weather Service (NWS),
!> National Oceanic and Atmospheric Administration. All rights
!> reserved. WAVEWATCH III is a trademark of the NWS.
!> No unauthorized use without permission.
!>
PROGRAM GXOUTF
!/
!/ +-----------------------------------+
Expand Down Expand Up @@ -740,6 +772,16 @@ PROGRAM GXOUTF
!/
CONTAINS
!/ ------------------------------------------------------------------- /
!>
!> @brief Perform actual output for GrADS postprocessing.
!>
!> @param[in] NX Grid dimensions.
!> @param[in] NY Grid dimensions.
!> @param[in] NSEA Number of sea points.
!>
!> @author H. L. Tolman
!> @date 22-Mar-2021
!>
SUBROUTINE GXEXGO ( NX, NY, NSEA )
!/
!/ +-----------------------------------+
Expand Down
28 changes: 28 additions & 0 deletions model/src/gx_outp.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
!> @file
!> @brief Post-processing of point output for GrADS post-processing.
!>
!> @author H. L. Tolman
!> @author J.H. Alves
!> @author F. Ardhuin
!> @date 27-Aug-2015
!>

#include "w3macros.h"
!/ ------------------------------------------------------------------- /
!>
!> @brief Post-processing of point output for GrADS post-processing.
!>
!> @author H. L. Tolman
!> @author J.H. Alves
!> @author F. Ardhuin
!> @date 27-Aug-2015
!>
!> @copyright Copyright 2009-2022 National Weather Service (NWS),
!> National Oceanic and Atmospheric Administration. All rights
!> reserved. WAVEWATCH III is a trademark of the NWS.
!> No unauthorized use without permission.
!>
PROGRAM GXOUTP
!/
!/ +-----------------------------------+
Expand Down Expand Up @@ -539,6 +561,12 @@ PROGRAM GXOUTP
!/
CONTAINS
!/ ------------------------------------------------------------------- /
!>
!> @brief Perform actual point output.
!>
!> @author H. L. Tolman
!> @date 16-Jul-2012
!>
SUBROUTINE GXEXPO
!/
!/ +-----------------------------------+
Expand Down
19 changes: 15 additions & 4 deletions model/src/w3adatmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ MODULE W3ADATMD
! MSSD R.A. Public Direction of MSSX
! MSCD R.A. Public Direction of MSCX
! QP R.A. Public Goda peakedness parameter.
! QKK R.A. Public Spectral bandwidth (De Carlo et al. 2023)
!
! DTDYN R.A. Public Mean dynamic time step (raw).
! FCUT R.A. Public Cut-off frequency for tail.
Expand Down Expand Up @@ -477,9 +478,9 @@ MODULE W3ADATMD
! Output fields group 8)
!
REAL, POINTER :: MSSX(:), MSSY(:), MSSD(:), &
MSCX(:), MSCY(:), MSCD(:)
MSCX(:), MSCY(:), MSCD(:), QKK(:)
REAL, POINTER :: XMSSX(:), XMSSY(:), XMSSD(:), &
XMSCX(:), XMSCY(:), XMSCD(:)
XMSCX(:), XMSCY(:), XMSCD(:), XQKK(:)
!
! Output fields group 9)
!
Expand Down Expand Up @@ -626,7 +627,7 @@ MODULE W3ADATMD
BEDFORMS(:,:), PHIBBL(:), TAUBBL(:,:)
!
REAL, POINTER :: MSSX(:), MSSY(:), MSSD(:), &
MSCX(:), MSCY(:), MSCD(:)
MSCX(:), MSCY(:), MSCD(:), QKK(:)
!
REAL, POINTER :: DTDYN(:), FCUT(:), CFLXYMAX(:), &
CFLTHMAX(:), CFLKMAX(:)
Expand Down Expand Up @@ -1295,7 +1296,7 @@ SUBROUTINE W3DIMA ( IMOD, NDSE, NDST, D_ONLY )
ALLOCATE ( WADATS(IMOD)%MSSX(NSEALM), WADATS(IMOD)%MSSY(NSEALM), &
WADATS(IMOD)%MSCX(NSEALM), WADATS(IMOD)%MSCY(NSEALM), &
WADATS(IMOD)%MSSD(NSEALM), WADATS(IMOD)%MSCD(NSEALM), &
STAT=ISTAT )
WADATS(IMOD)%QKK(NSEALM), STAT=ISTAT )
CHECK_ALLOC_STATUS ( ISTAT )
!
WADATS(IMOD)%MSSX = UNDEF
Expand All @@ -1304,6 +1305,7 @@ SUBROUTINE W3DIMA ( IMOD, NDSE, NDST, D_ONLY )
WADATS(IMOD)%MSCX = UNDEF
WADATS(IMOD)%MSCY = UNDEF
WADATS(IMOD)%MSCD = UNDEF
WADATS(IMOD)%QKK = UNDEF
call print_memcheck(memunit, 'memcheck_____:'//' W3DIMA 8')
!
! 9) Numerical diagnostics
Expand Down Expand Up @@ -2316,13 +2318,20 @@ SUBROUTINE W3XDMA ( IMOD, NDSE, NDST, OUTFLAGS )
ALLOCATE ( WADATS(IMOD)%XQP(1) )
END IF
!
IF ( OUTFLAGS( 8, 6) ) THEN
ALLOCATE ( WADATS(IMOD)%XQKK(NXXX) )
ELSE
ALLOCATE ( WADATS(IMOD)%XQKK(1) )
END IF
!
WADATS(IMOD)%XMSSX = UNDEF
WADATS(IMOD)%XMSSY = UNDEF
WADATS(IMOD)%XMSSD = UNDEF
WADATS(IMOD)%XMSCX = UNDEF
WADATS(IMOD)%XMSCY = UNDEF
WADATS(IMOD)%XMSCD = UNDEF
WADATS(IMOD)%XQP(1) = UNDEF
WADATS(IMOD)%XQKK = UNDEF
!
IF ( OUTFLAGS( 9, 1) ) THEN
ALLOCATE ( WADATS(IMOD)%XDTDYN(NXXX), STAT=ISTAT )
Expand Down Expand Up @@ -2936,6 +2945,7 @@ SUBROUTINE W3SETA ( IMOD, NDSE, NDST )
MSCX => WADATS(IMOD)%MSCX
MSCY => WADATS(IMOD)%MSCY
MSCD => WADATS(IMOD)%MSCD
QKK => WADATS(IMOD)%QKK
!
DTDYN => WADATS(IMOD)%DTDYN
FCUT => WADATS(IMOD)%FCUT
Expand Down Expand Up @@ -3289,6 +3299,7 @@ SUBROUTINE W3XETA ( IMOD, NDSE, NDST )
MSCX => WADATS(IMOD)%XMSCX
MSCY => WADATS(IMOD)%XMSCY
MSCD => WADATS(IMOD)%XMSCD
QKK => WADATS(IMOD)%XQKK
!
DTDYN => WADATS(IMOD)%XDTDYN
FCUT => WADATS(IMOD)%XFCUT
Expand Down
Loading

0 comments on commit 651769b

Please sign in to comment.