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

Feature/skewness #1209

Merged
merged 37 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e42793b
start to integrate ST4 updates
mickaelaccensi Jul 18, 2023
c987666
import ST4 changes
mickaelaccensi Jul 18, 2023
283b989
add regtest
mickaelaccensi Jul 18, 2023
0aa822c
Merge branch 'develop' into feature/ST4table
mickaelaccensi Sep 18, 2023
ba991c5
add SINTAILPAR init
mickaelaccensi Sep 20, 2023
1debbc0
Merge branch 'develop' into feature/ST4table
mickaelaccensi Sep 21, 2023
c30b602
Merge branch 'develop' into feature/ST4table
mickaelaccensi Sep 25, 2023
fcf9fa6
add namelists
mickaelaccensi Sep 27, 2023
f2a218b
address issue #1085
mickaelaccensi Oct 3, 2023
d67023b
Merge branch 'develop' into feature/ST4table
mickaelaccensi Oct 20, 2023
a4fde71
Merge branch 'develop' into feature/ST4table
mickaelaccensi Nov 7, 2023
776aba6
correct typo
mickaelaccensi Nov 7, 2023
e407f71
remove comment
mickaelaccensi Nov 10, 2023
e1929a6
correct typo
mickaelaccensi Nov 10, 2023
7c375bd
correct bug in mod_def reading
mickaelaccensi Nov 10, 2023
3608127
add variable initialization
mickaelaccensi Nov 10, 2023
bd3aa72
manually merge bgufix/gqm
mickaelaccensi Nov 21, 2023
6837772
Corrected type of VISCSTRESS from INTEGER to REAL
Dec 1, 2023
1e1e2c1
Merge branch 'feature/ST4table' of https://gitlab.ifremer.fr/wave/WW3…
mickaelaccensi Dec 1, 2023
0c6fc46
Merge branch 'develop' into feature/ST4table
mickaelaccensi Dec 1, 2023
b00cd4e
correct typo
mickaelaccensi Dec 1, 2023
dbe8e6c
Fixed bug with undefined LEVTAIL used instead of LEVTAIL0 when table is
Jan 4, 2024
feff3be
merging before pushing LEVTAIL bug correction
Jan 4, 2024
96174c2
Merge branch 'develop' into feature/ST4table
mickaelaccensi Jan 4, 2024
9e90bbf
Updated name of namelist parameters
Mar 2, 2024
60077a7
Merge branch 'feature/ST4table' of https://gitlab.ifremer.fr/wave/WW3…
Mar 2, 2024
107ac14
Prepared the implementation of Skewness calculation adated from ECWAM
Mar 2, 2024
dd89b25
FInished adapting the Skewness calculation from WAM to WW3 ... now let s
Mar 7, 2024
16c3329
Compile successful ... now let's look at the results ...
Mar 7, 2024
9743e71
Finished debugging, checked values of Skeweness, EMB and EMC and updated
Mar 8, 2024
1365b84
Merge branch 'develop' into feature/skewness
mickaelaccensi Mar 12, 2024
dc885fd
add test on ww3_ts1
mickaelaccensi Mar 15, 2024
9fcb0db
Merge branch 'develop' into feature/skewness
mickaelaccensi Mar 15, 2024
17644f8
add test on divided by zero for XN
mickaelaccensi Mar 28, 2024
5635032
add doxygen documentation for new subroutines
mickaelaccensi Mar 29, 2024
4c81f1c
add comments and correct initialization for XMU
mickaelaccensi Apr 2, 2024
06007e8
Merge branch 'develop' into feature/skewness
mickaelaccensi Apr 4, 2024
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
4 changes: 4 additions & 0 deletions manual/eqs/output.tex
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,10 @@ \subsection{~Output parameters} \label{sub:outpars}
\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}
\item \textbf{SKW} Skewness of surface elevation sampled at zero slope. This is the $\lambda_1$ parameter defined in \cite{Barrick&Lipa1985} or $\lambda_{3,0,0}$ in \cite{Srokosz1986}. It is computed from the second order correction to the surface elevation, using ECWAM code by P. Janssen.
\item \textbf{EMB} this is $-\gamma/8 = -(\lambda_{1,2,0}+\lambda_{1,0,2}-2 \lambda{0,1,1} \lambda{1,1,1})/8 (1-\lambda_{0,1,1]^2)$, such that the mean sea level of points with zero slope
is EMB$\times H_s$.
\item \textbf{EMC} this is hte additional tracker bias coefficient equal to $-\lambda_{3,0,0}/24$, which is specific to the choice of retracker, see the $J_z$ function in \cite{DeCarlo&Ardhuin2024}.
\end{list}

\item{Numerical diagnostics }
Expand Down
10 changes: 10 additions & 0 deletions manual/manual.bib
Original file line number Diff line number Diff line change
Expand Up @@ -3760,3 +3760,13 @@ @PHDTHESIS{Gagnaire-Renou2009
year = 2010,
}

@ARTICLE{Srokosz1986,
author = "Meric A. Srokosz",
title = "On the joint distribution of surface elevation and slopes for a non linear random sea, with an application to radar altimetry",
journal = JGR,
volume = 91,
pages = "995--1006",
year = 1986,
keywords={altimeter;sea state bias},
}

2 changes: 1 addition & 1 deletion model/inp/ww3_ounf.inp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $ DPT CUR WND AST WLV ICE IBG TAU RHO D50 IC1 IC5 HS LM T02 T0M1 T01 FP
$ DIR SPR DP HIG 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 SXY TWO BHD FOC TUS USS P2S USF P2L TWI FIC ABR UBR BED
$ FBB TBB MSS MSC DTD FC CFX CFD CFK U1 U2 WNM TOC
$ FBB TBB MSS MSC DTD FC CFX CFD CFK U1 U2 WNM TOC MSS QP QKK SKW EMB EMC
$
N
DPT HS FP T01
Expand Down
11 changes: 7 additions & 4 deletions model/inp/ww3_shel.inp
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,13 @@ $ 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 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
$ 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
$ F F 8 7 SKEW SKW Skewness of elevation for zero slopes
$ F F 8 8 EMBIA1 EMB Mean sea level at zero slopes / Hs
$ F F 8 9 EMBIA2 EMC Tracker bias for LRM least square altimetry
$ -------------------------------------------------
$ 9 Numerical diagnostics
$ -------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion model/nml/ww3_ounf.nml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
! UST CHA CGE FAW TAW TWA WCC WCF WCH WCM FWS
! SXY TWO BHD FOC TUS USS P2S USF P2L TWI FIC TOC
! ABR UBR BED FBB TBB
! MSS MSC WL02 AXT AYT AXY
! MSS MSC MSD MCD QP QKK SKW EMB EMC
! DTD FC CFX CFD CFK
! U1 U2
!
Expand Down
3 changes: 3 additions & 0 deletions model/nml/ww3_shel.nml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@
! 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
! F F 8 7 SKEW SKW Skewness of elevation for zero slopes
! F F 8 8 EMBIA1 EMB Mean sea level at zero slopes / Hs
! F F 8 9 EMBIA2 EMC Tracker bias for LRM least square altimetry
! -------------------------------------------------
! 9 Numerical diagnostics
! -------------------------------------------------
Expand Down
42 changes: 38 additions & 4 deletions model/src/w3adatmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ MODULE W3ADATMD
! 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)
! SKEW R.A. Public skewness lambda_3,0,0 (Srokosz 1986)
!
! DTDYN R.A. Public Mean dynamic time step (raw).
! FCUT R.A. Public Cut-off frequency for tail.
Expand Down Expand Up @@ -475,9 +476,10 @@ MODULE W3ADATMD
! Output fields group 8)
!
REAL, POINTER :: MSSX(:), MSSY(:), MSSD(:), &
MSCX(:), MSCY(:), MSCD(:), QKK(:)
MSCX(:), MSCY(:), MSCD(:), QKK(:), SKEW(:), EMBIA1(:), EMBIA2(:)
REAL, POINTER :: XMSSX(:), XMSSY(:), XMSSD(:), &
XMSCX(:), XMSCY(:), XMSCD(:), XQKK(:)
XMSCX(:), XMSCY(:), XMSCD(:), XQKK(:), &
XSKEW(:), XEMBIA1(:), XEMBIA2(:)
!
! Output fields group 9)
!
Expand Down Expand Up @@ -613,7 +615,7 @@ MODULE W3ADATMD
BEDFORMS(:,:), PHIBBL(:), TAUBBL(:,:)
!
REAL, POINTER :: MSSX(:), MSSY(:), MSSD(:), &
MSCX(:), MSCY(:), MSCD(:), QKK(:)
MSCX(:), MSCY(:), MSCD(:), QKK(:), SKEW(:), EMBIA1(:), EMBIA2(:)
!
REAL, POINTER :: DTDYN(:), FCUT(:), CFLXYMAX(:), &
CFLTHMAX(:), CFLKMAX(:)
Expand Down Expand Up @@ -1265,7 +1267,9 @@ 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), &
WADATS(IMOD)%QKK(NSEALM), STAT=ISTAT )
WADATS(IMOD)%QKK(NSEALM), WADATS(IMOD)%SKEW(NSEALM), &
WADATS(IMOD)%EMBIA1(NSEALM), WADATS(IMOD)%EMBIA2(NSEALM), &
STAT=ISTAT )
CHECK_ALLOC_STATUS ( ISTAT )
!
WADATS(IMOD)%MSSX = UNDEF
Expand All @@ -1275,6 +1279,9 @@ SUBROUTINE W3DIMA ( IMOD, NDSE, NDST, D_ONLY )
WADATS(IMOD)%MSCY = UNDEF
WADATS(IMOD)%MSCD = UNDEF
WADATS(IMOD)%QKK = UNDEF
WADATS(IMOD)%SKEW = UNDEF
WADATS(IMOD)%EMBIA1 = UNDEF
WADATS(IMOD)%EMBIA2 = UNDEF
call print_memcheck(memunit, 'memcheck_____:'//' W3DIMA 8')
!
! 9) Numerical diagnostics
Expand Down Expand Up @@ -2281,6 +2288,24 @@ SUBROUTINE W3XDMA ( IMOD, NDSE, NDST, OUTFLAGS )
ALLOCATE ( WADATS(IMOD)%XQKK(1) )
END IF
!
IF ( OUTFLAGS( 8, 7) ) THEN
ALLOCATE ( WADATS(IMOD)%XSKEW(NXXX) )
ELSE
ALLOCATE ( WADATS(IMOD)%XSKEW(1) )
END IF
!
IF ( OUTFLAGS( 8, 8) ) THEN
ALLOCATE ( WADATS(IMOD)%XEMBIA1(NXXX) )
ELSE
ALLOCATE ( WADATS(IMOD)%XEMBIA1(1) )
END IF
!
IF ( OUTFLAGS( 8, 9) ) THEN
ALLOCATE ( WADATS(IMOD)%XEMBIA2(NXXX) )
ELSE
ALLOCATE ( WADATS(IMOD)%XEMBIA2(1) )
END IF
!
WADATS(IMOD)%XMSSX = UNDEF
WADATS(IMOD)%XMSSY = UNDEF
WADATS(IMOD)%XMSSD = UNDEF
Expand All @@ -2289,6 +2314,9 @@ SUBROUTINE W3XDMA ( IMOD, NDSE, NDST, OUTFLAGS )
WADATS(IMOD)%XMSCD = UNDEF
WADATS(IMOD)%XQP(1) = UNDEF
WADATS(IMOD)%XQKK = UNDEF
WADATS(IMOD)%XSKEW = UNDEF
WADATS(IMOD)%XEMBIA1 = UNDEF
WADATS(IMOD)%XEMBIA2 = UNDEF
!
IF ( OUTFLAGS( 9, 1) ) THEN
ALLOCATE ( WADATS(IMOD)%XDTDYN(NXXX), STAT=ISTAT )
Expand Down Expand Up @@ -2903,6 +2931,9 @@ SUBROUTINE W3SETA ( IMOD, NDSE, NDST )
MSCY => WADATS(IMOD)%MSCY
MSCD => WADATS(IMOD)%MSCD
QKK => WADATS(IMOD)%QKK
SKEW => WADATS(IMOD)%SKEW
EMBIA1 => WADATS(IMOD)%EMBIA1
EMBIA2 => WADATS(IMOD)%EMBIA2
!
DTDYN => WADATS(IMOD)%DTDYN
FCUT => WADATS(IMOD)%FCUT
Expand Down Expand Up @@ -3242,6 +3273,9 @@ SUBROUTINE W3XETA ( IMOD, NDSE, NDST )
MSCY => WADATS(IMOD)%XMSCY
MSCD => WADATS(IMOD)%XMSCD
QKK => WADATS(IMOD)%XQKK
SKEW => WADATS(IMOD)%XSKEW
EMBIA1 => WADATS(IMOD)%XEMBIA1
EMBIA2 => WADATS(IMOD)%XEMBIA2
!
DTDYN => WADATS(IMOD)%XDTDYN
FCUT => WADATS(IMOD)%XFCUT
Expand Down
86 changes: 85 additions & 1 deletion model/src/w3initmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2150,7 +2150,7 @@ SUBROUTINE W3MPIO ( IMOD )
STMAXE, STMAXD, HMAXE, HCMAXE, HMAXD, &
HCMAXD, QP, PTHP0, PQP, PPE, PGW, PSW, &
PTM1, PT1, PT2, PEP, WBT, CX, CY, &
TAUOCX, TAUOCY, WNMEAN, QKK
TAUOCX, TAUOCY, WNMEAN, QKK, SKEW, EMBIA1, EMBIA2
#endif

#ifdef W3_MPI
Expand Down Expand Up @@ -3406,6 +3406,48 @@ SUBROUTINE W3MPIO ( IMOD )
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/06', IROOT, IT, IRQGO(IH), IERR
#endif
#ifdef W3_MPI
END IF
#endif
!
#ifdef W3_MPI
IF ( FLGRDALL( 8, 7) ) THEN
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (SKEW (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/07', IROOT, IT, IRQGO(IH), IERR
#endif
#ifdef W3_MPI
END IF
#endif
!
#ifdef W3_MPI
IF ( FLGRDALL( 8, 8) ) THEN
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (EMBIA1 (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/08', IROOT, IT, IRQGO(IH), IERR
#endif
#ifdef W3_MPI
END IF
#endif
!
#ifdef W3_MPI
IF ( FLGRDALL( 8, 9) ) THEN
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (EMBIA2 (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/09', IROOT, IT, IRQGO(IH), IERR
#endif
#ifdef W3_MPI
END IF
#endif
Expand Down Expand Up @@ -4653,6 +4695,48 @@ SUBROUTINE W3MPIO ( IMOD )
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/06', IFROM, IT, IRQGO2(IH), IERR
#endif
#ifdef W3_MPI
END IF
#endif
!
#ifdef W3_MPI
IF ( FLGRDALL( 8, 7) ) THEN
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (SKEW (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/07', IFROM, IT, IRQGO2(IH), IERR
#endif
#ifdef W3_MPI
END IF
#endif
!
#ifdef W3_MPI
IF ( FLGRDALL( 8, 8) ) THEN
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (EMBIA1 (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/08', IFROM, IT, IRQGO2(IH), IERR
#endif
#ifdef W3_MPI
END IF
#endif
!
#ifdef W3_MPI
IF ( FLGRDALL( 8, 9) ) THEN
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (EMBIA2 (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/09', IFROM, IT, IRQGO2(IH), IERR
#endif
#ifdef W3_MPI
END IF
#endif
Expand Down
Loading
Loading