From 8101d60816ab741d56d8a17d991a70a2d877df88 Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Mon, 26 Jun 2023 11:14:34 -0600 Subject: [PATCH 01/63] Clean up diagnostic variables in WW3 for Langmuir turbulence parameterization In addition to the changes by @qingli411 as summarized below, I have added mod_def namelist parameters to control the Langmuir parameterization and eliminated the CESMCOUPLED and SDTAIL ifdefs by replacing them with if statements (with flags from the newly added namelist) wherever applicable. # Pull Request Summary This PR cleans up the calculation of Stokes drift and other diagnostics variables in WW3 for Langmuir turbulence parameterization in CESM. * Clean up the calculations of the surface Stokes drift (`USSX` and `USSY`) and surface layer averaged Stokes drift (`USSHX` and `USSHY`). The calculation of surface layer averaged Stokes drift and the tail contributions to both versions of Stokes drift are activated when `W3_CESMCOUPLED` is defined. * Change the input field of mixed layer depth `HML` to a more general surface layer depth `HSL`. This depth is used to calculate the surface layer averaged Stokes drift. When used in CESM, the surface layer depth is defined as 1/5 of the mixed layer depth. Now this 1/5 factor is applied to the mixed layer depth when importing the fields in the cap. * Clean up the diagnostic variables for Langmuir turbulence parameterization. Some variables are intermediate quantities and are not used in the parameterization. These variables are now deleted. The key variable diagnosed in WW3 is the surface layer averaged Stokes drift (`USSHX` and `USSHY`). The Langmuir enhancement factor (`LAMULT`) and the surface layer averaged Langmuir number (`LASL`) are now calculated when they are exported in the cap. `LASL` is needed for the Langmuir induced entrainment parameterization in CVMix but was not there in the cap code. So it is now added following the way `LAMULT` is defined. * This PR only changes the diagnostic variables in WW3 and shouldn't change the answers of WW3. Ideally, this PR shouldn't change the diagnostic variables to be used in CESM (`LAMULT`, `LASL`) as well. But given that the calculation of these variables are moved to the cap, and the way division by zero and physically invalid values (both should be rare) are handled, small changes to these variables are expected. Co-authored-by: qingli411 --- model/src/w3adatmd.F90 | 76 ++++------ model/src/w3gdatmd.F90 | 11 ++ model/src/w3gridmd.F90 | 18 ++- model/src/w3idatmd.F90 | 21 +-- model/src/w3initmd.F90 | 33 +++-- model/src/w3iogomd.F90 | 243 ++++++++++---------------------- model/src/w3iogoncdmd.F90 | 9 +- model/src/w3iogrmd.F90 | 10 ++ model/src/w3iorsmd.F90 | 18 +++ model/src/w3odatmd.F90 | 2 - model/src/wav_comp_nuopc.F90 | 14 +- model/src/wav_grdout.F90 | 7 +- model/src/wav_import_export.F90 | 57 ++++++-- 13 files changed, 244 insertions(+), 275 deletions(-) diff --git a/model/src/w3adatmd.F90 b/model/src/w3adatmd.F90 index a4aea27d0..a48af3199 100644 --- a/model/src/w3adatmd.F90 +++ b/model/src/w3adatmd.F90 @@ -174,6 +174,8 @@ MODULE W3ADATMD ! US3D R.A. Public 3D Stokes drift. ! USSP R.A. Public Partitioned Surface Stokes drift ! + ! USSHX/Y R.A. Public Surface layer averaged Stokes drift. + ! ! ABA R.A. Public Near-bottom rms wave ex. amplitude. ! ABD R.A. Public Corresponding direction. ! UBA R.A. Public Near-bottom rms wave velocity. @@ -461,9 +463,7 @@ MODULE W3ADATMD XPRMS(:), XTPMS(:), XPHICE(:), & XTAUICE(:,:) REAL, POINTER :: XP2SMS(:,:), XUS3D(:,:), XUSSP(:,:) -#ifdef W3_CESMCOUPLED - REAL, POINTER :: XLANGMT(:) -#endif + REAL, POINTER :: XUSSHX(:), XUSSHY(:) ! ! Output fields group 7) ! @@ -492,12 +492,8 @@ MODULE W3ADATMD ! REAL, POINTER :: USERO(:,:) REAL, POINTER :: XUSERO(:,:) -#ifdef W3_CESMCOUPLED - ! Output fileds for Langmuir mixing in group - REAL, POINTER :: LANGMT(:), LAPROJ(:), LASL(:), & - LASLPJ(:), LAMULT(:), ALPHAL(:), & - ALPHALS(:), USSXH(:), USSYH(:) -#endif + ! Output fileds for Langmuir mixing parameterization + REAL, POINTER :: USSHX(:), USSHY(:) ! ! Spatial derivatives ! @@ -578,11 +574,8 @@ MODULE W3ADATMD !/ !/ Data aliases for structure WADAT(S) !/ -#ifdef W3_CESMCOUPLED - REAL, POINTER :: LANGMT(:), LAPROJ(:), ALPHAL(:), & - ALPHALS(:), LAMULT(:), LASL(:), & - LASLPJ(:), USSXH(:), USSYH(:) -#endif + REAL, POINTER :: USSHX(:), USSHY(:) + ! REAL, POINTER :: CG(:,:), WN(:,:) REAL, POINTER :: IC3WN_R(:,:), IC3WN_I(:,:), IC3CG(:,:) ! @@ -1064,19 +1057,6 @@ SUBROUTINE W3DIMA ( IMOD, NDSE, NDST, D_ONLY ) STAT=ISTAT ) CHECK_ALLOC_STATUS ( ISTAT ) -#ifdef W3_CESMCOUPLED - ALLOCATE ( WADATS(IMOD)%USSXH(NSEALM) , & - WADATS(IMOD)%USSYH(NSEALM) , & - WADATS(IMOD)%LANGMT(NSEALM) , & - WADATS(IMOD)%LAPROJ(NSEALM) , & - WADATS(IMOD)%LASL(NSEALM) , & - WADATS(IMOD)%LASLPJ(NSEALM) , & - WADATS(IMOD)%ALPHAL(NSEALM) , & - WADATS(IMOD)%ALPHALS(NSEALM) , & - WADATS(IMOD)%LAMULT(NSEALM) , & - STAT=ISTAT ) - CHECK_ALLOC_STATUS ( ISTAT ) -#endif ! WADATS(IMOD)%HS = UNDEF WADATS(IMOD)%WLM = UNDEF @@ -1226,6 +1206,8 @@ SUBROUTINE W3DIMA ( IMOD, NDSE, NDST, D_ONLY ) WADATS(IMOD)%TPMS (NSEALM) , & WADATS(IMOD)%PHICE (NSEALM) , & WADATS(IMOD)%TAUICE(NSEALM,2), & + WADATS(IMOD)%USSHX(NSEALM), & + WADATS(IMOD)%USSHY(NSEALM), & STAT=ISTAT ) CHECK_ALLOC_STATUS ( ISTAT ) ! @@ -1262,9 +1244,8 @@ SUBROUTINE W3DIMA ( IMOD, NDSE, NDST, D_ONLY ) WADATS(IMOD)%TPMS = UNDEF WADATS(IMOD)%PHICE = UNDEF WADATS(IMOD)%TAUICE = UNDEF -#ifdef W3_CESMCOUPLED - WADATS(IMOD)%LANGMT = UNDEF -#endif + WADATS(IMOD)%USSHX = UNDEF + WADATS(IMOD)%USSHY = UNDEF IF ( P2MSF(1).GT.0 ) WADATS(IMOD)%P2SMS = UNDEF IF ( US3DF(1).GT.0 ) WADATS(IMOD)%US3D = UNDEF IF ( USSPF(1).GT.0 ) WADATS(IMOD)%USSP = UNDEF @@ -2180,15 +2161,17 @@ SUBROUTINE W3XDMA ( IMOD, NDSE, NDST, OUTFLAGS ) ALLOCATE ( WADATS(IMOD)%XTAUOCY(1), STAT=ISTAT ) CHECK_ALLOC_STATUS ( ISTAT ) END IF -#ifdef W3_CESMCOUPLED IF ( OUTFLAGS( 6, 14) ) THEN - ALLOCATE ( WADATS(IMOD)%XLANGMT(NXXX), STAT=ISTAT ) + ALLOCATE ( WADATS(IMOD)%XUSSHX(NXXX), STAT=ISTAT ) + CHECK_ALLOC_STATUS ( ISTAT ) + ALLOCATE ( WADATS(IMOD)%XUSSHY(NXXX), STAT=ISTAT ) CHECK_ALLOC_STATUS ( ISTAT ) ELSE - ALLOCATE ( WADATS(IMOD)%XLANGMT(1), STAT=ISTAT ) + ALLOCATE ( WADATS(IMOD)%XUSSHX(1), STAT=ISTAT ) + CHECK_ALLOC_STATUS ( ISTAT ) + ALLOCATE ( WADATS(IMOD)%XUSSHY(1), STAT=ISTAT ) CHECK_ALLOC_STATUS ( ISTAT ) END IF -#endif ! WADATS(IMOD)%XSXX = UNDEF WADATS(IMOD)%XSYY = UNDEF @@ -2210,9 +2193,8 @@ SUBROUTINE W3XDMA ( IMOD, NDSE, NDST, OUTFLAGS ) WADATS(IMOD)%XUSSP = UNDEF WADATS(IMOD)%XTAUOCX = UNDEF WADATS(IMOD)%XTAUOCY = UNDEF -#ifdef W3_CESMCOUPLED - WADATS(IMOD)%XLANGMT = UNDEF -#endif + WADATS(IMOD)%XUSSHX = UNDEF + WADATS(IMOD)%XUSSHY = UNDEF ! IF ( OUTFLAGS( 7, 1) ) THEN ALLOCATE ( WADATS(IMOD)%XABA(NXXX), STAT=ISTAT ) @@ -2946,18 +2928,8 @@ SUBROUTINE W3SETA ( IMOD, NDSE, NDST ) USERO => WADATS(IMOD)%USERO ! WN => WADATS(IMOD)%WN -#ifdef W3_CESMCOUPLED - ! USSX and USSY are already set - LANGMT => WADATS(IMOD)%LANGMT - LAPROJ => WADATS(IMOD)%LAPROJ - LASL => WADATS(IMOD)%LASL - LASLPJ => WADATS(IMOD)%LASLPJ - ALPHAL => WADATS(IMOD)%ALPHAL - ALPHALS=> WADATS(IMOD)%ALPHALS - USSXH => WADATS(IMOD)%USSXH - USSYH => WADATS(IMOD)%USSYH - LAMULT => WADATS(IMOD)%LAMULT -#endif + USSHX => WADATS(IMOD)%USSHX + USSHY => WADATS(IMOD)%USSHY #ifdef W3_IC3 IC3WN_R=> WADATS(IMOD)%IC3WN_R IC3WN_I=> WADATS(IMOD)%IC3WN_I @@ -3279,9 +3251,6 @@ SUBROUTINE W3XETA ( IMOD, NDSE, NDST ) BEDFORMS=> WADATS(IMOD)%XBEDFORMS PHIBBL => WADATS(IMOD)%XPHIBBL TAUBBL => WADATS(IMOD)%XTAUBBL -#ifdef W3_CESMCOUPLED - LANGMT => WADATS(IMOD)%XLANGMT -#endif ! MSSX => WADATS(IMOD)%XMSSX MSSY => WADATS(IMOD)%XMSSY @@ -3298,6 +3267,9 @@ SUBROUTINE W3XETA ( IMOD, NDSE, NDST ) ! USERO => WADATS(IMOD)%XUSERO ! + USSHX => WADATS(IMOD)%XUSSHX + USSHY => WADATS(IMOD)%XUSSHY + ! END IF ! RETURN diff --git a/model/src/w3gdatmd.F90 b/model/src/w3gdatmd.F90 index 6cd6e91d8..1e0a171ca 100644 --- a/model/src/w3gdatmd.F90 +++ b/model/src/w3gdatmd.F90 @@ -728,6 +728,9 @@ MODULE W3GDATMD #ifdef W3_IS2 REAL, POINTER :: IS2PARS(:) #endif + LOGICAL :: LMPENABLED ! flag to enable Li et al. Langmuir parameterization + LOGICAL :: SDTAIL ! flag to enable high-freq tail in Li et al. Stokes Drift computations + REAL :: HSLMODE ! 0 for test (HSL=10m everywhere, 1 for coupler-based HSL) ! ! unstructured data ! @@ -1084,6 +1087,10 @@ MODULE W3GDATMD INTEGER, POINTER :: NBEDGE INTEGER, POINTER :: EDGES(:,:), NEIGH(:,:) ! + LOGICAL, POINTER :: LMPENABLED + LOGICAL, POINTER :: SDTAIL + REAL, POINTER :: HSLMODE + ! ! Variables for unstructured grids ! INTEGER, POINTER :: NTRI,COUNTRI,COUNTOT,NNZ @@ -2274,6 +2281,10 @@ SUBROUTINE W3SETG ( IMOD, NDSE, NDST ) USSPF => GRIDS(IMOD)%USSPF USSP_WN => GRIDS(IMOD)%USSP_WN FFACBERG => GRIDS(IMOD)%FFACBERG + ! + LMPENABLED => GRIDS(IMOD)%LMPENABLED + SDTAIL => GRIDS(IMOD)%SDTAIL + HSLMODE => GRIDS(IMOD)%HSLMODE #ifdef W3_REF1 REFLC => GRIDS(IMOD)%REFLC REFLD => GRIDS(IMOD)%REFLD diff --git a/model/src/w3gridmd.F90 b/model/src/w3gridmd.F90 index 281ed7a3f..052b1f2c9 100644 --- a/model/src/w3gridmd.F90 +++ b/model/src/w3gridmd.F90 @@ -1105,6 +1105,7 @@ MODULE W3GRIDMD STH1MF, I1STH1M, I2STH1M, & TH2MF, I1TH2M, I2TH2M, & STH2MF, I1STH2M, I2STH2M + NAMELIST /LMPN/ LMPENABLED, SDTAIL, HSLMODE #ifdef W3_IS1 NAMELIST /SIS1/ ISC1, ISC2 #endif @@ -2731,6 +2732,11 @@ SUBROUTINE W3GRID() I2STH2M=NK ! FACBERG=1. + ! + LMPENABLED = .false. + SDTAIL = .false. + HSLMODE = 0 ! 0 for test (HSL=10m everywhere, 1 for coupler-based HSL) + ! #ifdef W3_IS0 WRITE (NDSO,944) #endif @@ -2882,6 +2888,10 @@ SUBROUTINE W3GRID() IC5MAXKI, IC5MINHW, IC5MAXITER, IC5RKICK, & IC5KFILTER, IC5MSTR(NINT(IC5VEMOD)) #endif + ! + CALL READNL ( NDSS, 'LMPN', STATUS ) + WRITE (NDSO,4960) STATUS + WRITE (NDSO,4961) LMPENABLED, SDTAIL, HSLMODE ! CALL READNL ( NDSS, 'OUTS', STATUS ) WRITE (NDSO,4970) STATUS @@ -6673,7 +6683,11 @@ SUBROUTINE W3GRID() /' (0.0==> no reduction and 1.0==> no wind', & /' input with 100% ice cover)') ! - ! +! +4960 FORMAT (/' Langmuir Mixing Parameterization ',A/ & + ' --------------------------------------------------') +4961 FORMAT (' &LMPN LMPENABLED = ',L, 'SDTAIL = ', L, ' HSLMODE = ', I2 '/' ) +! 4970 FORMAT (/' Spectral output on full grid ',A/ & ' --------------------------------------------------') 4971 FORMAT ( ' Second order pressure at K=0:',3I4) @@ -7344,6 +7358,8 @@ SUBROUTINE READNL ( NDS, NAME, STATUS ) READ (NDS,NML=UNST,END=801,ERR=802,IOSTAT=J) CASE('OUTS') READ (NDS,NML=OUTS,END=801,ERR=802,IOSTAT=J) + CASE('LMPN') + READ (NDS,NML=LMPN,END=801,ERR=802,IOSTAT=J) CASE('MISC') READ (NDS,NML=MISC,END=801,ERR=802,IOSTAT=J) CASE DEFAULT diff --git a/model/src/w3idatmd.F90 b/model/src/w3idatmd.F90 index 83d9af3ee..52035dafd 100644 --- a/model/src/w3idatmd.F90 +++ b/model/src/w3idatmd.F90 @@ -94,9 +94,8 @@ MODULE W3IDATMD ! FLCUR Log. Public Flag for current input. ! FLWIND Log. Public Flag for wind input. ! FLICE Log. Public Flag for ice input. -#ifdef W3_CESMCOUPLED - ! HML R.A. Public Mixed layer depth -#endif + ! HSL R.A. Public Depth of a surface layer over which Stokes + ! drift is averaged ! FLTAUA Log. Public Flag for atmospheric momentum input ! FLRHOA Log. Public Flag for air density input ! INFLAGS1 L.A. Public Array consolidating the above six @@ -219,9 +218,7 @@ MODULE W3IDATMD REAL, POINTER :: CYTIDE(:,:,:,:) REAL, POINTER :: WLTIDE(:,:,:,:) #endif -#ifdef W3_CESMCOUPLED - REAL, POINTER :: HML(:,:) -#endif + REAL, POINTER :: HSL(:,:) LOGICAL :: IINIT #ifdef W3_WRST LOGICAL :: WRSTIINIT=.FALSE. @@ -272,9 +269,7 @@ MODULE W3IDATMD LOGICAL, POINTER :: FLLEVTIDE, FLCURTIDE, & FLLEVRESI, FLCURRESI #endif -#ifdef W3_CESMCOUPLED - REAL , POINTER :: HML(:,:) -#endif + REAL , POINTER :: HSL(:,:) !/ CONTAINS !/ ------------------------------------------------------------------- / @@ -743,10 +738,8 @@ SUBROUTINE W3DIMI ( IMOD, NDSE, NDST, FLAGSTIDEIN ) CHECK_ALLOC_STATUS ( ISTAT ) END IF ! -#ifdef W3_CESMCOUPLED - ALLOCATE ( INPUTS(IMOD)%HML(NX,NY), STAT=ISTAT ) + ALLOCATE ( INPUTS(IMOD)%HSL(NX,NY), STAT=ISTAT ) CHECK_ALLOC_STATUS ( ISTAT ) -#endif ! INPUTS(IMOD)%IINIT = .TRUE. ! @@ -1061,9 +1054,7 @@ SUBROUTINE W3SETI ( IMOD, NDSE, NDST ) ICEI => INPUTS(IMOD)%ICEI BERGI => INPUTS(IMOD)%BERGI END IF -#ifdef W3_CESMCOUPLED - HML => INPUTS(IMOD)%HML -#endif + HSL => INPUTS(IMOD)%HSL ! IF ( FLTAUA ) THEN UX0 => INPUTS(IMOD)%UX0 diff --git a/model/src/w3initmd.F90 b/model/src/w3initmd.F90 index ce7e2ddf8..9f7c62de8 100644 --- a/model/src/w3initmd.F90 +++ b/model/src/w3initmd.F90 @@ -2152,10 +2152,7 @@ SUBROUTINE W3MPIO ( IMOD ) TAUOCX, TAUOCY, WNMEAN #endif -#ifdef W3_CESMCOUPLED - USE W3ADATMD, ONLY: LANGMT, LAPROJ, ALPHAL, LASL, LASLPJ, & - ALPHALS, LAMULT -#endif + USE W3ADATMD, ONLY: USSHX, USSHY #ifdef W3_MPI USE W3GDATMD, ONLY: NK @@ -2248,7 +2245,7 @@ SUBROUTINE W3MPIO ( IMOD ) 0 + 0 + 0 + & ! group 3 (extra contributions below) 2+(NOGE(4)-2)*(NOSWLL+1) + 0 + 0 + & ! group 4 11 + 3 + 1 + & ! group 5 - 12 + 7 + 1 + & ! group 6 (extra contributions below) + 10 + 7 + 1 + & ! group 6 (extra contributions below) 5 + 4 + 1 + & ! group 7 5 + 2 + 0 + & ! group 8 5 + 0 + 0 + & ! group 9 @@ -2262,6 +2259,7 @@ SUBROUTINE W3MPIO ( IMOD ) IF ( FLGRDALL( 6,9)) NRQMAX = NRQMAX + P2MSF(3) - P2MSF(2) + 1 IF ( FLGRDALL( 6, 8) ) NRQMAX = NRQMAX + 2*NK IF ( FLGRDALL( 6,12) ) NRQMAX = NRQMAX + 2*NK + IF ( FLGRDALL( 6,14) ) NRQMAX = NRQMAX + 2 ! IF ( NRQMAX .GT. 0 ) THEN ALLOCATE ( OUTPTS(IMOD)%OUT1%IRQGO(NRQMAX) ) @@ -3218,17 +3216,22 @@ SUBROUTINE W3MPIO ( IMOD ) #ifdef W3_MPI END IF ! -#ifdef W3_CESMCOUPLED IF ( FLGRDALL( 6, 14) ) THEN IH = IH + 1 IT = IT + 1 - CALL MPI_SEND_INIT (LANGMT(1),NSEALM , MPI_REAL, IROOT, & + CALL MPI_SEND_INIT (USSHX (1),NSEALM , MPI_REAL, IROOT, & + IT, MPI_COMM_WAVE, IRQGO(IH), IERR) +#ifdef W3_MPIT + WRITE (NDST,9011) IH, ' 6/14', IROOT, IT, IRQGO(IH), IERR +#endif + IH = IH + 1 + IT = IT + 1 + CALL MPI_SEND_INIT (USSHY (1),NSEALM , MPI_REAL, IROOT, & IT, MPI_COMM_WAVE, IRQGO(IH), IERR) #ifdef W3_MPIT WRITE (NDST,9011) IH, ' 6/14', IROOT, IT, IRQGO(IH), IERR #endif END IF -#endif !W3_CESMCOUPLED IF ( FLGRDALL( 7, 1) ) THEN IH = IH + 1 IT = IT + 1 @@ -4462,17 +4465,23 @@ SUBROUTINE W3MPIO ( IMOD ) #ifdef W3_MPI END IF ! -#ifdef W3_CESMCOUPLED IF ( FLGRDALL( 6, 14) ) THEN IH = IH + 1 IT = IT + 1 - CALL MPI_RECV_INIT (LANGMT(I0),1,WW3_FIELD_VEC, IFROM, IT, & - MPI_COMM_WAVE, IRQGO2(IH), IERR) + CALL MPI_RECV_INIT (USSHX (I0),1,WW3_FIELD_VEC, IFROM, IT, & + MPI_COMM_WAVE, IRQGO2(IH), IERR ) +#ifdef W3_MPIT + WRITE (NDST,9011) IH, ' 6/14', IFROM, IT, IRQGO2(IH), IERR +#endif + IH = IH + 1 + IT = IT + 1 + CALL MPI_RECV_INIT (USSHY (I0),1,WW3_FIELD_VEC, IFROM, IT, & + MPI_COMM_WAVE, IRQGO2(IH), IERR ) #ifdef W3_MPIT WRITE (NDST,9011) IH, ' 6/14', IFROM, IT, IRQGO2(IH), IERR #endif END IF -#endif ! W3_CESMCOUPLED + ! IF ( FLGRDALL( 7, 1) ) THEN IH = IH + 1 IT = IT + 1 diff --git a/model/src/w3iogomd.F90 b/model/src/w3iogomd.F90 index 43dd1bf64..144c2f833 100644 --- a/model/src/w3iogomd.F90 +++ b/model/src/w3iogomd.F90 @@ -1084,6 +1084,9 @@ SUBROUTINE W3FLDTOIJ(FLD, I, J, IAPROC, NAPOUT, NDSEN) CASE('TOC') I = 6 J = 13 + CASE('USSH') + I = 6 + J = 14 ! ! Group 7 ! @@ -1296,23 +1299,11 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 ) ICPRT, DTPRT, WSCUT, NOSWLL, FLOGRD, FLOGR2,& NOGRP, NGRPP USE W3ADATMD, ONLY: NSEALM -#ifdef W3_CESMCOUPLED - ! USSX, USSY : surface Stokes drift (SD) - ! USSXH, USSYH : surface layer (SL) averaged SD - ! LANGMT : La_t - ! LAPROJ : La_{Proj} - ! LASL : La_{SL} - ! LASLPJ : La_{SL,Proj} - ! ALPHAL : angle between wind and Langmuir cells (SL averaged) - ! ALPHALS : angle between wind and Langmuir cells (surface) - ! UD : wind direction - ! LAMULT : enhancement factor - ! HML : mixing layer depth (from coupler) - USE W3ADATMD, ONLY: LAMULT, USSXH, USSYH, LANGMT, LAPROJ, & - ALPHAL, ALPHALS, LASL, UD, LASLPJ - USE W3IDATMD, ONLY: HML - USE W3WDATMD, ONLY: ASF -#endif + ! USSHX, USSHY : surface layer (SL) averaged SD + ! HSL : surface layer depth (1/5 of the mixed layer depth + ! from the coupler) + USE W3ADATMD, ONLY: USSHX, USSHY + USE W3IDATMD, ONLY: HSL #ifdef W3_S USE W3SERVMD, ONLY: STRACE #endif @@ -1370,17 +1361,12 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 ) REAL USSCO, FT1 REAL, SAVE :: HSMIN = 0.01 LOGICAL :: FLOLOC(NOGRP,NGRPP) -#ifdef W3_CESMCOUPLED ! SWW: angle between wind and waves - ! HSL: surface layer depth (=0.2*HML) - REAL :: SWW !angle between wind and waves - REAL :: HSL !surface layer depth (=0.2*HML) - ! tmp variables for surface and SL averaged SD - REAL :: ETUSSX(NSEAL), & - ETUSSY(NSEAL), & - ETUSSXH(NSEAL), & - ETUSSYH(NSEAL) -#endif + ! LHSL: local surface layer depth + REAL :: SWW + REAL :: LHSL + ! tmp variable for surface layer averaged Stokes drift + REAL :: USSCOH !/ !/ ------------------------------------------------------------------- / !/ @@ -1487,25 +1473,10 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 ) QP = UNDEF WBT = UNDEF ! -#ifdef W3_CESMCOUPLED - ETUSSX = 0. - ETUSSY = 0. ETUSCX = 0. ETUSCY = 0. - ETUSSXH = 0. - ETUSSYH = 0 - LANGMT = UNDEF - LAPROJ = UNDEF - LASL = UNDEF - LASLPJ = UNDEF - ALPHAL = UNDEF - ALPHALS = UNDEF - USSX = 0. - USSY = 0. - USSXH = 0. - USSYH = 0. - LAMULT = 1. -#endif + USSHX = 0. + USSHY = 0. ! ! 2. Integral over discrete part of spectrum ------------------------ * ! @@ -1631,12 +1602,16 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 ) TPMS(JSEA) = TPI/SIG(IK) END IF -#ifdef W3_CESMCOUPLED - ! Get surface layer depth - IX = MAPSF(ISEA,1) - IY = MAPSF(ISEA,2) - HSL = HML(IX,IY)/5. ! depth over which SD is averaged -#endif + IF (LMPENABLED) then + IF (HSLMODE.EQ.0) then + LHSL = 10.0 ! a constant value for testing purposes + ELSE + ! Get surface layer depth from coupler + IX = MAPSF(ISEA,1) + IY = MAPSF(ISEA,2) + LHSL = HSL(IX,IY) ! depth over which SD is averaged + END IF + END IF ! ! Directional moments in the last freq. band @@ -1677,39 +1652,14 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 ) USSCO=FKD*SIG(IK)*WN(IK,ISEA)*COSH(2.*KD) BHD(JSEA) = BHD(JSEA) + & GRAV*WN(IK,ISEA) * EBD(IK,JSEA) / (SINH(2.*KD)) -#ifdef W3_CESMCOUPLED - ! Surface Stokes Drift - ETUSSX(JSEA) = ETUSSX(JSEA) + ABX(JSEA)*FACTOR*SIG(IK) & - *WN(IK,ISEA)*COSH(2*WN(IK,ISEA)*DW(ISEA)) & - /(SINH(WN(IK,ISEA)*DW(ISEA)))**2 - ETUSSY(JSEA) = ETUSSY(JSEA) + ABY(JSEA)*FACTOR*SIG(IK) & - *WN(IK,ISEA)*COSH(2*WN(IK,ISEA)*DW(ISEA)) & - /(SINH(WN(IK,ISEA)*DW(ISEA)))**2 - ! Depth averaged Stokes Drift - ETUSSXH(JSEA) = ETUSSXH(JSEA) + ABX(JSEA)*FACTOR*SIG(IK) & - *(1.-EXP(-2.*WN(IK,ISEA)*HSL))/2./HSL & - *COSH(2*WN(IK,ISEA)*DW(ISEA)) & - /(SINH(WN(IK,ISEA)*DW(ISEA)))**2 - ETUSSYH(JSEA) = ETUSSYH(JSEA) + ABY(JSEA)*FACTOR*SIG(IK) & - *(1.-EXP(-2.*WN(IK,ISEA)*HSL))/2./HSL & - *COSH(2*WN(IK,ISEA)*DW(ISEA)) & - /(SINH(WN(IK,ISEA)*DW(ISEA)))**2 -#endif + IF (LMPENABLED) THEN + USSCOH=0.5*FKD*SIG(IK)*(1.-EXP(-2.*WN(IK,ISEA)*LHSL))/LHSL*COSH(2.*KD) + ENDIF ELSE USSCO=FACTOR*SIG(IK)*2.*WN(IK,ISEA) -#ifdef W3_CESMCOUPLED - ! deep water limit - ! Surface Stokes Drift - ETUSSX(JSEA) = ETUSSX(JSEA) + ABX(JSEA)*FACTOR*SIG(IK) & - *2.*WN(IK,ISEA) - ETUSSY(JSEA) = ETUSSY(JSEA) + ABY(JSEA)*FACTOR*SIG(IK) & - *2.*WN(IK,ISEA) - ! Depth averaged Stokes Drift - ETUSSXH(JSEA) = ETUSSXH(JSEA) + ABX(JSEA)*FACTOR*SIG(IK) & - *(1.-EXP(-2.*WN(IK,ISEA)*HSL))/HSL - ETUSSYH(JSEA) = ETUSSYH(JSEA) + ABY(JSEA)*FACTOR*SIG(IK) & - *(1.-EXP(-2.*WN(IK,ISEA)*HSL))/HSL -#endif + IF (LMPENABLED) THEN + USSCOH=FACTOR*SIG(IK)*(1.-EXP(-2.*WN(IK,ISEA)*LHSL))/LHSL + ENDIF END IF ! ABXX(JSEA) = MAX ( 0. , ABXX(JSEA) ) * FACTOR @@ -1725,6 +1675,10 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 ) ! USSX(JSEA) = USSX(JSEA) + ABX(JSEA)*USSCO USSY(JSEA) = USSY(JSEA) + ABY(JSEA)*USSCO + IF (LMPENABLED) THEN + USSHX(JSEA) = USSHX(JSEA) + ABX(JSEA)*USSCOH + USSHY(JSEA) = USSHY(JSEA) + ABY(JSEA)*USSCOH + ENDIF ! ! Fills the 3D Stokes drift spectrum array ! ! The US3D Stokes drift specrum array is now calculated in a @@ -1998,11 +1952,17 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 ) ! DO JSEA=1, NSEAL CALL INIT_GET_ISEA(ISEA, JSEA) -#ifdef W3_CESMCOUPLED - IX = MAPSF(ISEA,1) - IY = MAPSF(ISEA,2) - HS = HML(IX,IY)/5. ! depth over which SD is averaged -#endif + + IF (LMPENABLED) then + IF (HSLMODE.EQ.0) then + LHSL = 10.0 ! a constant value for testing purposes + ELSE + ! Get surface layer depth from coupler + IX = MAPSF(ISEA,1) + IY = MAPSF(ISEA,2) + LHSL = HSL(IX,IY) ! depth over which SD is averaged + END IF + END IF ! ! 3.a Directional mss parameters ! NB: the slope PDF is proportional to ell1=ETYY*EC2-2*ETXY*ECS+ETXX*ES2 = C*EC2-2*B*ECS+A*ES2 @@ -2032,16 +1992,23 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 ) SXX(JSEA) = SXX(JSEA) + FTE * ABXX(JSEA) / CG(NK,ISEA) SYY(JSEA) = SYY(JSEA) + FTE * ABYY(JSEA) / CG(NK,ISEA) SXY(JSEA) = SXY(JSEA) + FTE * ABXY(JSEA) / CG(NK,ISEA) -#ifdef W3_CESMCOUPLED - ! tail for SD - ETUSSX(JSEA) = ETUSSX(JSEA) + 2*GRAV*ETUSCX(JSEA)/SIG(NK) - ETUSSY(JSEA) = ETUSSY(JSEA) + 2*GRAV*ETUSCY(JSEA)/SIG(NK) -#endif ! ! Tail for surface stokes drift is commented out: very sensitive to tail power ! ! USSX(JSEA) = USSX(JSEA) + 2*GRAV*ETUSCX(JSEA)/SIG(NK) ! USSY(JSEA) = USSY(JSEA) + 2*GRAV*ETUSCY(JSEA)/SIG(NK) + + ! Add tail contribution for surface and layer averaged Stokes drift + IF (LMPENABLED.and.SDTAIL) then + USSX(JSEA) = USSX(JSEA) + 2*GRAV*ETUSCX(JSEA)/SIG(NK) + USSY(JSEA) = USSY(JSEA) + 2*GRAV*ETUSCY(JSEA)/SIG(NK) + USSHX(JSEA) = USSHX(JSEA) + 2*GRAV*ETUSCX(JSEA)/SIG(NK) & + *(1.-(1.-4.*LHSL*WN(NK,ISEA))*EXP(-2.*WN(NK,ISEA)*LHSL)) & + /6./WN(NK,ISEA)/LHSL + USSHY(JSEA) = USSHY(JSEA) + 2*GRAV*ETUSCY(JSEA)/SIG(NK) & + *(1.-(1.-4.*LHSL*WN(NK,ISEA))*EXP(-2.*WN(NK,ISEA)*LHSL)) & + /6./WN(NK,ISEA)/LHSL + END IF UBS(JSEA) = UBS(JSEA) + FTWL * EBAND/GRAV END DO ! @@ -2110,87 +2077,6 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 ) T02(JSEA) = TPI / SIG(NK) T01(JSEA)= T02(JSEA) ENDIF -#ifdef W3_CESMCOUPLED - !TODO is this affected by the NXXX vs. NSEALM? - ! Should LAMULT, etc. be NSEAML length? - ! Output Stokes drift and Langmuir numbers - ! USERO(JSEA,1) = HS(JSEA) / MAX ( 0.001 , DW(JSEA) ) - ! USERO(JSEA,2) = ASF(ISEA) - IF (ETUSSX(JSEA) .NE. 0. .OR. ETUSSY(JSEA) .NE. 0.) THEN - - USSX(JSEA) = ETUSSX(JSEA) - USSY(JSEA) = ETUSSY(JSEA) - USSXH(JSEA) = ETUSSXH(JSEA) - USSYH(JSEA) = ETUSSYH(JSEA) - - ! this check is to divide by zeror error with gx17 - ! is there a better way to do this check? - IF( SQRT(USSX(JSEA)**2 + USSY(JSEA)**2) .GT. 0) THEN - IF( SQRT(USSXH(JSEA)**2+USSYH(JSEA)**2) .GT. 0) THEN - - LANGMT(JSEA) = SQRT ( UST(ISEA) * ASF(ISEA) & - * SQRT ( DAIR / DWAT ) & - / SQRT ( USSX(JSEA)**2 + USSY(JSEA)**2 ) ) - ! Calculating Langmuir Number for misaligned wind and waves - ! see Van Roekel et al., 2012 - ! take z1 = 4 * HS - ! SWW: angle between Stokes drift and wind - - ! no Stokes depth - SWW = ATAN2(USSY(JSEA),USSX(JSEA)) - UD(ISEA) - ! ALPHALS: angle between wind and LC direction, Surface - ! Stokes drift - ! LR check for divide by zero - if ((LANGMT(JSEA)**2 & - /0.4*LOG(MAX(ABS(HML(IX,IY)/4./HS(JSEA)),1.0))+COS(SWW)).eq.0.) then - print *, 'LR warning A denom 0.' - ! This appears to be a decimal precision error - ! The first term equals minus the second term to 6 decimal places - ! The denominator should be a very small number (e-7) - ! ATAN(sin(sww)/small number) tends to pi/2 - ! So I hardcoded this here. - ALPHALS(JSEA) = -1.5707956594501575 - else - - ALPHALS(JSEA) = ATAN(SIN(SWW) / (LANGMT(JSEA)**2 & - /0.4*LOG(MAX(ABS(HML(IX,IY)/4./HS(JSEA)),1.0))+COS(SWW))) - end if - - - ALPHALS(JSEA) = ATAN( SIN(SWW) / ( LANGMT(JSEA)**2 & - /0.4*LOG(MAX(ABS(HML(IX,IY)/4./HS(JSEA)),1.0))+COS(SWW))) - LAPROJ(JSEA) = LANGMT(JSEA) & - * SQRT(ABS(COS(ALPHALS(JSEA))) & - / ABS(COS(SWW-ALPHALS(JSEA)))) - ! Stokes depth - SWW = ATAN2(USSYH(JSEA),USSXH(JSEA)) - UD(ISEA) - ! ALPHAL: angle between wind and LC direction - - ! LR check for divide by zero (same as above) - if ((LANGMT(JSEA)**2 & - /0.4*LOG(MAX(ABS(HML(IX,IY)/4./HS(JSEA)),1.0))+COS(SWW)).eq.0.) then - print *, 'LR warning B denom 0.' - ALPHAL(JSEA) = -1.5707956594501575 - else - - ALPHAL(JSEA) = ATAN(SIN(SWW) / (LANGMT(JSEA)**2 & - /0.4*LOG(MAX(ABS(HML(IX,IY)/4./HS(JSEA)),1.0))+COS(SWW))) - end if - LASL(JSEA) = SQRT(UST(ISEA)*ASF(ISEA) & - * SQRT(DAIR/DWAT) & - / SQRT(USSXH(JSEA)**2+USSYH(JSEA)**2)) - LASLPJ(JSEA) = LASL(JSEA) * SQRT(ABS(COS(ALPHAL(JSEA))) & - / ABS(COS(SWW-ALPHAL(JSEA)))) - ! LAMULT - LAMULT(JSEA) = MIN(5.0, ABS(COS(ALPHAL(JSEA))) * & - SQRT(1.0+(1.5*LASLPJ(JSEA))**(-2)+(5.4*real(LASLPJ(JSEA),kind=8))**(-4))) - ! user defined output - USERO(JSEA,1) = HML(IX,IY) - !USERO(JSEA,2) = COS(ALPHAL(JSEA) - END IF - END IF - END IF -#endif ! ! Add here USERO(JSEA,1) ... ! @@ -2669,6 +2555,7 @@ SUBROUTINE W3IOGO ( INXOUT, NDSOG, IOTST, IMOD ) TH1M, STH1M, TH2M, STH2M, HSIG, PHICE, TAUICE,& STMAXE, STMAXD, HMAXE, HCMAXE, HMAXD, HCMAXD,& USSP, TAUOCX, TAUOCY + USE W3ADATMD, ONLY: USSHX, USSHY !/ USE W3ODATMD, ONLY: NOGRP, NGRPP, IDOUT, UNDEF, NDST, NDSE, & FLOGRD, IPASS => IPASS1, WRITE => WRITE1, & @@ -3043,6 +2930,10 @@ SUBROUTINE W3IOGO ( INXOUT, NDSOG, IOTST, IMOD ) TAUOCX(ISEA) = UNDEF TAUOCY(ISEA) = UNDEF END IF + IF ( FLOGRD( 6, 14) ) THEN + USSHX (ISEA) = UNDEF + USSHY (ISEA) = UNDEF + END IF ! IF ( FLOGRD( 7, 1) ) THEN ABA (ISEA) = UNDEF @@ -3366,6 +3257,9 @@ SUBROUTINE W3IOGO ( INXOUT, NDSOG, IOTST, IMOD ) ELSE IF ( IFI .EQ. 6 .AND. IFJ .EQ. 13 ) THEN WRITE ( NDSOG ) TAUOCX(1:NSEA) WRITE ( NDSOG ) TAUOCY(1:NSEA) + ELSE IF ( IFI .EQ. 6 .AND. IFJ .EQ. 14 ) THEN + WRITE ( NDSOG ) USSHX(1:NSEA) + WRITE ( NDSOG ) USSHY(1:NSEA) ! ! Section 7) ! @@ -3707,6 +3601,11 @@ SUBROUTINE W3IOGO ( INXOUT, NDSOG, IOTST, IMOD ) TAUOCX(1:NSEA) READ (NDSOG,END=801,ERR=802,IOSTAT=IERR) & TAUOCY(1:NSEA) + ELSE IF ( IFI .EQ. 6 .AND. IFJ .EQ. 14 ) THEN + READ (NDSOG,END=801,ERR=802,IOSTAT=IERR) & + USSHX(1:NSEA) + READ (NDSOG,END=801,ERR=802,IOSTAT=IERR) & + USSHY(1:NSEA) ! ! Section 7) diff --git a/model/src/w3iogoncdmd.F90 b/model/src/w3iogoncdmd.F90 index 7520a0aa2..813aa28d2 100644 --- a/model/src/w3iogoncdmd.F90 +++ b/model/src/w3iogoncdmd.F90 @@ -60,9 +60,7 @@ subroutine w3iogoncd () use w3adatmd , only : cflxymax, cflthmax, cflkmax, p2sms, us3d use w3adatmd , only : th1m, sth1m, th2m, sth2m, hsig, phice, tauice use w3adatmd , only : stmaxe, stmaxd, hmaxe, hcmaxe, hmaxd, hcmaxd, ussp, tauocx, tauocy -#ifdef W3_CESMCOUPLED - use w3adatmd , only : langmt -#endif + use w3adatmd , only : usshx, usshy use wav_grdout , only : varatts, outvars use w3timemd , only : set_user_timestring use w3odatmd , only : time_origin, calendar_name, elapsed_secs @@ -355,9 +353,8 @@ subroutine w3iogoncd () if (vname .eq. 'PHICE') call write_var2d(vname, phice (1:nsea) ) if (vname .eq. 'TAUOCX') call write_var2d(vname, tauocx (1:nsea) ) if (vname .eq. 'TAUOCY') call write_var2d(vname, tauocy (1:nsea) ) -#ifdef W3_CESMCOUPLED - if (vname .eq. 'LANGMT') call write_var2d(vname, langmt (1:nsea) ) -#endif + if (vname .eq. 'USSHX') call write_var2d(vname, usshx (1:nsea) ) + if (vname .eq. 'USSHY') call write_var2d(vname, usshy (1:nsea) ) ! Group 7 if (vname .eq. 'ABAX') call write_var2d(vname, aba (1:nsea), dir=cos(abd(1:nsea)) ) if (vname .eq. 'ABAY') call write_var2d(vname, aba (1:nsea), dir=sin(abd(1:nsea)) ) diff --git a/model/src/w3iogrmd.F90 b/model/src/w3iogrmd.F90 index 3aa2688ab..417428591 100644 --- a/model/src/w3iogrmd.F90 +++ b/model/src/w3iogrmd.F90 @@ -993,6 +993,16 @@ SUBROUTINE W3IOGR ( INXOUT, NDSM, IMOD, FEXT ) FTWL, FACTI1, FACTI2, FACHFA, FACHFE #endif ! + ! Langmuir mixing parameterization -------------- + IF ( WRITE ) THEN + WRITE (NDSM) & + LMPENABLED, SDTAIL, HSLMODE + ELSE + READ (NDSM,END=801,ERR=802,IOSTAT=IERR) & + LMPENABLED, SDTAIL, HSLMODE + END IF + + ! -------------- ! ! Output flags for 3D parameters ------------------------------------- * ! Module W3GDATMD diff --git a/model/src/w3iorsmd.F90 b/model/src/w3iorsmd.F90 index 2832d0818..ffb34d471 100644 --- a/model/src/w3iorsmd.F90 +++ b/model/src/w3iorsmd.F90 @@ -328,6 +328,7 @@ SUBROUTINE W3IORS ( INXOUT, NDSR, DUMFPI, IMOD, FLRSTRT ) USE W3PARALL, ONLY: PRINT_MY_TIME #endif USE w3odatmd, ONLY : RUNTYPE, INITFILE + USE w3adatmd, ONLY : USSHX, USSHY #ifdef W3_PDLIB USE PDLIB_FIELD_VEC #endif @@ -1043,6 +1044,10 @@ SUBROUTINE W3IORS ( INXOUT, NDSR, DUMFPI, IMOD, FLRSTRT ) WRITE(NDSR,ERR=803,IOSTAT=IERR) TAUOCX(1:NSEA) WRITE(NDSR,ERR=803,IOSTAT=IERR) TAUOCY(1:NSEA) ENDIF + IF ( FLOGRR(6,14) ) THEN + WRITE(NDSR,ERR=803,IOSTAT=IERR) USSHX(1:NSEA) + WRITE(NDSR,ERR=803,IOSTAT=IERR) USSHY(1:NSEA) + ENDIF IF ( FLOGRR(7,2) ) THEN WRITE(NDSR,ERR=803,IOSTAT=IERR) UBA(1:NSEA) WRITE(NDSR,ERR=803,IOSTAT=IERR) UBD(1:NSEA) @@ -1310,6 +1315,17 @@ SUBROUTINE W3IORS ( INXOUT, NDSR, DUMFPI, IMOD, FLRSTRT ) ENDIF ENDDO ENDIF + IF ( FLOGOA(6,14) ) THEN + READ (NDSR,ERR=802,IOSTAT=IERR) TMP(1:NSEA) + READ (NDSR,ERR=802,IOSTAT=IERR) TMP2(1:NSEA) + DO I=1, NSEALM + J = IAPROC + (I-1)*NAPROC + IF (J .LE. NSEA) THEN + USSHX(I) = TMP(J) + USSHY(I) = TMP2(J) + ENDIF + ENDDO + ENDIF IF ( FLOGOA(7,2) ) THEN READ (NDSR,ERR=802,IOSTAT=IERR) TMP(1:NSEA) READ (NDSR,ERR=802,IOSTAT=IERR) TMP2(1:NSEA) @@ -1393,6 +1409,8 @@ SUBROUTINE W3IORS ( INXOUT, NDSR, DUMFPI, IMOD, FLRSTRT ) UBD = 0. PHIBBL = 0. TAUBBL = 0. + USSHX = 0. + USSHY = 0. ENDIF #ifdef W3_T WRITE (NDST,9008) diff --git a/model/src/w3odatmd.F90 b/model/src/w3odatmd.F90 index 28e97c799..203280468 100644 --- a/model/src/w3odatmd.F90 +++ b/model/src/w3odatmd.F90 @@ -891,9 +891,7 @@ SUBROUTINE W3NOUT ( NDSERR, NDSTST ) IDOUT( 6,11) = 'Wave-ice energy flux' IDOUT( 6,12) = 'Split Surface Stokes' IDOUT( 6,13) = 'Tot wav-ocn mom flux' -#ifdef W3_CESMCOUPLED IDOUT( 6,14) = 'Turbulent Langmuir number' -#endif ! ! 7) Wave-bottom layer ! diff --git a/model/src/wav_comp_nuopc.F90 b/model/src/wav_comp_nuopc.F90 index cec62b55d..8b9ff5a5a 100644 --- a/model/src/wav_comp_nuopc.F90 +++ b/model/src/wav_comp_nuopc.F90 @@ -364,7 +364,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) isSet=isSet, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return if (isPresent .and. isSet) then - wav_coupling_to_cice=(trim(cvalue)=="true") + read(cvalue,*) wav_coupling_to_cice end if write(logmsg,'(A,l)') trim(subname)//': Wave wav_coupling_to_cice setting is ',wav_coupling_to_cice call ESMF_LogWrite(trim(logmsg), ESMF_LOGMSG_INFO) @@ -552,6 +552,7 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc) if ( root_task ) then write(stdout,'(a)')' *** WAVEWATCH III Program shell *** ' write(stdout,'(a)')'===============================================' + write(stdout,'(a,l)')' Wave wav_coupling_to_cice setting is ',wav_coupling_to_cice end if !-------------------------------------------------------------------- @@ -901,6 +902,7 @@ subroutine DataInitialize(gcomp, rc) type(ESMF_State) :: exportState real(r8), pointer :: z0rlen(:) real(r8), pointer :: sw_lamult(:) + real(r8), pointer :: sw_lasl(:) real(r8), pointer :: sw_ustokes(:) real(r8), pointer :: sw_vstokes(:) real(r8), pointer :: wave_elevation_spectrum(:,:) @@ -922,6 +924,14 @@ subroutine DataInitialize(gcomp, rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return sw_lamult (:) = 1. endif + if (state_fldchk(exportState, 'Sw_lasl')) then + call state_getfldptr(exportState, 'Sw_lasl', sw_lasl, rc=rc) + if (ChkErr(rc,__LINE__,u_FILE_u)) return + ! note: the default value of this surface layer averaged Langmuir number + ! should be a large number to be consistent with lamult=1., ustokes=0., + ! and vstokes=0. + sw_lasl (:) = 1.e6 + endif if (state_fldchk(exportState, 'Sw_ustokes')) then call state_getfldptr(exportState, 'Sw_ustokes', sw_ustokes, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return @@ -938,7 +948,7 @@ subroutine DataInitialize(gcomp, rc) call CalcRoughl(z0rlen) endif if (wav_coupling_to_cice) then - call state_getfldptr(exportState, 'wave_elevation_spectrum', wave_elevation_spectrum, rc=rc) + call state_getfldptr(exportState, 'Sw_elevation_spectrum', wave_elevation_spectrum, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return wave_elevation_spectrum(:,:) = 0. endif diff --git a/model/src/wav_grdout.F90 b/model/src/wav_grdout.F90 index 7e592e618..4583070d7 100644 --- a/model/src/wav_grdout.F90 +++ b/model/src/wav_grdout.F90 @@ -4,7 +4,7 @@ module wav_grdout implicit none - integer, parameter :: maxvars = 24 ! maximum number of variables/group + integer, parameter :: maxvars = 25 ! maximum number of variables/group private ! except @@ -222,7 +222,7 @@ subroutine initialize_gridout ] ! 6 Wave-ocean layer - gridoutdefs(6,1:24) = [ & + gridoutdefs(6,1:25) = [ & varatts( "SXY ", "SXX ", "Radiation stresses xx ", "N m-1 ", " ", .false.) , & varatts( "SXY ", "SYY ", "Radiation stresses yy ", "N m-1 ", " ", .false.) , & varatts( "SXY ", "SXY ", "Radiation stresses xy ", "N m-1 ", " ", .false.) , & @@ -246,7 +246,8 @@ subroutine initialize_gridout varatts( "USP ", "USSPY ", "Partitioned surface Stokes drift y ", "m s-1 ", "p ", .false.) , & varatts( "TWC ", "TAUOCX ", "Total wave to ocean stress x ", "Pa ", " ", .false.) , & varatts( "TWC ", "TAUOCY ", "Total wave to ocean stress y ", "Pa ", " ", .false.) , & - varatts( "LAN ", "LANGMT ", "Turbulent Langmuir number (La_t) ", "nd ", " ", .false.) & + varatts( "USSH ", "USSHX ", "Surface layer averaged Stokes drift x ", "m s-1 ", " ", .false.) , & + varatts( "USSH ", "USSHY ", "Surface layer averaged Stokes drift y ", "m s-1 ", " ", .false.) & ] ! 7 Wave-bottom layer diff --git a/model/src/wav_import_export.F90 b/model/src/wav_import_export.F90 index 025edb630..8aaee6dd9 100644 --- a/model/src/wav_import_export.F90 +++ b/model/src/wav_import_export.F90 @@ -20,7 +20,7 @@ module wav_import_export use wav_shr_mod , only : chkerr use wav_shr_mod , only : state_diagnose, state_reset, state_getfldptr, state_fldchk use wav_shr_mod , only : wav_coupling_to_cice, nwav_elev_spectrum, merge_import, dbug_flag, multigrid, unstr_mesh - use constants , only : grav, tpi, dwat + use constants , only : grav, tpi, dwat, dair use w3parall , only : init_get_isea implicit none @@ -140,9 +140,9 @@ subroutine advertise_fields(importState, ExportState, flds_scalar_name, rc) end if if (cesmcoupled) then call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_lamult' ) + call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_lasl' ) call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_ustokes') call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_vstokes') - !call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_hstokes') else call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_z0') end if @@ -154,7 +154,7 @@ subroutine advertise_fields(importState, ExportState, flds_scalar_name, rc) ! will be implemented soon based on receiving USSP and USSPF from the coupler instead of the mod_def file. This will ! also ensure compatibility with the ocean component since ocean will also receive these from the coupler. if (wav_coupling_to_cice) then - call fldlist_add(fldsFrWav_num, fldsFrWav, 'wave_elevation_spectrum', & + call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_elevation_spectrum', & ungridded_lbound=1, ungridded_ubound=nwav_elev_spectrum) end if @@ -267,7 +267,7 @@ subroutine import_fields( gcomp, time0, timen, rc ) use w3odatmd , only: w3seto use w3wdatmd , only: time, w3setw #ifdef W3_CESMCOUPLED - use w3idatmd , only: HML + use w3idatmd , only: HSL #else use wmupdtmd , only: wmupd2 use wmmdatmd , only: wmsetm @@ -480,8 +480,8 @@ subroutine import_fields( gcomp, time0, timen, rc ) if (ChkErr(rc,__LINE__,u_FILE_u)) return ! ocn mixing layer depth - global_data = max(global_data, 5.) - call FillGlobalInput(global_data, HML) + global_data = max(global_data, 5.)*0.2 + call FillGlobalInput(global_data, HSL) #endif ! --------------- ! INFLAGS1(5) - atm momentum fields @@ -588,7 +588,9 @@ subroutine export_fields (gcomp, rc) use w3gdatmd , only : nseal, mapsf, MAPSTA, USSPF, NK, w3setg use w3iogomd , only : CALC_U3STOKES #ifdef W3_CESMCOUPLED - use w3adatmd , only : LAMULT + use w3wdatmd , only : ASF, UST + use w3adatmd , only : USSHX, USSHY, UD, HS + use w3idatmd , only : HSL #else use wmmdatmd , only : mdse, mdst, wmsetm #endif @@ -600,6 +602,7 @@ subroutine export_fields (gcomp, rc) ! Local variables #ifdef W3_CESMCOUPLED real(R8) :: fillvalue = 1.0e30_R8 ! special missing value + real(R8) :: sww, laslpj, alphal #else real(R8) :: fillvalue = zero ! special missing value #endif @@ -616,6 +619,7 @@ subroutine export_fields (gcomp, rc) real(r8), pointer :: syyn(:) real(r8), pointer :: sw_lamult(:) + real(r8), pointer :: sw_lasl(:) real(r8), pointer :: sw_ustokes(:) real(r8), pointer :: sw_vstokes(:) @@ -653,13 +657,46 @@ subroutine export_fields (gcomp, rc) call init_get_isea(isea, jsea) ix = mapsf(isea,1) iy = mapsf(isea,2) - if (mapsta(iy,ix) == 1) then - sw_lamult(jsea) = LAMULT(jsea) + if (mapsta(iy,ix) == 1 .and. HS(jsea) > zero) then + sww = atan2(USSHY(jsea),USSHX(jsea)) - UD(isea) + alphal = atan( sin(sww) / ( & + 2.5 * UST(isea)*ASF(isea)*sqrt(dair/dwat) & + / max(1.e-14, sqrt(USSX(jsea)**2+USSY(jsea)**2)) & + * log(max(1.0, abs(1.25*HSL(ix,iy)/HS(jsea)))) & + + cos(sww) ) & + ) + ! note: an arbitrary minimum value of 0.2 is set to avoid zero + ! Langmuir number which may result from zero surface friction + ! velocity but may cause unphysically strong Langmuir mixing + laslpj = max( 0.2, sqrt( UST(isea)*ASF(isea)*sqrt(dair/dwat) & + / max(1.e-14, sqrt(USSHX(jsea)**2+USSHY(jsea)**2)) ) & + * sqrt(abs(cos(alphal))/abs(cos(sww-alphal))) ) + sw_lamult(jsea) = abs(cos(alphal)) * & + sqrt(1.0+(1.5*laslpj)**(-2)+(5.4*laslpj)**(-4)) else sw_lamult(jsea) = 1. endif enddo end if + if (state_fldchk(exportState, 'Sw_lasl')) then + call state_getfldptr(exportState, 'Sw_lasl', sw_lasl, rc=rc) + if (ChkErr(rc,__LINE__,u_FILE_u)) return + sw_lasl(:) = fillvalue + do jsea=1, nseal + isea = iaproc + (jsea-1)*naproc + ix = mapsf(isea,1) + iy = mapsf(isea,2) + if (mapsta(iy,ix) == 1) then + ! note: an arbitrary minimum value of 0.2 is set to avoid zero + ! Langmuir number which may result from zero surface friction + ! velocity but may cause unphysically strong Langmuir mixing + sw_lasl(jsea) = max(0.2, sqrt(UST(isea)*ASF(isea)*sqrt(dair/dwat) & + / max(1.e-14, sqrt(USSHX(jsea)**2+USSHY(jsea)**2)))) + else + sw_lasl(jsea) = 1.e6 + endif + enddo + end if #endif ! surface stokes drift if (state_fldchk(exportState, 'Sw_ustokes')) then @@ -729,7 +766,7 @@ subroutine export_fields (gcomp, rc) call CalcRadstr2D( va, sxxn, sxyn, syyn) end if if (wav_coupling_to_cice) then - call state_getfldptr(exportState, 'wave_elevation_spectrum', wave_elevation_spectrum, rc=rc) + call state_getfldptr(exportState, 'Sw_elevation_spectrum', wave_elevation_spectrum, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return ! Initialize wave elevation spectrum wave_elevation_spectrum(:,:) = fillvalue From 1f1c05f16b2afd7b6da3e4626fc07632da2c1c7b Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Wed, 5 Jul 2023 13:41:06 -0600 Subject: [PATCH 02/63] updates in laslpj and lamult computations to improve numerical stability --- model/src/wav_import_export.F90 | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/model/src/wav_import_export.F90 b/model/src/wav_import_export.F90 index 8aaee6dd9..e6caa1a2d 100644 --- a/model/src/wav_import_export.F90 +++ b/model/src/wav_import_export.F90 @@ -602,7 +602,7 @@ subroutine export_fields (gcomp, rc) ! Local variables #ifdef W3_CESMCOUPLED real(R8) :: fillvalue = 1.0e30_R8 ! special missing value - real(R8) :: sww, laslpj, alphal + real :: sww, langmt, lasl, laslpj, alphal #else real(R8) :: fillvalue = zero ! special missing value #endif @@ -657,22 +657,21 @@ subroutine export_fields (gcomp, rc) call init_get_isea(isea, jsea) ix = mapsf(isea,1) iy = mapsf(isea,2) - if (mapsta(iy,ix) == 1 .and. HS(jsea) > zero) then + if (mapsta(iy,ix) == 1 .and. HS(jsea) > zero .and. & + sqrt(USSX(jsea)**2+USSY(jsea)**2)>zero .and. sqrt(USSHX(jsea)**2+USSHY(jsea)**2)>zero ) then sww = atan2(USSHY(jsea),USSHX(jsea)) - UD(isea) alphal = atan( sin(sww) / ( & 2.5 * UST(isea)*ASF(isea)*sqrt(dair/dwat) & - / max(1.e-14, sqrt(USSX(jsea)**2+USSY(jsea)**2)) & + / max(1.e-14_r8, sqrt(USSX(jsea)**2+USSY(jsea)**2)) & * log(max(1.0, abs(1.25*HSL(ix,iy)/HS(jsea)))) & + cos(sww) ) & ) - ! note: an arbitrary minimum value of 0.2 is set to avoid zero - ! Langmuir number which may result from zero surface friction - ! velocity but may cause unphysically strong Langmuir mixing - laslpj = max( 0.2, sqrt( UST(isea)*ASF(isea)*sqrt(dair/dwat) & - / max(1.e-14, sqrt(USSHX(jsea)**2+USSHY(jsea)**2)) ) & - * sqrt(abs(cos(alphal))/abs(cos(sww-alphal))) ) - sw_lamult(jsea) = abs(cos(alphal)) * & - sqrt(1.0+(1.5*laslpj)**(-2)+(5.4*laslpj)**(-4)) + lasl = sqrt(ust(isea) * asf(isea) * sqrt(dair/dwat) & + / sqrt(usshx(jsea)**2 + usshy(jsea)**2 )) + laslpj = lasl * sqrt(abs(cos(alphal)) & + / abs(cos(sww-alphal))) + sw_lamult(jsea) = min(5.0, abs(cos(alphal)) * & + sqrt(1.0+(1.5*laslpj)**(-2)+(5.4_r8*laslpj)**(-4))) else sw_lamult(jsea) = 1. endif From 7af11881f927ce6872f65937b2262ed754ce3782 Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Wed, 5 Jul 2023 13:41:22 -0600 Subject: [PATCH 03/63] CMakeLists changes for CESM --- model/src/CMakeLists.txt | 322 ++++++++++++--------------------------- 1 file changed, 100 insertions(+), 222 deletions(-) diff --git a/model/src/CMakeLists.txt b/model/src/CMakeLists.txt index 9dbc16073..63f850c05 100644 --- a/model/src/CMakeLists.txt +++ b/model/src/CMakeLists.txt @@ -1,247 +1,125 @@ +cmake_minimum_required(VERSION 3.12) +project(wav Fortran) -# Open switch file -file(STRINGS ${CMAKE_BINARY_DIR}/switch switch_strings) -separate_arguments(switches UNIX_COMMAND ${switch_strings}) +message("Using CIME in ${CIMEROOT} with compiler ${COMPILER}") -# Put executables/libraries into a top-level bin/lib directory within the build directory -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) - -# Include list of src files to make file more readable -# defines variables "ftn_src", "pdlib_src", "scrip_src", and "scripnc_src" -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/src_list.cmake) -# check_switches as a function for less verbosity in this CMakeLists.txt -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/check_switches.cmake) - -check_switches("${switches}" switch_files) - -add_library(ww3_lib STATIC ${ftn_src} ${switch_files}) -# Create alias with same name as exported target -# so that WW3 can be usead with add_subdirectory -add_library(WW3::WW3 ALIAS ww3_lib) - -# Re-name library on disk to just libww3 instead of libww3_lib -set_target_properties(ww3_lib PROPERTIES OUTPUT_NAME "ww3") -set_target_properties(ww3_lib PROPERTIES Fortran_MODULE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mod") - -foreach(switch ${switches}) - target_compile_definitions(ww3_lib PUBLIC W3_${switch}) -endforeach() - -if(ENDIAN STREQUAL "BIG") - set(endianness "big_endian") -elseif(ENDIAN STREQUAL "LITTLE") - set(endianness "little_endian") -elseif(ENDIAN STREQUAL "NATIVE") - set(endianness "native") +include(${CASEROOT}/Macros.cmake) +if (MPILIB STREQUAL mpi-serial) + set(CMAKE_Fortran_COMPILER ${SFC}) + set(CMAKE_C_COMPILER ${SCC}) else() - message(FATAL_ERROR "Unknown option specified by ENDIAN: ${ENDIAN}") + set(CMAKE_Fortran_COMPILER ${MPIFC}) + set(CMAKE_C_COMPILER ${MPICC}) endif() - -add_compile_definitions(ENDIANNESS='${endianness}') - -target_include_directories(ww3_lib - PUBLIC $ - $) - -# Set compiler flags. -if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") - set(compile_flags -no-fma -ip -g -traceback -i4 -real-size 32 -fp-model precise - -assume byterecl -fno-alias -fno-fnalias) - # -sox only works on Linux - if(LINUX) - list(APPEND compile_flags -sox) - endif() - set(compile_flags_release -O3) - # SHELL: prefix fixes CMake attempting to de-duplicate the repeated uses of 'all' in -warn, -debug, -check - # See https://cmake.org/cmake/help/latest/command/target_compile_options.html#option-de-duplication - set(compile_flags_debug -O0 "SHELL:-debug all" "SHELL:-warn all" "SHELL:-check all" -check noarg_temp_created -fp-stack-check -heap-arrays -traceback -fpe0) - - if(APPLE) - # The linker on macOS does not include `common symbols` (usually module variables without a default value) by default - # Passing the -c flag includes them and fixes an error with undefined symbols - # Only ifort marks these symbols as common, compared to GCC - set(CMAKE_Fortran_ARCHIVE_FINISH " -c ") - set(CMAKE_C_ARCHIVE_FINISH " -c ") - endif() - -elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$") - set(compile_flags -g -fno-second-underscore -ffree-line-length-none) - set(compile_flags_release -O3) - set(compile_flags_debug -Wall -fcheck=all -ffpe-trap=invalid,zero,overflow -frecursive -fbacktrace) - - if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10) - target_compile_options(ww3_lib PUBLIC -fallow-argument-mismatch) - endif() - -elseif(CMAKE_Fortran_COMPILER_ID MATCHES "PGI") - set(compile_flags -g -i4 -r4 -Kieee) - set(compile_flags_release -O3) - set(compile_flags_debug -O0 -Mbounds -Mchkfpstk -Mchkstk -Mdalign -Mdclchk -Mdepchk -Miomutex -Ktrap=fp -Mrecursive -traceback) - - if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10) - target_compile_options(ww3_lib PUBLIC -fallow-argument-mismatch -fallow-invalid-boz) - endif() - -elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Cray") - # TODO: Where do we set -homp for OpenMP compiles? - set(compile_flags -g -sdefault32 -eg) - set(compile_flags_release -O3) - set(compile_flags_debug -O0 -Rbcps -Ktrap=fp) -endif() - -target_compile_options(ww3_lib PUBLIC "$<$:${compile_flags}>") -target_compile_options(ww3_lib PUBLIC "$<$,$>:${compile_flags_debug}>") -target_compile_options(ww3_lib PUBLIC "$<$,$>:${compile_flags_release}>") - -# Executables to always build -set(programs ww3_strt ww3_grid ww3_bound ww3_outf ww3_outp ww3_trck ww3_grib - ww3_gint gx_outf gx_outp ww3_uprstr ww3_shel ww3_prep ww3_gspl ww3_multi ww3_systrk) - -# Executables to build if NetCDF is found -set(netcdf_programs ww3_ounf ww3_ounp ww3_bounc ww3_trnc ww3_prnc) - -if("OASIS" IN_LIST switches) - find_package(OASIS REQUIRED) - target_link_libraries(ww3_lib PUBLIC OASIS::OASIS) -endif() - -if(NETCDF) - if("netcdf" IN_LIST EXCLUDE_FIND) - # NetCDF library flags provided by compiler or wrapper script: don't search - set(NetCDF_Fortran_FOUND TRUE) - message(WARNING "Not searching for NetCDF library - please ensure correct flags are provided by your compiler/wrapper") - else() - find_package(NetCDF REQUIRED COMPONENTS Fortran) - endif() -endif() - -if(NetCDF_Fortran_FOUND) - target_sources(ww3_lib PRIVATE w3ounfmetamd.F90) - if(TARGET NetCDF::NetCDF_Fortran) - # NetCDF library flags provided by compiler or wrapper script: don't add as dependency - target_link_libraries(ww3_lib PUBLIC NetCDF::NetCDF_Fortran) - endif() - list(APPEND programs ${netcdf_programs}) +set(CMAKE_Fortran_FLAGS "${FFLAGS} ${CPPDEFS} -I${LIBROOT}/include -I${LIBROOT}/finclude -I${LIBROOT}/nuopc/esmf/${NINST_VALUE}/include") + +#------------------------- +# Set ESMF_F90COMPILEPATHS +#------------------------- +# convert esmf.mk makefile variables to cmake variables until ESMF +# provides proper cmake package +if (DEFINED ENV{ESMFMKFILE}) + message("ESMFMKFILE: $ENV{ESMFMKFILE}") +else() + message(FATAL_ERROR "ESMFMKFILE env variable is not defined") endif() - -if(UFS_CAP) - # Don't search for ESMF if target already exists (when build WW3 as UFS submodule) - if (NOT TARGET esmf) - find_package(ESMF MODULE REQUIRED) +set(ESMFMKFILE $ENV{ESMFMKFILE}) +file(STRINGS ${ESMFMKFILE} esmf_mk_text) +foreach(line ${esmf_mk_text}) + string(REGEX REPLACE "^[ ]+" "" line ${line}) # strip leading spaces + if (line MATCHES "^ESMF_*") # process only line starting with ESMF_ + string(REGEX MATCH "^ESMF_[^=]+" esmf_name ${line}) + string(REPLACE "${esmf_name}=" "" emsf_value ${line}) + set(${esmf_name} "${emsf_value}") endif() - - if(UFS_CAP STREQUAL "MULTI_ESMF") - set(cap_src ${esmf_multi_cap_src}) - elseif(UFS_CAP STREQUAL "NUOPC_MESH") - set(cap_src ${nuopc_mesh_cap_src}) - endif() - - target_sources(ww3_lib PRIVATE ${cap_src}) - target_link_libraries(ww3_lib PUBLIC esmf) - # Don't build executables when building WW3 ESMF library - set(programs "") +endforeach() +string(REPLACE "-I" "" ESMF_F90COMPILEPATHS ${ESMF_F90COMPILEPATHS}) +string(REPLACE " " ";" ESMF_F90COMPILEPATHS ${ESMF_F90COMPILEPATHS}) +message("ESMF_F90COMPILEPATHS: ${ESMF_F90COMPILEPATHS}") + +#------------------------- +# Determine switches +#------------------------- +list(APPEND switches "CESMCOUPLED" "NCO" "DIST" "MPI" "PR3" "UQ" "FLX0" "SEED" "ST4" "STAB0" "NL1" "BT1" "DB1" "MLIM" "FLD2" "TR0" "BS0" "RWND" "WNX1" "WNT1" "CRX1" "CRT1" "O0" "O1" "O2" "O3" "O4" "O5" "O6" "O7" "O14" "O15" "IS0" "REF0" "NOGRB") + +# TODO: need to enamble IC4 with the unstructured implemention +if (DEFINED USE_UNSTRUCT) + list(APPEND switches "IC0" "PDLIB" "METIS") +else() +### list(APPEND switches "IC4" "OMPG" "OMPH") + list(APPEND switches "IC0") endif() -set_property(SOURCE w3initmd.F90 - APPEND - PROPERTY COMPILE_DEFINITIONS - "__WW3_SWITCHES__=\'${switch_strings}\'" - ) - -if("OMPG" IN_LIST switches) - find_package(OpenMP REQUIRED COMPONENTS Fortran) - target_link_libraries(ww3_lib PUBLIC OpenMP::OpenMP_Fortran) -endif() +#------------------------- +# Include list of src files to make file more readable +# defines variables "ftn_src", "nuopc_mesh_cap_src", "pdlib_src", "scrip_src", and "scripnc_src" +#------------------------- +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/src_list.cmake) -if("MPI" IN_LIST switches) - find_package(MPI REQUIRED COMPONENTS Fortran) - target_link_libraries(ww3_lib PUBLIC MPI::MPI_Fortran) -endif() +list(APPEND ftn_src ${nuopc_mesh_cap_src}) # Handle PDLIB, SCRIP, SCRIPNC build files directly instead of through configuration file if("PDLIB" IN_LIST switches) + list(APPEND ftn_src ${pdlib_src}) if("SCOTCH" IN_LIST switches) - find_package(SCOTCH REQUIRED) - target_sources(ww3_lib PRIVATE ${pdlib_src}) - target_link_libraries(ww3_lib PUBLIC PTSCOTCHparmetis::PTSCOTCHparmetis) -elseif("METIS" IN_LIST switches) - find_package(ParMETIS REQUIRED) - target_sources(ww3_lib PRIVATE ${pdlib_src}) - target_link_libraries(ww3_lib PUBLIC ParMETIS::ParMETIS) + #find_package(SCOTCH REQUIRED) + #target_link_libraries(ww3_lib PUBLIC PTSCOTCHparmetis::PTSCOTCHparmetis) + elseif("METIS" IN_LIST switches) + #find_package(ParMETIS REQUIRED) + #target_link_libraries(ww3_lib PUBLIC ParMETIS::ParMETIS) else() - message(FATAL_ERROR "PDLIB requires METIS or SCOTCH library for domain decomposition") - endif() -endif() - -if("SCRIP" IN_LIST switches) - target_sources(ww3_lib PRIVATE ${scrip_src}) -endif() - - -if("SCRIPNC" IN_LIST switches OR "OASIS" IN_LIST switches OR "TRKNC" IN_LIST switches) - if(NOT NetCDF_Fortran_FOUND) - message(FATAL_ERROR "Cannot build SCRIPNC, OASIS, or TRKNC without NetCDF") + message(FATAL_ERROR "PDLIB requires METIS or SCOTCH library for domain decomposition") endif() endif() -if("SCRIPNC" IN_LIST switches) - target_sources(ww3_lib PRIVATE ${scrip_src} ${scripnc_src}) -endif() - -if("NCEP2" IN_LIST switches) - find_package(g2 REQUIRED) - find_package(bacio REQUIRED) - find_package(w3emc REQUIRED) - target_link_libraries(ww3_lib PUBLIC g2::g2_4 bacio::bacio_4 w3emc::w3emc_4) -endif() - -if("TIDE" IN_LIST switches) - list(APPEND programs ww3_prtide) -endif() +#------------------------- +# Determine switch specific files +# Include check_switches as a function for less verbosity in this CMakeLists.txt +#------------------------- +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/check_switches.cmake) +check_switches("${switches}" switch_files) -# Executables are not needed when building ww3_multi_esmf library -foreach(program ${programs}) - add_executable(${program} ${program}.F90) - target_link_libraries(${program} PRIVATE ww3_lib) +message(STATUS "----status of source files-----") +message(STATUS "list of always source files is : ${ftn_src}") +message(STATUS "list of switch files is : ${switch_files}") + +#------------------------- +# Now check in SourceMods to see if the file should be used instead +#------------------------- +list(APPEND srcfiles ${ftn_src} ${switch_files}) +foreach(file ${srcfiles} ) + if(EXISTS "${CASEROOT}/SourceMods/src.ww3dev/${file}") + message("Using ${file} from ${CASEROOT}/SourceMods/src.ww3dev") + list(REMOVE_ITEM srcfiles ${file}) + list(APPEND srcfiles "${CASEROOT}/SourceMods/src.ww3dev/${file}") + message(STATUS "Using ${file} from ${CASEROOT}/SourceMods/src.ww3dev") + endif() endforeach() -install( - TARGETS ${programs} ww3_lib - EXPORT WW3Exports - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) - -install(FILES ${CMAKE_BINARY_DIR}/switch DESTINATION ${CMAKE_INSTALL_PREFIX}) -install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod DESTINATION ${CMAKE_INSTALL_PREFIX}) - +#------------------------- +# Determine target library wav +#------------------------- +add_library(wav ${srcfiles}) +target_include_directories (wav PRIVATE ${ESMF_F90COMPILEPATHS}) -export(EXPORT WW3Exports - NAMESPACE WW3:: - FILE WW3-targets.cmake +#------------------------- +# Determine compile definitions for wav +#------------------------- +foreach(switch ${switches}) + target_compile_definitions(wav PUBLIC W3_${switch}) +endforeach() +add_compile_definitions(ENDIANNESS="big_endian") +set_property(SOURCE w3initmd.F90 + APPEND + PROPERTY COMPILE_DEFINITIONS + "__WW3_SWITCHES__=\'\'" ) -### Package config -include(CMakePackageConfigHelpers) -set(CONFIG_INSTALL_DESTINATION lib/cmake/WW3) +message("CMAKE_CURRENT_BINARY_DIR is ${CMAKE_CURRENT_BINARY_DIR}") +message("PROJECT_BINARY_DIR is ${PROJECT_BINARY_DIR}") -configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/WW3-package-config.cmake.in - ${CMAKE_BINARY_DIR}/WW3-config.cmake - INSTALL_DESTINATION ${CONFIG_INSTALL_DESTINATION}) - -install(FILES ${CMAKE_BINARY_DIR}/WW3-config.cmake - DESTINATION ${CONFIG_INSTALL_DESTINATION}) - -write_basic_package_version_file(${CMAKE_BINARY_DIR}/WW3-config-version.cmake - VERSION ${PROJECT_VERSION} - COMPATIBILITY AnyNewerVersion) - -install(FILES ${CMAKE_BINARY_DIR}/WW3-config-version.cmake - DESTINATION ${CONFIG_INSTALL_DESTINATION}) +# Executables to always build +add_executable(ww3_grid ww3_grid.F90) +target_link_libraries(ww3_grid PRIVATE wav) -install(EXPORT WW3Exports - NAMESPACE WW3:: - FILE WW3-targets.cmake - DESTINATION ${CONFIG_INSTALL_DESTINATION}) +install(TARGETS wav) From e980324534aca268b62ddccf6fd0c782b88d8280 Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Wed, 5 Jul 2023 18:14:26 -0600 Subject: [PATCH 04/63] Revert "CMakeLists changes for CESM" This reverts commit 7af11881f927ce6872f65937b2262ed754ce3782. --- model/src/CMakeLists.txt | 322 +++++++++++++++++++++++++++------------ 1 file changed, 222 insertions(+), 100 deletions(-) diff --git a/model/src/CMakeLists.txt b/model/src/CMakeLists.txt index 63f850c05..9dbc16073 100644 --- a/model/src/CMakeLists.txt +++ b/model/src/CMakeLists.txt @@ -1,125 +1,247 @@ -cmake_minimum_required(VERSION 3.12) -project(wav Fortran) -message("Using CIME in ${CIMEROOT} with compiler ${COMPILER}") +# Open switch file +file(STRINGS ${CMAKE_BINARY_DIR}/switch switch_strings) +separate_arguments(switches UNIX_COMMAND ${switch_strings}) -include(${CASEROOT}/Macros.cmake) -if (MPILIB STREQUAL mpi-serial) - set(CMAKE_Fortran_COMPILER ${SFC}) - set(CMAKE_C_COMPILER ${SCC}) +# Put executables/libraries into a top-level bin/lib directory within the build directory +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + +# Include list of src files to make file more readable +# defines variables "ftn_src", "pdlib_src", "scrip_src", and "scripnc_src" +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/src_list.cmake) +# check_switches as a function for less verbosity in this CMakeLists.txt +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/check_switches.cmake) + +check_switches("${switches}" switch_files) + +add_library(ww3_lib STATIC ${ftn_src} ${switch_files}) +# Create alias with same name as exported target +# so that WW3 can be usead with add_subdirectory +add_library(WW3::WW3 ALIAS ww3_lib) + +# Re-name library on disk to just libww3 instead of libww3_lib +set_target_properties(ww3_lib PROPERTIES OUTPUT_NAME "ww3") +set_target_properties(ww3_lib PROPERTIES Fortran_MODULE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mod") + +foreach(switch ${switches}) + target_compile_definitions(ww3_lib PUBLIC W3_${switch}) +endforeach() + +if(ENDIAN STREQUAL "BIG") + set(endianness "big_endian") +elseif(ENDIAN STREQUAL "LITTLE") + set(endianness "little_endian") +elseif(ENDIAN STREQUAL "NATIVE") + set(endianness "native") else() - set(CMAKE_Fortran_COMPILER ${MPIFC}) - set(CMAKE_C_COMPILER ${MPICC}) + message(FATAL_ERROR "Unknown option specified by ENDIAN: ${ENDIAN}") endif() -set(CMAKE_Fortran_FLAGS "${FFLAGS} ${CPPDEFS} -I${LIBROOT}/include -I${LIBROOT}/finclude -I${LIBROOT}/nuopc/esmf/${NINST_VALUE}/include") - -#------------------------- -# Set ESMF_F90COMPILEPATHS -#------------------------- -# convert esmf.mk makefile variables to cmake variables until ESMF -# provides proper cmake package -if (DEFINED ENV{ESMFMKFILE}) - message("ESMFMKFILE: $ENV{ESMFMKFILE}") -else() - message(FATAL_ERROR "ESMFMKFILE env variable is not defined") + +add_compile_definitions(ENDIANNESS='${endianness}') + +target_include_directories(ww3_lib + PUBLIC $ + $) + +# Set compiler flags. +if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") + set(compile_flags -no-fma -ip -g -traceback -i4 -real-size 32 -fp-model precise + -assume byterecl -fno-alias -fno-fnalias) + # -sox only works on Linux + if(LINUX) + list(APPEND compile_flags -sox) + endif() + set(compile_flags_release -O3) + # SHELL: prefix fixes CMake attempting to de-duplicate the repeated uses of 'all' in -warn, -debug, -check + # See https://cmake.org/cmake/help/latest/command/target_compile_options.html#option-de-duplication + set(compile_flags_debug -O0 "SHELL:-debug all" "SHELL:-warn all" "SHELL:-check all" -check noarg_temp_created -fp-stack-check -heap-arrays -traceback -fpe0) + + if(APPLE) + # The linker on macOS does not include `common symbols` (usually module variables without a default value) by default + # Passing the -c flag includes them and fixes an error with undefined symbols + # Only ifort marks these symbols as common, compared to GCC + set(CMAKE_Fortran_ARCHIVE_FINISH " -c ") + set(CMAKE_C_ARCHIVE_FINISH " -c ") + endif() + +elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$") + set(compile_flags -g -fno-second-underscore -ffree-line-length-none) + set(compile_flags_release -O3) + set(compile_flags_debug -Wall -fcheck=all -ffpe-trap=invalid,zero,overflow -frecursive -fbacktrace) + + if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10) + target_compile_options(ww3_lib PUBLIC -fallow-argument-mismatch) + endif() + +elseif(CMAKE_Fortran_COMPILER_ID MATCHES "PGI") + set(compile_flags -g -i4 -r4 -Kieee) + set(compile_flags_release -O3) + set(compile_flags_debug -O0 -Mbounds -Mchkfpstk -Mchkstk -Mdalign -Mdclchk -Mdepchk -Miomutex -Ktrap=fp -Mrecursive -traceback) + + if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10) + target_compile_options(ww3_lib PUBLIC -fallow-argument-mismatch -fallow-invalid-boz) + endif() + +elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Cray") + # TODO: Where do we set -homp for OpenMP compiles? + set(compile_flags -g -sdefault32 -eg) + set(compile_flags_release -O3) + set(compile_flags_debug -O0 -Rbcps -Ktrap=fp) +endif() + +target_compile_options(ww3_lib PUBLIC "$<$:${compile_flags}>") +target_compile_options(ww3_lib PUBLIC "$<$,$>:${compile_flags_debug}>") +target_compile_options(ww3_lib PUBLIC "$<$,$>:${compile_flags_release}>") + +# Executables to always build +set(programs ww3_strt ww3_grid ww3_bound ww3_outf ww3_outp ww3_trck ww3_grib + ww3_gint gx_outf gx_outp ww3_uprstr ww3_shel ww3_prep ww3_gspl ww3_multi ww3_systrk) + +# Executables to build if NetCDF is found +set(netcdf_programs ww3_ounf ww3_ounp ww3_bounc ww3_trnc ww3_prnc) + +if("OASIS" IN_LIST switches) + find_package(OASIS REQUIRED) + target_link_libraries(ww3_lib PUBLIC OASIS::OASIS) endif() -set(ESMFMKFILE $ENV{ESMFMKFILE}) -file(STRINGS ${ESMFMKFILE} esmf_mk_text) -foreach(line ${esmf_mk_text}) - string(REGEX REPLACE "^[ ]+" "" line ${line}) # strip leading spaces - if (line MATCHES "^ESMF_*") # process only line starting with ESMF_ - string(REGEX MATCH "^ESMF_[^=]+" esmf_name ${line}) - string(REPLACE "${esmf_name}=" "" emsf_value ${line}) - set(${esmf_name} "${emsf_value}") + +if(NETCDF) + if("netcdf" IN_LIST EXCLUDE_FIND) + # NetCDF library flags provided by compiler or wrapper script: don't search + set(NetCDF_Fortran_FOUND TRUE) + message(WARNING "Not searching for NetCDF library - please ensure correct flags are provided by your compiler/wrapper") + else() + find_package(NetCDF REQUIRED COMPONENTS Fortran) endif() -endforeach() -string(REPLACE "-I" "" ESMF_F90COMPILEPATHS ${ESMF_F90COMPILEPATHS}) -string(REPLACE " " ";" ESMF_F90COMPILEPATHS ${ESMF_F90COMPILEPATHS}) -message("ESMF_F90COMPILEPATHS: ${ESMF_F90COMPILEPATHS}") - -#------------------------- -# Determine switches -#------------------------- -list(APPEND switches "CESMCOUPLED" "NCO" "DIST" "MPI" "PR3" "UQ" "FLX0" "SEED" "ST4" "STAB0" "NL1" "BT1" "DB1" "MLIM" "FLD2" "TR0" "BS0" "RWND" "WNX1" "WNT1" "CRX1" "CRT1" "O0" "O1" "O2" "O3" "O4" "O5" "O6" "O7" "O14" "O15" "IS0" "REF0" "NOGRB") - -# TODO: need to enamble IC4 with the unstructured implemention -if (DEFINED USE_UNSTRUCT) - list(APPEND switches "IC0" "PDLIB" "METIS") -else() -### list(APPEND switches "IC4" "OMPG" "OMPH") - list(APPEND switches "IC0") endif() -#------------------------- -# Include list of src files to make file more readable -# defines variables "ftn_src", "nuopc_mesh_cap_src", "pdlib_src", "scrip_src", and "scripnc_src" -#------------------------- -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/src_list.cmake) +if(NetCDF_Fortran_FOUND) + target_sources(ww3_lib PRIVATE w3ounfmetamd.F90) + if(TARGET NetCDF::NetCDF_Fortran) + # NetCDF library flags provided by compiler or wrapper script: don't add as dependency + target_link_libraries(ww3_lib PUBLIC NetCDF::NetCDF_Fortran) + endif() + list(APPEND programs ${netcdf_programs}) +endif() -list(APPEND ftn_src ${nuopc_mesh_cap_src}) +if(UFS_CAP) + # Don't search for ESMF if target already exists (when build WW3 as UFS submodule) + if (NOT TARGET esmf) + find_package(ESMF MODULE REQUIRED) + endif() + + if(UFS_CAP STREQUAL "MULTI_ESMF") + set(cap_src ${esmf_multi_cap_src}) + elseif(UFS_CAP STREQUAL "NUOPC_MESH") + set(cap_src ${nuopc_mesh_cap_src}) + endif() + + target_sources(ww3_lib PRIVATE ${cap_src}) + target_link_libraries(ww3_lib PUBLIC esmf) + # Don't build executables when building WW3 ESMF library + set(programs "") +endif() + +set_property(SOURCE w3initmd.F90 + APPEND + PROPERTY COMPILE_DEFINITIONS + "__WW3_SWITCHES__=\'${switch_strings}\'" + ) + +if("OMPG" IN_LIST switches) + find_package(OpenMP REQUIRED COMPONENTS Fortran) + target_link_libraries(ww3_lib PUBLIC OpenMP::OpenMP_Fortran) +endif() + +if("MPI" IN_LIST switches) + find_package(MPI REQUIRED COMPONENTS Fortran) + target_link_libraries(ww3_lib PUBLIC MPI::MPI_Fortran) +endif() # Handle PDLIB, SCRIP, SCRIPNC build files directly instead of through configuration file if("PDLIB" IN_LIST switches) - list(APPEND ftn_src ${pdlib_src}) if("SCOTCH" IN_LIST switches) - #find_package(SCOTCH REQUIRED) - #target_link_libraries(ww3_lib PUBLIC PTSCOTCHparmetis::PTSCOTCHparmetis) - elseif("METIS" IN_LIST switches) - #find_package(ParMETIS REQUIRED) - #target_link_libraries(ww3_lib PUBLIC ParMETIS::ParMETIS) + find_package(SCOTCH REQUIRED) + target_sources(ww3_lib PRIVATE ${pdlib_src}) + target_link_libraries(ww3_lib PUBLIC PTSCOTCHparmetis::PTSCOTCHparmetis) +elseif("METIS" IN_LIST switches) + find_package(ParMETIS REQUIRED) + target_sources(ww3_lib PRIVATE ${pdlib_src}) + target_link_libraries(ww3_lib PUBLIC ParMETIS::ParMETIS) else() - message(FATAL_ERROR "PDLIB requires METIS or SCOTCH library for domain decomposition") - endif() + message(FATAL_ERROR "PDLIB requires METIS or SCOTCH library for domain decomposition") + endif() +endif() + +if("SCRIP" IN_LIST switches) + target_sources(ww3_lib PRIVATE ${scrip_src}) endif() -#------------------------- -# Determine switch specific files -# Include check_switches as a function for less verbosity in this CMakeLists.txt -#------------------------- -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/check_switches.cmake) -check_switches("${switches}" switch_files) -message(STATUS "----status of source files-----") -message(STATUS "list of always source files is : ${ftn_src}") -message(STATUS "list of switch files is : ${switch_files}") - -#------------------------- -# Now check in SourceMods to see if the file should be used instead -#------------------------- -list(APPEND srcfiles ${ftn_src} ${switch_files}) -foreach(file ${srcfiles} ) - if(EXISTS "${CASEROOT}/SourceMods/src.ww3dev/${file}") - message("Using ${file} from ${CASEROOT}/SourceMods/src.ww3dev") - list(REMOVE_ITEM srcfiles ${file}) - list(APPEND srcfiles "${CASEROOT}/SourceMods/src.ww3dev/${file}") - message(STATUS "Using ${file} from ${CASEROOT}/SourceMods/src.ww3dev") +if("SCRIPNC" IN_LIST switches OR "OASIS" IN_LIST switches OR "TRKNC" IN_LIST switches) + if(NOT NetCDF_Fortran_FOUND) + message(FATAL_ERROR "Cannot build SCRIPNC, OASIS, or TRKNC without NetCDF") endif() -endforeach() +endif() -#------------------------- -# Determine target library wav -#------------------------- -add_library(wav ${srcfiles}) -target_include_directories (wav PRIVATE ${ESMF_F90COMPILEPATHS}) +if("SCRIPNC" IN_LIST switches) + target_sources(ww3_lib PRIVATE ${scrip_src} ${scripnc_src}) +endif() -#------------------------- -# Determine compile definitions for wav -#------------------------- -foreach(switch ${switches}) - target_compile_definitions(wav PUBLIC W3_${switch}) +if("NCEP2" IN_LIST switches) + find_package(g2 REQUIRED) + find_package(bacio REQUIRED) + find_package(w3emc REQUIRED) + target_link_libraries(ww3_lib PUBLIC g2::g2_4 bacio::bacio_4 w3emc::w3emc_4) +endif() + +if("TIDE" IN_LIST switches) + list(APPEND programs ww3_prtide) +endif() + +# Executables are not needed when building ww3_multi_esmf library +foreach(program ${programs}) + add_executable(${program} ${program}.F90) + target_link_libraries(${program} PRIVATE ww3_lib) endforeach() -add_compile_definitions(ENDIANNESS="big_endian") -set_property(SOURCE w3initmd.F90 - APPEND - PROPERTY COMPILE_DEFINITIONS - "__WW3_SWITCHES__=\'\'" + +install( + TARGETS ${programs} ww3_lib + EXPORT WW3Exports + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(FILES ${CMAKE_BINARY_DIR}/switch DESTINATION ${CMAKE_INSTALL_PREFIX}) +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod DESTINATION ${CMAKE_INSTALL_PREFIX}) + + +export(EXPORT WW3Exports + NAMESPACE WW3:: + FILE WW3-targets.cmake ) -message("CMAKE_CURRENT_BINARY_DIR is ${CMAKE_CURRENT_BINARY_DIR}") -message("PROJECT_BINARY_DIR is ${PROJECT_BINARY_DIR}") +### Package config +include(CMakePackageConfigHelpers) +set(CONFIG_INSTALL_DESTINATION lib/cmake/WW3) -# Executables to always build -add_executable(ww3_grid ww3_grid.F90) -target_link_libraries(ww3_grid PRIVATE wav) +configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/WW3-package-config.cmake.in + ${CMAKE_BINARY_DIR}/WW3-config.cmake + INSTALL_DESTINATION ${CONFIG_INSTALL_DESTINATION}) + +install(FILES ${CMAKE_BINARY_DIR}/WW3-config.cmake + DESTINATION ${CONFIG_INSTALL_DESTINATION}) + +write_basic_package_version_file(${CMAKE_BINARY_DIR}/WW3-config-version.cmake + VERSION ${PROJECT_VERSION} + COMPATIBILITY AnyNewerVersion) + +install(FILES ${CMAKE_BINARY_DIR}/WW3-config-version.cmake + DESTINATION ${CONFIG_INSTALL_DESTINATION}) -install(TARGETS wav) +install(EXPORT WW3Exports + NAMESPACE WW3:: + FILE WW3-targets.cmake + DESTINATION ${CONFIG_INSTALL_DESTINATION}) From e8f1d7eb3427e01bdddb9a100b55072cb74a9366 Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Fri, 18 Aug 2023 16:28:56 -0600 Subject: [PATCH 05/63] add ww3_tp2.22 for testing Langmuir Mixing Parameterization --- regtests/ww3_tp2.22/info | 54 ++++++++ regtests/ww3_tp2.22/input/2-D.depth | 1 + regtests/ww3_tp2.22/input/gx_outf.inp | 11 ++ regtests/ww3_tp2.22/input/map2_2.gs | 126 ++++++++++++++++++ regtests/ww3_tp2.22/input/namelists_2-D.nml | 4 + .../ww3_tp2.22/input/namelists_nocmpr.nml | 5 + regtests/ww3_tp2.22/input/nocmpr.depth | 1 + regtests/ww3_tp2.22/input/points.list | 3 + regtests/ww3_tp2.22/input/switch | 1 + regtests/ww3_tp2.22/input/switch_PR1 | 1 + regtests/ww3_tp2.22/input/switch_PR1_MPI | 1 + regtests/ww3_tp2.22/input/switch_PR2_UNO | 1 + regtests/ww3_tp2.22/input/switch_PR2_UNO_MPI | 1 + regtests/ww3_tp2.22/input/switch_PR2_UQ | 1 + regtests/ww3_tp2.22/input/switch_PR2_UQ_MPI | 1 + .../ww3_tp2.22/input/switch_PR2_UQ_NC4_MPI | 1 + regtests/ww3_tp2.22/input/switch_PR3_UNO | 1 + regtests/ww3_tp2.22/input/switch_PR3_UNO_MPI | 1 + regtests/ww3_tp2.22/input/switch_PR3_UQ | 1 + regtests/ww3_tp2.22/input/switch_PR3_UQ_MPI | 1 + regtests/ww3_tp2.22/input/track_i.ww3 | 6 + regtests/ww3_tp2.22/input/ww3_grid.inp | 35 +++++ regtests/ww3_tp2.22/input/ww3_grid.nml | 83 ++++++++++++ regtests/ww3_tp2.22/input/ww3_grid_nocmpr.inp | 35 +++++ regtests/ww3_tp2.22/input/ww3_grid_nocmpr.nml | 83 ++++++++++++ regtests/ww3_tp2.22/input/ww3_multi.inp | 31 +++++ regtests/ww3_tp2.22/input/ww3_multi.nml | 57 ++++++++ regtests/ww3_tp2.22/input/ww3_ounf.inp | 43 ++++++ regtests/ww3_tp2.22/input/ww3_ounf.nml | 27 ++++ regtests/ww3_tp2.22/input/ww3_ounp.inp | 119 +++++++++++++++++ regtests/ww3_tp2.22/input/ww3_ounp.nml | 46 +++++++ regtests/ww3_tp2.22/input/ww3_outf.inp | 10 ++ regtests/ww3_tp2.22/input/ww3_outp_spec.inp | 11 ++ regtests/ww3_tp2.22/input/ww3_outp_tab51.inp | 10 ++ regtests/ww3_tp2.22/input/ww3_outp_tab52.inp | 10 ++ regtests/ww3_tp2.22/input/ww3_outp_tab53.inp | 10 ++ regtests/ww3_tp2.22/input/ww3_shel.inp | 42 ++++++ regtests/ww3_tp2.22/input/ww3_shel.nml | 72 ++++++++++ regtests/ww3_tp2.22/input/ww3_strt.inp | 5 + regtests/ww3_tp2.22/input/ww3_trck.inp | 11 ++ regtests/ww3_tp2.22/input/ww3_trnc.inp | 20 +++ regtests/ww3_tp2.22/input/ww3_trnc.nml | 21 +++ 42 files changed, 1004 insertions(+) create mode 100644 regtests/ww3_tp2.22/info create mode 100644 regtests/ww3_tp2.22/input/2-D.depth create mode 100644 regtests/ww3_tp2.22/input/gx_outf.inp create mode 100644 regtests/ww3_tp2.22/input/map2_2.gs create mode 100644 regtests/ww3_tp2.22/input/namelists_2-D.nml create mode 100644 regtests/ww3_tp2.22/input/namelists_nocmpr.nml create mode 100644 regtests/ww3_tp2.22/input/nocmpr.depth create mode 100644 regtests/ww3_tp2.22/input/points.list create mode 100644 regtests/ww3_tp2.22/input/switch create mode 100644 regtests/ww3_tp2.22/input/switch_PR1 create mode 100644 regtests/ww3_tp2.22/input/switch_PR1_MPI create mode 100644 regtests/ww3_tp2.22/input/switch_PR2_UNO create mode 100644 regtests/ww3_tp2.22/input/switch_PR2_UNO_MPI create mode 100644 regtests/ww3_tp2.22/input/switch_PR2_UQ create mode 100644 regtests/ww3_tp2.22/input/switch_PR2_UQ_MPI create mode 100644 regtests/ww3_tp2.22/input/switch_PR2_UQ_NC4_MPI create mode 100644 regtests/ww3_tp2.22/input/switch_PR3_UNO create mode 100644 regtests/ww3_tp2.22/input/switch_PR3_UNO_MPI create mode 100644 regtests/ww3_tp2.22/input/switch_PR3_UQ create mode 100644 regtests/ww3_tp2.22/input/switch_PR3_UQ_MPI create mode 100644 regtests/ww3_tp2.22/input/track_i.ww3 create mode 100644 regtests/ww3_tp2.22/input/ww3_grid.inp create mode 100644 regtests/ww3_tp2.22/input/ww3_grid.nml create mode 100644 regtests/ww3_tp2.22/input/ww3_grid_nocmpr.inp create mode 100644 regtests/ww3_tp2.22/input/ww3_grid_nocmpr.nml create mode 100644 regtests/ww3_tp2.22/input/ww3_multi.inp create mode 100644 regtests/ww3_tp2.22/input/ww3_multi.nml create mode 100644 regtests/ww3_tp2.22/input/ww3_ounf.inp create mode 100644 regtests/ww3_tp2.22/input/ww3_ounf.nml create mode 100644 regtests/ww3_tp2.22/input/ww3_ounp.inp create mode 100644 regtests/ww3_tp2.22/input/ww3_ounp.nml create mode 100644 regtests/ww3_tp2.22/input/ww3_outf.inp create mode 100644 regtests/ww3_tp2.22/input/ww3_outp_spec.inp create mode 100644 regtests/ww3_tp2.22/input/ww3_outp_tab51.inp create mode 100644 regtests/ww3_tp2.22/input/ww3_outp_tab52.inp create mode 100644 regtests/ww3_tp2.22/input/ww3_outp_tab53.inp create mode 100644 regtests/ww3_tp2.22/input/ww3_shel.inp create mode 100644 regtests/ww3_tp2.22/input/ww3_shel.nml create mode 100644 regtests/ww3_tp2.22/input/ww3_strt.inp create mode 100755 regtests/ww3_tp2.22/input/ww3_trck.inp create mode 100755 regtests/ww3_tp2.22/input/ww3_trnc.inp create mode 100644 regtests/ww3_tp2.22/input/ww3_trnc.nml diff --git a/regtests/ww3_tp2.22/info b/regtests/ww3_tp2.22/info new file mode 100644 index 000000000..65b314a65 --- /dev/null +++ b/regtests/ww3_tp2.22/info @@ -0,0 +1,54 @@ +############################################################################# +# # +# ww3_tp2.22 Test script for WW-III, two-dimensional propagation and LMP # +# Propagation over half the globe. # +# Langmuir Mixing Parameterization # +# # +# Model should be compiled with the switches : # +# # +# !/LN0 !/ST0 !/NL0 !/BT0 !/DB0 !/TR0 !/BS0 # +# Select the 'no source terms' option. # +# !/PRn Selecting one of the propagation schemes. # +# 1: First order. # +# 2: UQ with diffusion term. # +# 3: UQ with averaging (set to zero here). # +# !/WNX1 !/WNT1 !/CRX1 !/CRT1 Wind and current interpolation. # +# !/O0 !/O1 !/O2 !/O3 !/O4 !/O5 !/O6 !/O7 Sdt out output options. # +# # +# Remarks : # +# - Test case input (default): # +# * Single grid, but run using ww3_multi. # +# * ww3_grid.inp : (default) # +# + Spatial grid: 193 x 93 rectilinear lat/lon grid # +# - dx = 1.0 deg, dy = 1.0 deg # +# - Xrange = -6:186 deg, Yrange = -46:46 deg # +# + Spectral grid: ntheta = 24, nf = 3, f1 = 0.03679, fgamma = 1.1 # +# * map2_2.gs: grads script for visualizing results. # +# * GSE correction is enabled. To disable GSE correction # +# comment/uncomment the appropriate lines in ww3_grid.inp. # +# * switch options (mostly self-explanatory). # +# + switch_PR1 : First order scheme # +# + switch_PR2_UNO : UQ scheme with diffusion # +# + switch_PR2_UQ : UQ scheme with diffusion # +# + switch_PR3_UNO : UQ scheme with averaging (default) # +# + switch_PR3_UQ : UQ scheme with averaging (default) # +# + switch_PR1_MPI # +# + switch_PR2_UNO_MPI # +# + switch_PR2_UQ_MPI # +# + switch_PR3_UNO_MPI # +# + switch_PR3_UQ_MPI # +# # +# Sample run_test commands : # +# (Note: mpirun commands differ by local system) # +# ./bin/run_test -s PR1 ../model ww3_tp2.22 # +# ./bin/run_test -n 3 -p mpirun -f -s PR1_MPI ../model ww3_tp2.22 # +# # +# Hendrik Tolman, Jun 2002 # +# Last Mod : Dec 2013 # +# # +# Copyright 2009-2013 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. # +# # +############################################################################# diff --git a/regtests/ww3_tp2.22/input/2-D.depth b/regtests/ww3_tp2.22/input/2-D.depth new file mode 100644 index 000000000..e3dcb6b06 --- /dev/null +++ b/regtests/ww3_tp2.22/input/2-D.depth @@ -0,0 +1 @@ +17949*1 diff --git a/regtests/ww3_tp2.22/input/gx_outf.inp b/regtests/ww3_tp2.22/input/gx_outf.inp new file mode 100644 index 000000000..770759ae9 --- /dev/null +++ b/regtests/ww3_tp2.22/input/gx_outf.inp @@ -0,0 +1,11 @@ +$ WAVEWATCH III Grid output post-processing (GrADS) +$ ------------------------------------------------- + 19680606 000000 43200. 25 +$ + F F F F F T F F T F F F F F F F F F F F F F F F F F F F F F F F +$ + N + HS T01 DIR SPR +$ + 1 193 1 93 T T + diff --git a/regtests/ww3_tp2.22/input/map2_2.gs b/regtests/ww3_tp2.22/input/map2_2.gs new file mode 100644 index 000000000..d0a6e23b4 --- /dev/null +++ b/regtests/ww3_tp2.22/input/map2_2.gs @@ -0,0 +1,126 @@ +* +* map2_2.gs : GrADS wave heigt and mean direction for ww3_tp2.2 +* ---------------------------------------------------------------- +* Data set with multiple times expected. +* Input from ww3.ctl ww3.grads +* Scripts used : +* colorset.gs : Sets up shading colors +* +* General set up + + 'set display color white' + 'clear' + 'run colorset.gs' + + gdate="yyyy/mm/dd" + '!date -u "+%Y/%m/%d" > tmp_grads_gdate' + result = read (tmp_grads_gdate) + gdate = sublin(result,2) + '!rm -f tmp_grads_gdate' + +* Get the data, loop through times ... + + 'open ww3' + +t = 1 +while ( t <= 13 ) + + 'set t ' t + + 'query time' + gradsdate = subwrd(result,3) + test = substr ( gradsdate, 3, 1 ) + if ( test='Z' ) + year = substr ( gradsdate, 9, 4 ) + mnth = substr ( gradsdate, 6, 3 ) + day = substr ( gradsdate, 4, 2 ) + hour = substr ( gradsdate, 1, 2 ) + min = '00' + else + year = substr ( gradsdate, 12, 4 ) + mnth = substr ( gradsdate, 9, 3 ) + day = substr ( gradsdate, 7, 2 ) + hour = substr ( gradsdate, 1, 2 ) + min = substr ( gradsdate, 4, 2 ) + endif + + month= '??' + if (mnth='JAN'); month= '01'; endif; + if (mnth='FEB'); month= '02'; endif; + if (mnth='MAR'); month= '03'; endif; + if (mnth='APR'); month= '04'; endif; + if (mnth='MAY'); month= '05'; endif; + if (mnth='JUN'); month= '06'; endif; + if (mnth='JUL'); month= '07'; endif; + if (mnth='AUG'); month= '08'; endif; + if (mnth='SEP'); month= '09'; endif; + if (mnth='OCT'); month= '10'; endif; + if (mnth='NOV'); month= '11'; endif; + if (mnth='DEC'); month= '12'; endif; + + vdate = year '/' month '/' day ' ' hour ':' min 'z' + +* Basic plot set up + + 'set grads off' + 'set lon -5 185' + 'set lat -45 45' + 'set xlint 10' + 'set ylint 10' + 'set grid on 3 60' + 'set mpdraw off' + +* 'set parea 1. 7.5 2.5 9.' + 'set mproj latlon' + +* Land sea and ice map + + 'set gxout grfill' + 'set clevs -0.5 0.5' + 'set ccols 63 62 0' + 'd map' + +* Plot wave heights + + 'set gxout shaded' + 'set clevs 0.05 0.1 0.15 0.2 0.25 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.25 1.5 2. 3' + 'set ccols 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38' + 'd hs' + 'run cbarn' + +* Plot mean directions + + 'set gxout vector' + 'set cthick 3' + 'set arrscl 0.25' + 'set arrlab off' + 'set ccolor 0' + 'd skip(cos(dir),5);skip(sin(dir),5)' + +* Text around plot + + 'set strsiz 0.18' + 'set string 1 c 5' + 'draw string 5.5 7.7 WAVEWATCH III TEST' + + 'set strsiz 0.12' + 'set string 1 l' + 'draw string 0.5 7.3 Propagation test ww3_tp2.2' + 'set string 1 r' + 'draw string 10.5 7.3 valid ' vdate + 'set string 1 c' + 'draw string 5.5 1.0 wave height (shaded, m) and mean direction (vector, not scaled)' + 'draw string 5.5 7.3 plot generated ' gdate + +* Print this page and clear + + 'printim map2_2_'t'.png' + 'clear' + 'set grads off' + + t = t + 1 +endwhile + +'quit' + +* end of map2_2.gs diff --git a/regtests/ww3_tp2.22/input/namelists_2-D.nml b/regtests/ww3_tp2.22/input/namelists_2-D.nml new file mode 100644 index 000000000..8abfad12c --- /dev/null +++ b/regtests/ww3_tp2.22/input/namelists_2-D.nml @@ -0,0 +1,4 @@ +&PRO2 DTIME = 345600. / +&PRO3 WDTHCG = 1.50, WDTHTH =1.50 / +&OUTS E3D = 1 / +END OF NAMELISTS diff --git a/regtests/ww3_tp2.22/input/namelists_nocmpr.nml b/regtests/ww3_tp2.22/input/namelists_nocmpr.nml new file mode 100644 index 000000000..9545826d2 --- /dev/null +++ b/regtests/ww3_tp2.22/input/namelists_nocmpr.nml @@ -0,0 +1,5 @@ +&PRO2 DTIME = 345600. / +&PRO3 WDTHCG = 1.50, WDTHTH =1.50 / +&OUTS E3D = 1 / +&MISC TRCKCMPR = F / +END OF NAMELISTS diff --git a/regtests/ww3_tp2.22/input/nocmpr.depth b/regtests/ww3_tp2.22/input/nocmpr.depth new file mode 100644 index 000000000..e3dcb6b06 --- /dev/null +++ b/regtests/ww3_tp2.22/input/nocmpr.depth @@ -0,0 +1 @@ +17949*1 diff --git a/regtests/ww3_tp2.22/input/points.list b/regtests/ww3_tp2.22/input/points.list new file mode 100644 index 000000000..30197c2ef --- /dev/null +++ b/regtests/ww3_tp2.22/input/points.list @@ -0,0 +1,3 @@ +0.0 0.0 'LEFT' +90.0 0.0 'CENTER' +180.0 0.0 'RIGHT' diff --git a/regtests/ww3_tp2.22/input/switch b/regtests/ww3_tp2.22/input/switch new file mode 100644 index 000000000..9a795bd35 --- /dev/null +++ b/regtests/ww3_tp2.22/input/switch @@ -0,0 +1 @@ +NOGRB SHRD PR3 UQ FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR1 b/regtests/ww3_tp2.22/input/switch_PR1 new file mode 100644 index 000000000..ca2e4ceb1 --- /dev/null +++ b/regtests/ww3_tp2.22/input/switch_PR1 @@ -0,0 +1 @@ +NOGRB SHRD PR1 FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR1_MPI b/regtests/ww3_tp2.22/input/switch_PR1_MPI new file mode 100644 index 000000000..bc7a812fe --- /dev/null +++ b/regtests/ww3_tp2.22/input/switch_PR1_MPI @@ -0,0 +1 @@ +NOGRB DIST MPI PR1 FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR2_UNO b/regtests/ww3_tp2.22/input/switch_PR2_UNO new file mode 100644 index 000000000..69bb8a2f8 --- /dev/null +++ b/regtests/ww3_tp2.22/input/switch_PR2_UNO @@ -0,0 +1 @@ +NOGRB SHRD PR2 UNO FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR2_UNO_MPI b/regtests/ww3_tp2.22/input/switch_PR2_UNO_MPI new file mode 100644 index 000000000..489a84f90 --- /dev/null +++ b/regtests/ww3_tp2.22/input/switch_PR2_UNO_MPI @@ -0,0 +1 @@ +NOGRB DIST MPI PR2 UNO FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR2_UQ b/regtests/ww3_tp2.22/input/switch_PR2_UQ new file mode 100644 index 000000000..ebf7cf190 --- /dev/null +++ b/regtests/ww3_tp2.22/input/switch_PR2_UQ @@ -0,0 +1 @@ +NOGRB SHRD PR2 UQ FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR2_UQ_MPI b/regtests/ww3_tp2.22/input/switch_PR2_UQ_MPI new file mode 100644 index 000000000..32cfed954 --- /dev/null +++ b/regtests/ww3_tp2.22/input/switch_PR2_UQ_MPI @@ -0,0 +1 @@ +NOGRB DIST MPI PR2 UQ FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR2_UQ_NC4_MPI b/regtests/ww3_tp2.22/input/switch_PR2_UQ_NC4_MPI new file mode 100644 index 000000000..32cfed954 --- /dev/null +++ b/regtests/ww3_tp2.22/input/switch_PR2_UQ_NC4_MPI @@ -0,0 +1 @@ +NOGRB DIST MPI PR2 UQ FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR3_UNO b/regtests/ww3_tp2.22/input/switch_PR3_UNO new file mode 100644 index 000000000..8baffa623 --- /dev/null +++ b/regtests/ww3_tp2.22/input/switch_PR3_UNO @@ -0,0 +1 @@ +NOGRB SHRD PR3 UNO FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR3_UNO_MPI b/regtests/ww3_tp2.22/input/switch_PR3_UNO_MPI new file mode 100644 index 000000000..35ca7863d --- /dev/null +++ b/regtests/ww3_tp2.22/input/switch_PR3_UNO_MPI @@ -0,0 +1 @@ +NOGRB DIST MPI PR3 UNO FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR3_UQ b/regtests/ww3_tp2.22/input/switch_PR3_UQ new file mode 100644 index 000000000..9a795bd35 --- /dev/null +++ b/regtests/ww3_tp2.22/input/switch_PR3_UQ @@ -0,0 +1 @@ +NOGRB SHRD PR3 UQ FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR3_UQ_MPI b/regtests/ww3_tp2.22/input/switch_PR3_UQ_MPI new file mode 100644 index 000000000..0f07d4935 --- /dev/null +++ b/regtests/ww3_tp2.22/input/switch_PR3_UQ_MPI @@ -0,0 +1 @@ +NOGRB DIST MPI PR3 UQ FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/track_i.ww3 b/regtests/ww3_tp2.22/input/track_i.ww3 new file mode 100644 index 000000000..ae2154a44 --- /dev/null +++ b/regtests/ww3_tp2.22/input/track_i.ww3 @@ -0,0 +1,6 @@ +WAVEWATCH III TRACK LOCATIONS DATA +19680606 000000 0 0 S1A +19680606 040000 1 0 S1B +19680606 060000 1 0 S1C +19680606 080000 2 0 S1D +19680606 120000 0.5 0 S1E diff --git a/regtests/ww3_tp2.22/input/ww3_grid.inp b/regtests/ww3_tp2.22/input/ww3_grid.inp new file mode 100644 index 000000000..aec6060e9 --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_grid.inp @@ -0,0 +1,35 @@ +$ WAVEWATCH III Grid preprocessor input file +$ ------------------------------------------ + '2-D PROPAGATION AROUND GLOBE ' +$ + 1.1 0.040 9 24 0. +$ + F T T T F F + 2200. 2200. 2200. 2200. +$ +$ &PRO2 DTIME = 0. / + &PRO2 DTIME = 345600. / +$ &PRO3 WDTHCG = 0., WDTHTH = 0. / + &PRO3 WDTHCG = 1.50, WDTHTH =1.50 / + &OUTS E3D = 1 / + &LMPN LMPENABLED = T, SDTAIL = T, HSLMODE = 0 / +END OF NAMELISTS +$ + 'RECT' T 'NONE' + 193 93 + 1. 1. 1. + -6. -46. 1. +$ + -5. 5.75 10 -2500. 2 1 '(....)' 'UNIT' 'input' +$ + 17949*1 +$ + 10 1 1 '(....)' 'PART' 'input' +$ + 0 0 F + 0 0 F + 0 0 +$ + 0. -40. 0.5 0.866 100 + 0. 40. 0.5 -0.866 -100 + 0. 0. 0. 0. 0 diff --git a/regtests/ww3_tp2.22/input/ww3_grid.nml b/regtests/ww3_tp2.22/input/ww3_grid.nml new file mode 100644 index 000000000..2a10b4424 --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_grid.nml @@ -0,0 +1,83 @@ +! -------------------------------------------------------------------- ! +! WAVEWATCH III - ww3_grid.nml - Grid pre-processing ! +! -------------------------------------------------------------------- ! + +! -------------------------------------------------------------------- ! +! Define the spectrum parameterization via SPECTRUM_NML namelist +! -------------------------------------------------------------------- ! +&SPECTRUM_NML + SPECTRUM%XFR = 1.1 + SPECTRUM%FREQ1 = 0.040 + SPECTRUM%NK = 9 + SPECTRUM%NTH = 24 +/ + +! -------------------------------------------------------------------- ! +! Define the run parameterization via RUN_NML namelist +! -------------------------------------------------------------------- ! +&RUN_NML + RUN%FLCX = T + RUN%FLCY = T + RUN%FLCTH = T +/ + +! -------------------------------------------------------------------- ! +! Define the timesteps parameterization via TIMESTEPS_NML namelist +! -------------------------------------------------------------------- ! +&TIMESTEPS_NML + TIMESTEPS%DTMAX = 2200. + TIMESTEPS%DTXY = 2200. + TIMESTEPS%DTKTH = 2200. + TIMESTEPS%DTMIN = 2200. +/ + +! -------------------------------------------------------------------- ! +! Define the grid to preprocess via GRID_NML namelist +! -------------------------------------------------------------------- ! +&GRID_NML + GRID%NAME = '2-D PROPAGATION AROUND GLOBE' + GRID%NML = '../input/namelists_2-D.nml' + GRID%TYPE = 'RECT' + GRID%COORD = 'SPHE' + GRID%CLOS = 'NONE' + GRID%ZLIM = -5. + GRID%DMIN = 5.75 +/ + +! -------------------------------------------------------------------- ! +! Define the rectilinear grid type via RECT_NML namelist +! -------------------------------------------------------------------- ! +&RECT_NML + RECT%NX = 193 + RECT%NY = 93 + RECT%SX = 1. + RECT%SY = 1. + RECT%X0 = -6. + RECT%Y0 = -46. +/ + +! -------------------------------------------------------------------- ! +! Define the depth to preprocess via DEPTH_NML namelist +! -------------------------------------------------------------------- ! +&DEPTH_NML + DEPTH%SF = -2500. + DEPTH%FILENAME = '../input/2-D.depth' + DEPTH%IDLA = 2 +/ + +! -------------------------------------------------------------------- ! +! Define the output boundary points via OUTBND_COUNT_NML and +! OUTBND_LINE_NML namelist +! -------------------------------------------------------------------- ! +&OUTBND_COUNT_NML + OUTBND_COUNT%N_LINE = 2 +/ + +&OUTBND_LINE_NML + OUTBND_LINE(1) = 0. -40. 0.5 0.866 100 + OUTBND_LINE(2) = 0. 40. 0.5 -0.866 -100 +/ + +! -------------------------------------------------------------------- ! +! WAVEWATCH III - end of namelist ! +! -------------------------------------------------------------------- ! diff --git a/regtests/ww3_tp2.22/input/ww3_grid_nocmpr.inp b/regtests/ww3_tp2.22/input/ww3_grid_nocmpr.inp new file mode 100644 index 000000000..4936ff3f7 --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_grid_nocmpr.inp @@ -0,0 +1,35 @@ +$ WAVEWATCH III Grid preprocessor input file +$ ------------------------------------------ + '2-D PROPAGATION AROUND GLOBE ' +$ + 1.1 0.040 9 24 0. +$ + F T T T F F + 2200. 2200. 2200. 2200. +$ +$ &PRO2 DTIME = 0. / + &PRO2 DTIME = 345600. / +$ &PRO3 WDTHCG = 0., WDTHTH = 0. / + &PRO3 WDTHCG = 1.50, WDTHTH =1.50 / + &OUTS E3D = 1 / + &MISC TRCKCMPR = F / +END OF NAMELISTS +$ + 'RECT' T 'NONE' + 193 93 + 1. 1. 1. + -6. -46. 1. +$ + -5. 5.75 10 -2500. 2 1 '(....)' 'UNIT' 'input' +$ + 17949*1 +$ + 10 1 1 '(....)' 'PART' 'input' +$ + 0 0 F + 0 0 F + 0 0 +$ + 0. -40. 0.5 0.866 100 + 0. 40. 0.5 -0.866 -100 + 0. 0. 0. 0. 0 diff --git a/regtests/ww3_tp2.22/input/ww3_grid_nocmpr.nml b/regtests/ww3_tp2.22/input/ww3_grid_nocmpr.nml new file mode 100644 index 000000000..11c07ad3c --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_grid_nocmpr.nml @@ -0,0 +1,83 @@ +! -------------------------------------------------------------------- ! +! WAVEWATCH III - ww3_grid.nml - Grid pre-processing ! +! -------------------------------------------------------------------- ! + +! -------------------------------------------------------------------- ! +! Define the spectrum parameterization via SPECTRUM_NML namelist +! -------------------------------------------------------------------- ! +&SPECTRUM_NML + SPECTRUM%XFR = 1.1 + SPECTRUM%FREQ1 = 0.040 + SPECTRUM%NK = 9 + SPECTRUM%NTH = 24 +/ + +! -------------------------------------------------------------------- ! +! Define the run parameterization via RUN_NML namelist +! -------------------------------------------------------------------- ! +&RUN_NML + RUN%FLCX = T + RUN%FLCY = T + RUN%FLCTH = T +/ + +! -------------------------------------------------------------------- ! +! Define the timesteps parameterization via TIMESTEPS_NML namelist +! -------------------------------------------------------------------- ! +&TIMESTEPS_NML + TIMESTEPS%DTMAX = 2200. + TIMESTEPS%DTXY = 2200. + TIMESTEPS%DTKTH = 2200. + TIMESTEPS%DTMIN = 2200. +/ + +! -------------------------------------------------------------------- ! +! Define the grid to preprocess via GRID_NML namelist +! -------------------------------------------------------------------- ! +&GRID_NML + GRID%NAME = '2-D PROPAGATION AROUND GLOBE' + GRID%NML = '../input/namelists_nocmpr.nml' + GRID%TYPE = 'RECT' + GRID%COORD = 'SPHE' + GRID%CLOS = 'NONE' + GRID%ZLIM = -5. + GRID%DMIN = 5.75 +/ + +! -------------------------------------------------------------------- ! +! Define the rectilinear grid type via RECT_NML namelist +! -------------------------------------------------------------------- ! +&RECT_NML + RECT%NX = 193 + RECT%NY = 93 + RECT%SX = 1. + RECT%SY = 1. + RECT%X0 = -6. + RECT%Y0 = -46. +/ + +! -------------------------------------------------------------------- ! +! Define the depth to preprocess via DEPTH_NML namelist +! -------------------------------------------------------------------- ! +&DEPTH_NML + DEPTH%SF = -2500. + DEPTH%FILENAME = '../input/nocmpr.depth' + DEPTH%IDLA = 2 +/ + +! -------------------------------------------------------------------- ! +! Define the output boundary points via OUTBND_COUNT_NML and +! OUTBND_LINE_NML namelist +! -------------------------------------------------------------------- ! +&OUTBND_COUNT_NML + OUTBND_COUNT%N_LINE = 2 +/ + +&OUTBND_LINE_NML + OUTBND_LINE(1) = 0. -40. 0.5 0.866 100 + OUTBND_LINE(2) = 0. 40. 0.5 -0.866 -100 +/ + +! -------------------------------------------------------------------- ! +! WAVEWATCH III - end of namelist ! +! -------------------------------------------------------------------- ! diff --git a/regtests/ww3_tp2.22/input/ww3_multi.inp b/regtests/ww3_tp2.22/input/ww3_multi.inp new file mode 100644 index 000000000..4d5d699e6 --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_multi.inp @@ -0,0 +1,31 @@ +$ WAVEWATCH III multi-scale input file +$ ------------------------------ + 1 0 F 1 F F +$ + 'ww3' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 1 1 0.00 1.00 F +$ + 19680606 000000 19680618 000000 +$ + T T +$ + 19680606 000000 86400 19680618 000000 +$ + N + HS T0M1 DIR SPR +$ + 19680606 000000 21600 19680618 000000 + 0.0 0.0 'LEFT' + 90.0 0.0 'CENTER' + 180.0 0.0 'RIGHT' + 0.0 0.0 'STOPSTRING' + 19680606 000000 3600 19680618 000000 + T + 19680612 000000 0 19680612 000000 + 19680606 000000 3600 19680618 000000 + 19680612 000000 0 19680612 000000 +$ + 'the_end' 0 +$ + 'STP' +$ +$ End of input file diff --git a/regtests/ww3_tp2.22/input/ww3_multi.nml b/regtests/ww3_tp2.22/input/ww3_multi.nml new file mode 100644 index 000000000..95c0f379c --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_multi.nml @@ -0,0 +1,57 @@ +! -------------------------------------------------------------------- ! +! WAVEWATCH III ww3_multi.nml - multi-grid model ! +! -------------------------------------------------------------------- ! + + +! -------------------------------------------------------------------- ! +! Define top-level model parameters via DOMAIN_NML namelist +! -------------------------------------------------------------------- ! +&DOMAIN_NML + DOMAIN%FLGHG1 = T + DOMAIN%FLGHG2 = T + DOMAIN%STOP = '19680618 000000' +/ + +! -------------------------------------------------------------------- ! +! Define each input grid via the INPUT_GRID_NML namelist +! -------------------------------------------------------------------- ! +&INPUT_GRID_NML +/ + +! -------------------------------------------------------------------- ! +! Define each model grid via the MODEL_GRID_NML namelist +! -------------------------------------------------------------------- ! +&MODEL_GRID_NML + MODEL(1)%NAME = 'ww3' +/ + +! -------------------------------------------------------------------- ! +! Define the output types point parameters via OUTPUT_TYPE_NML namelist +! -------------------------------------------------------------------- ! +&OUTPUT_TYPE_NML + ALLTYPE%FIELD%LIST = 'HS T0M1 DIR SPR' + ALLTYPE%POINT%FILE = '../input/points.list' +/ + +! -------------------------------------------------------------------- ! +! Define output dates via OUTPUT_DATE_NML namelist +! -------------------------------------------------------------------- ! +&OUTPUT_DATE_NML + ALLDATE%FIELD = '19680606 000000' '86400' '19680618 000000' + ALLDATE%POINT = '19680606 000000' '21600' '19680618 000000' + ALLDATE%TRACK = '19680606 000000' '3600' '19680618 000000' + ALLDATE%BOUNDARY = '19680606 000000' '3600' '19680618 000000' +/ + +! -------------------------------------------------------------------- ! +! Define homogeneous input via HOMOG_COUNT_NML and HOMOG_INPUT_NML namelist +! -------------------------------------------------------------------- ! +&HOMOG_COUNT_NML +/ + +&HOMOG_INPUT_NML +/ + +! -------------------------------------------------------------------- ! +! WAVEWATCH III - end of namelist ! +! -------------------------------------------------------------------- ! diff --git a/regtests/ww3_tp2.22/input/ww3_ounf.inp b/regtests/ww3_tp2.22/input/ww3_ounf.inp new file mode 100644 index 000000000..1d901574c --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_ounf.inp @@ -0,0 +1,43 @@ +$ -------------------------------------------------------------------- $ +$ WAVEWATCH III Grid output post-processing $ +$--------------------------------------------------------------------- $ +$ First output time (yyyymmdd hhmmss), increment of output (s), +$ and number of output times. +$ + 19680606 000000 10800. 100 +$ +$ Fields requested --------------------------------------------------- $ +$ +$ Output request flags identifying fields as in ww3_shel.inp. See that +$ file for a full documentation of field output options. Namelist type +$ selection is used here (for alternative F/T flags, see ww3_shel.inp). +$ + N + HS T01 DIR SPR +$ +$--------------------------------------------------------------------- $ +$ netCDF version [3,4] +$ and variable type 4 [2 = SHORT, 3 = it depends , 4 = REAL] +$ swell partitions [0 1 2 3 4 5] +$ variables in same file [T] or not [F] +$ + 3 4 + 0 1 2 + T +$ +$ -------------------------------------------------------------------- $ +$ File prefix +$ number of characters in date [0(nodate),4(yearly),6(monthly),8(daily),10(hourly)] +$ IX and IY ranges [regular:IX NX IY NY, unstructured:IP NP 1 1] +$ + ww3. + 6 + 1 100000 1 100000 +$ +$ For each field and time a new file is generated with the file name +$ ww3.date_xxx.nc , where date is a conventional time indicator with S3 +$ characters, and xxx is a field identifier. +$ +$ -------------------------------------------------------------------- $ +$ End of input file $ +$ -------------------------------------------------------------------- $ diff --git a/regtests/ww3_tp2.22/input/ww3_ounf.nml b/regtests/ww3_tp2.22/input/ww3_ounf.nml new file mode 100644 index 000000000..44db63521 --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_ounf.nml @@ -0,0 +1,27 @@ +! -------------------------------------------------------------------- ! +! WAVEWATCH III ww3_ounf.nml - Grid output post-processing ! +! -------------------------------------------------------------------- ! + +! -------------------------------------------------------------------- ! +! Define the output fields to postprocess via FIELD_NML namelist +! -------------------------------------------------------------------- ! +&FIELD_NML + FIELD%TIMESTART = '19680606 000000' + FIELD%TIMESTRIDE = '10800.' + FIELD%TIMECOUNT = '100' + FIELD%LIST = 'HS T01 DIR SPR' + FIELD%PARTITION = '0 1 2' + FIELD%TYPE = 4 +/ + +! -------------------------------------------------------------------- ! +! Define the content of the output file via FILE_NML namelist +! -------------------------------------------------------------------- ! +&FILE_NML + FILE%IXN = 100000 + FILE%IYN = 100000 +/ + +! -------------------------------------------------------------------- ! +! WAVEWATCH III - end of namelist ! +! -------------------------------------------------------------------- ! diff --git a/regtests/ww3_tp2.22/input/ww3_ounp.inp b/regtests/ww3_tp2.22/input/ww3_ounp.inp new file mode 100644 index 000000000..4816a3a7e --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_ounp.inp @@ -0,0 +1,119 @@ +$ -------------------------------------------------------------------- $ +$ WAVEWATCH III NETCDF Point output post-processing $ +$--------------------------------------------------------------------- $ +$ First output time (yyyymmdd hhmmss), increment of output (s), +$ and number of output times. +$ + 19680606 000000 21600. 1000 +$ +$ Points requested --------------------------------------------------- $ +$ +$ Define points index for which output is to be generated. +$ If no one defined, all points are selected +$ One index number per line, negative number identifies end of list. + 1 + 2 + 3 +$ mandatory end of list + -1 +$ +$--------------------------------------------------------------------- $ +$ file prefix +$ number of characters in date [4(yearly),6(monthly),8(daily),10(hourly)] +$ netCDF version [3,4] +$ points in same file [T] or not [F] +$ and max number of points to be processed in one pass +$ output type ITYPE [0,1,2,3] +$ flag for global attributes WW3 [0] or variable version [1-2-3-4] +$ flag for dimensions order time,station [T] or station,time [F] +$ + ww3. + 6 + 3 + T 150 + 1 + 0 + T +$ +$ -------------------------------------------------------------------- $ +$ ITYPE = 0, inventory of file. +$ No additional input, the above time range is ignored. +$ +$ -------------------------------------------------------------------- $ +$ ITYPE = 1, netCDF Spectra. +$ - Sub-type OTYPE : 1 : Print plots. +$ 2 : Table of 1-D spectra +$ 3 : Transfer file. +$ 4 : Spectral partitioning. +$ - Scaling factors for 1-D and 2-D spectra Negative factor +$ disables, output, factor = 0. gives normalized spectrum. +$ - Netcdf variable type [2=SHORT, 3=it depends, 4=REAL] +$ + 3 1 0 4 +$ +$ The transfer file contains records with the following contents. +$ +$ - File ID in quotes, number of frequencies, directions and points. +$ grid name in quotes (for unformatted file C*21,3I,C*30). +$ - Bin frequencies in Hz for all bins. +$ - Bin directions in radians for all bins (Oceanographic conv.). +$ -+ +$ - Time in yyyymmdd hhmmss format | loop +$ -+ | +$ - Point name (C*40), lat, lon, d, U10 and | loop | over +$ direction, current speed and direction | over | +$ - E(f,theta) | points | times +$ -+ -+ +$ +$ -------------------------------------------------------------------- $ +$ ITYPE = 2, netCDF Tables of (mean) parameter +$ - Sub-type OTYPE : 1 : Depth, current, wind +$ 2 : Mean wave pars. +$ 3 : Nondimensional pars. (U*) +$ 4 : Nondimensional pars. (U10) +$ 5 : 'Validation table' +$ 6 : WMO standard output +$ 4 +$ +$ -------------------------------------------------------------------- $ +$ ITYPE = 3, netCDF Source terms +$ - Sub-type OTYPE : 1 : Print plots. +$ 2 : Table of 1-D S(f). +$ 3 : Table of 1-D inverse time scales +$ (1/T = S/F). +$ 4 : Transfer file +$ - Scaling factors for 1-D and 2-D source terms. Negative +$ factor disables print plots, factor = 0. gives normalized +$ print plots. +$ - Flags for spectrum, input, interactions, dissipation, +$ bottom and total source term. +$ - scale ISCALE for OTYPE=2,3 +$ 0 : Dimensional. +$ 1 : Nondimensional in terms of U10 +$ 2 : Nondimensional in terms of U* +$ 3-5: like 0-2 with f normalized with fp. +$ +$ 4 0 0 T T T T T T 0 +$ +$ The transfer file contains records with the following contents. +$ +$ - File ID in quotes, nubmer of frequencies, directions and points, +$ flags for spectrum and source terms (C*21, 3I, 6L) +$ - Bin frequencies in Hz for all bins. +$ - Bin directions in radians for all bins (Oceanographic conv.). +$ -+ +$ - Time in yyyymmdd hhmmss format | loop +$ -+ | +$ - Point name (C*40), depth, wind speed and | loop | over +$ direction, current speed and direction | over | +$ - E(f,theta) if requested | points | times +$ - Sin(f,theta) if requested | | +$ - Snl(f,theta) if requested | | +$ - Sds(f,theta) if requested | | +$ - Sbt(f,theta) if requested | | +$ - Stot(f,theta) if requested | | +$ -+ -+ +$ +$ -------------------------------------------------------------------- $ +$ End of input file $ +$ -------------------------------------------------------------------- $ diff --git a/regtests/ww3_tp2.22/input/ww3_ounp.nml b/regtests/ww3_tp2.22/input/ww3_ounp.nml new file mode 100644 index 000000000..29fa1897d --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_ounp.nml @@ -0,0 +1,46 @@ +! -------------------------------------------------------------------- ! +! WAVEWATCH III ww3_ounp.nml - Point output post-processing ! +! -------------------------------------------------------------------- ! + +! -------------------------------------------------------------------- ! +! Define the output fields to postprocess via POINT_NML namelist +! -------------------------------------------------------------------- ! +&POINT_NML + POINT%TIMESTART = '19680606 000000' + POINT%TIMESTRIDE = '21600.' + POINT%TIMECOUNT = '1000' + POINT%LIST = '1 2 3' +/ + +! -------------------------------------------------------------------- ! +! Define the content of the output file via FILE_NML namelist +! -------------------------------------------------------------------- ! +&FILE_NML +/ + +! -------------------------------------------------------------------- ! +! Define the type 0, inventory of file +! -------------------------------------------------------------------- ! + + +! -------------------------------------------------------------------- ! +! Define the type 1, spectra via SPECTRA_NML namelist +! -------------------------------------------------------------------- ! +&SPECTRA_NML +/ + +! -------------------------------------------------------------------- ! +! Define the type 2, mean parameter via PARAM_NML namelist +! -------------------------------------------------------------------- ! +&PARAM_NML +/ + +! -------------------------------------------------------------------- ! +! Define the type 3, source terms via SOURCE_NML namelist +! -------------------------------------------------------------------- ! +&SOURCE_NML +/ + +! -------------------------------------------------------------------- ! +! WAVEWATCH III - end of namelist ! +! -------------------------------------------------------------------- ! diff --git a/regtests/ww3_tp2.22/input/ww3_outf.inp b/regtests/ww3_tp2.22/input/ww3_outf.inp new file mode 100644 index 000000000..4b062a870 --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_outf.inp @@ -0,0 +1,10 @@ +$ WAVEWATCH III Grid output post-processing +$ ----------------------------------------- + 19680612 000000 518400. 2 +$ + N + HS T01 DIR SPR +$ + 1 0 +$ + 1 193 1 1 93 1 T F F diff --git a/regtests/ww3_tp2.22/input/ww3_outp_spec.inp b/regtests/ww3_tp2.22/input/ww3_outp_spec.inp new file mode 100644 index 000000000..d4c452b1f --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_outp_spec.inp @@ -0,0 +1,11 @@ +$ WAVEWATCH III Point output post-processing +$ ------------------------------------------ + 19680606 000000 43200. 25 +$ + 1 + 2 + 3 + -1 +$ + 1 + 1 -1. 0. 33 F diff --git a/regtests/ww3_tp2.22/input/ww3_outp_tab51.inp b/regtests/ww3_tp2.22/input/ww3_outp_tab51.inp new file mode 100644 index 000000000..d40f4a55d --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_outp_tab51.inp @@ -0,0 +1,10 @@ +$ WAVEWATCH III Point output post-processing +$ ------------------------------------------ + 19680606 000000 43200. 25 +$ + 1 + -1 +$ + 2 +$ + 2 51 diff --git a/regtests/ww3_tp2.22/input/ww3_outp_tab52.inp b/regtests/ww3_tp2.22/input/ww3_outp_tab52.inp new file mode 100644 index 000000000..06431db5d --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_outp_tab52.inp @@ -0,0 +1,10 @@ +$ WAVEWATCH III Point output post-processing +$ ------------------------------------------ + 19680606 000000 43200. 25 +$ + 2 + -1 +$ + 2 +$ + 2 52 diff --git a/regtests/ww3_tp2.22/input/ww3_outp_tab53.inp b/regtests/ww3_tp2.22/input/ww3_outp_tab53.inp new file mode 100644 index 000000000..209a605b0 --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_outp_tab53.inp @@ -0,0 +1,10 @@ +$ WAVEWATCH III Point output post-processing +$ ------------------------------------------ + 19680606 000000 43200. 25 +$ + 3 + -1 +$ + 2 +$ + 2 53 diff --git a/regtests/ww3_tp2.22/input/ww3_shel.inp b/regtests/ww3_tp2.22/input/ww3_shel.inp new file mode 100644 index 000000000..aba7af3e4 --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_shel.inp @@ -0,0 +1,42 @@ +$ WAVEWATCH III shell input file +$ ------------------------------ + F T + T T + T T + F F + F F + F F + F + F + F +$ + 19680606 000000 + 19680606 120000 +$ + 1 +$ + 19680606 000000 10800 19680608 000000 +$ + N + HS EF T01 DIR SPR +$ + 19680606 000000 21600 19680608 000000 + 0.0 0.0 'LEFT' + 90.0 0.0 'CENTER' + 180.0 0.0 'RIGHT' + 0.0 0.0 'STOPSTRING' + 19680606 000000 14400 19680608 000000 + T + 19680606 000000 0 19680608 000000 + 19680606 000000 0 19680608 000000 + 19680606 000000 0 19680608 000000 +$ + 'CUR' 19680606 030000 2.0 45. + 'WND' 19680606 000000 20.0 180. 2. + 'WND' 19680606 040000 15.0 130. 1. + 'WND' 19680606 080000 25.0 90. 3. + 'STP' +$ +$ -------------------------------------------------------------------- $ +$ End of input file $ +$ -------------------------------------------------------------------- $ diff --git a/regtests/ww3_tp2.22/input/ww3_shel.nml b/regtests/ww3_tp2.22/input/ww3_shel.nml new file mode 100644 index 000000000..578f05f93 --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_shel.nml @@ -0,0 +1,72 @@ +! -------------------------------------------------------------------- ! +! WAVEWATCH III ww3_shel.nml - single-grid model ! +! -------------------------------------------------------------------- ! + + +! -------------------------------------------------------------------- ! +! Define top-level model parameters via DOMAIN_NML namelist +! -------------------------------------------------------------------- ! +&DOMAIN_NML + DOMAIN%STOP = '19680606 120000' +/ + +! -------------------------------------------------------------------- ! +! Define each forcing via the INPUT_NML namelist +! -------------------------------------------------------------------- ! +&INPUT_NML + INPUT%FORCING%CURRENTS = 'H' + INPUT%FORCING%WINDS = 'H' +/ + +! -------------------------------------------------------------------- ! +! Define the output types point parameters via OUTPUT_TYPE_NML namelist +! -------------------------------------------------------------------- ! +&OUTPUT_TYPE_NML + TYPE%FIELD%LIST = 'HS EF T01 DIR SPR' + TYPE%POINT%FILE = '../input/points.list' +/ + +! -------------------------------------------------------------------- ! +! Define output dates via OUTPUT_DATE_NML namelist +! -------------------------------------------------------------------- ! +&OUTPUT_DATE_NML + DATE%FIELD = '19680606 000000' '10800' '19680608 000000' + DATE%POINT = '19680606 000000' '21600' '19680608 000000' + DATE%TRACK = '19680606 000000' '14400' '19680608 000000' +/ + +! -------------------------------------------------------------------- ! +! Define homogeneous input via HOMOG_COUNT_NML and HOMOG_INPUT_NML namelist +! -------------------------------------------------------------------- ! +&HOMOG_COUNT_NML + HOMOG_COUNT%N_CUR = 1 + HOMOG_COUNT%N_WND = 3 +/ + +&HOMOG_INPUT_NML + HOMOG_INPUT(1)%NAME = 'CUR' + HOMOG_INPUT(1)%DATE = '19680606 030000' + HOMOG_INPUT(1)%VALUE1 = 2.0 + HOMOG_INPUT(1)%VALUE2 = 45. + + HOMOG_INPUT(2)%NAME = 'WND' + HOMOG_INPUT(2)%VALUE1 = 20.0 + HOMOG_INPUT(2)%VALUE2 = 180. + HOMOG_INPUT(2)%VALUE3 = 2. + + HOMOG_INPUT(3)%NAME = 'WND' + HOMOG_INPUT(3)%DATE = '19680606 040000' + HOMOG_INPUT(3)%VALUE1 = 15.0 + HOMOG_INPUT(3)%VALUE2 = 130. + HOMOG_INPUT(3)%VALUE3 = 1. + + HOMOG_INPUT(4)%NAME = 'WND' + HOMOG_INPUT(4)%DATE = '19680606 080000' + HOMOG_INPUT(4)%VALUE1 = 25.0 + HOMOG_INPUT(4)%VALUE2 = 90. + HOMOG_INPUT(4)%VALUE3 = 3. +/ + +! -------------------------------------------------------------------- ! +! WAVEWATCH III - end of namelist ! +! -------------------------------------------------------------------- ! diff --git a/regtests/ww3_tp2.22/input/ww3_strt.inp b/regtests/ww3_tp2.22/input/ww3_strt.inp new file mode 100644 index 000000000..62e9be21a --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_strt.inp @@ -0,0 +1,5 @@ +$ WAVEWATCH III Initial conditions input file +$ ------------------------------------------- + 1 +$ fp sip thm ncos xm six ym siy hmax + 0.06 0.01 310. 8 0.0 -1.0 0.0 1.0 2.5 diff --git a/regtests/ww3_tp2.22/input/ww3_trck.inp b/regtests/ww3_tp2.22/input/ww3_trck.inp new file mode 100755 index 000000000..6610b6085 --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_trck.inp @@ -0,0 +1,11 @@ +$ -------------------------------------------------------------------- $ +$ WAVEWATCH III Track output post-processing $ +$--------------------------------------------------------------------- $ +$ The number of wavenumbers and directions need to be read in as they +$ determine the record length of the data file +$ + 9 24 +$ +$ -------------------------------------------------------------------- $ +$ End of input file $ +$ -------------------------------------------------------------------- $ diff --git a/regtests/ww3_tp2.22/input/ww3_trnc.inp b/regtests/ww3_tp2.22/input/ww3_trnc.inp new file mode 100755 index 000000000..df60800b8 --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_trnc.inp @@ -0,0 +1,20 @@ +$ -------------------------------------------------------------------- $ +$ WAVEWATCH III Track output post-processing $ +$--------------------------------------------------------------------- $ +$ First output time (yyyymmdd hhmmss), increment of output (s), +$ and number of output times. +$ + 19680606 000000 3600. 100000 +$ +$ Output type -------------------------------------------------------- $ +$ netCDF version [3,4] +$ file prefix +$ number of characters in date [4(yearly),6(monthly),8(daily),10(hourly)] +$ + 3 + ww3. + 6 +$ +$ -------------------------------------------------------------------- $ +$ End of input file $ +$ -------------------------------------------------------------------- $ diff --git a/regtests/ww3_tp2.22/input/ww3_trnc.nml b/regtests/ww3_tp2.22/input/ww3_trnc.nml new file mode 100644 index 000000000..e4ae8ceab --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_trnc.nml @@ -0,0 +1,21 @@ +! -------------------------------------------------------------------- ! +! WAVEWATCH III ww3_trnc.nml - Track output post-processing ! +! -------------------------------------------------------------------- ! + +! -------------------------------------------------------------------- ! +! Define the output fields to postprocess via TRACK_NML namelist +! -------------------------------------------------------------------- ! +&TRACK_NML + TRACK%TIMESTART = '19680606 000000' + TRACK%TIMESTRIDE = '3600.' +/ + +! -------------------------------------------------------------------- ! +! Define the content of the input file via FILE_NML namelist +! -------------------------------------------------------------------- ! +&FILE_NML +/ + +! -------------------------------------------------------------------- ! +! WAVEWATCH III - end of namelist ! +! -------------------------------------------------------------------- ! From a8ebf8947d01a0b3725771a4b629775fbde49afa Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Thu, 24 Aug 2023 13:54:37 -0600 Subject: [PATCH 06/63] add documentation for LMPN namelist and ww3_tp2.22 test --- regtests/ww3_tp2.22/info | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/regtests/ww3_tp2.22/info b/regtests/ww3_tp2.22/info index 65b314a65..dc9376ebb 100644 --- a/regtests/ww3_tp2.22/info +++ b/regtests/ww3_tp2.22/info @@ -23,6 +23,9 @@ # - dx = 1.0 deg, dy = 1.0 deg # # - Xrange = -6:186 deg, Yrange = -46:46 deg # # + Spectral grid: ntheta = 24, nf = 3, f1 = 0.03679, fgamma = 1.1 # +# + Langmuir mixing parameterization (LMPENABLED = T) and tail # +# contribution (SDTAIL = T) enabled. A uniform (10m) surface layer # +# depth is asumed (HSLMODE = 0). # # * map2_2.gs: grads script for visualizing results. # # * GSE correction is enabled. To disable GSE correction # # comment/uncomment the appropriate lines in ww3_grid.inp. # @@ -46,6 +49,23 @@ # Hendrik Tolman, Jun 2002 # # Last Mod : Dec 2013 # # # +# Notes on LMPN namelist and Langmuir Mixing Parameterization: # +# # +# The LMPN namelist group configures the Langmuir Mixing # +# Parameterization used within the context of climate modeling and # +# when WW3 is coupled with an active ocean model (.e.g., POP2, MOM6. # +# The LMPENABLED flag turns on the parameterization computations. # +# The SDTAIL flag enabled the spectral tail contribution. # +# HSLMODE parameter determines the surface layer depth (HSL). # +# When HSLMODE == 0, a uniform 10m HSL is assumed for testing purposes. # +# When HSLMODE == 1, the HSL field is to be received from the active # +# ocean model via coupler. # +# # +# For more info on the Langmuir parameterization, see: # +# Li, Qing, et al. "Langmuir mixing effects on global climate: # +# WAVEWATCH III in CESM." Ocean Modelling 103 (2016): 145-160. # +# # +# # # Copyright 2009-2013 National Weather Service (NWS), # # National Oceanic and Atmospheric Administration. All rights # # reserved. WAVEWATCH III is a trademark of the NWS. # From a70244dab981d53b7533ab3ee2ab2c5b48bd840e Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Wed, 13 Sep 2023 21:50:03 +0000 Subject: [PATCH 07/63] ww3_grid.inp: update for Langmuir namelist (LMPN) --- model/inp/ww3_grid.inp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/model/inp/ww3_grid.inp b/model/inp/ww3_grid.inp index ef6121974..d24196830 100644 --- a/model/inp/ww3_grid.inp +++ b/model/inp/ww3_grid.inp @@ -423,6 +423,34 @@ $ provides 3 partitions of both x & y component, $ with a reasonable accuracy for using in $ a climate model. $ +$ Langmuir turbulence parameterization ------------------------------- $ +$ +$ In standalone WW3 simulations the default parameters should be used. In coupled +$ simulations HSL can be received from the NUOPC cap or left at a uniform depth of +$ 10m. Additionally, setting LMPENABLED to True allows for calculation of the +$ surfaced averaged Stokes drift (USSHX/USSHY) and Langmuir parameters LAMULT +$ (Langmuir enhancement factor), and LASL (surface layer averaged Langmuir number). +$ The high frequency tail contribution can be added to the Stokes drift (USSX/USSY) +$ as well as USSHX/USSHY by setting SDTAIL to True when LMPENABLED is also True. +$ (Li et al., 2016, Ocean Modeling. http://dx.doi.org/10.1016/j.ocemod.2015.07.020) +$ +$ Langmuir parameters : Namelist LMPN +$ LMPENABLED : Logical value controlling calculation of Stokes +$ drift related quantities. +$ T : Activates the calculation of surface layer +$ Stokes drift and the tail contribution. +$ F : (default) These calculations turned off. +$ SDTAIL : Logical value controlling addition of the tail +$ contribution (f^-5) to the Stokes drift. +$ T : The tail contribution is added to the +$ Stokes drift (LMPENABLED must also be T). +$ F : (default) No tail contribution added. +$ HSLMODE : Integer indicating the surface layer depth type. +$ 0 : (default) Uniform surface layer depth set +$ to the value of HSL=10m. +$ 1 : Surface layer depth (HSL) recieved from +$ NUOPC cap. +$ $ Miscellaneous ------------------------------------------------------ $ $ Misc. parameters : Namelist MISC $ CICE0 : Ice concentration cut-off. From 695ef0664071b84cad70cbf2f4a9a05bb433075f Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 14 Sep 2023 15:01:43 +0000 Subject: [PATCH 08/63] ww3_grid.inp: reference --- model/inp/ww3_grid.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/inp/ww3_grid.inp b/model/inp/ww3_grid.inp index d24196830..f76fae7df 100644 --- a/model/inp/ww3_grid.inp +++ b/model/inp/ww3_grid.inp @@ -432,7 +432,7 @@ $ surfaced averaged Stokes drift (USSHX/USSHY) and Langmuir parameters LAMULT $ (Langmuir enhancement factor), and LASL (surface layer averaged Langmuir number). $ The high frequency tail contribution can be added to the Stokes drift (USSX/USSY) $ as well as USSHX/USSHY by setting SDTAIL to True when LMPENABLED is also True. -$ (Li et al., 2016, Ocean Modeling. http://dx.doi.org/10.1016/j.ocemod.2015.07.020) +$ Ref: (Li et al., 2016, Ocean Model.) $ $ Langmuir parameters : Namelist LMPN $ LMPENABLED : Logical value controlling calculation of Stokes From 8237fd16a4469d71062ba2145beacf54a2e84cb6 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 14 Sep 2023 15:47:20 +0000 Subject: [PATCH 09/63] ww3_grid.inp, info: documentation updates --- model/inp/ww3_grid.inp | 47 ++++++++++++++++++++-------------------- regtests/ww3_tp2.22/info | 4 ++-- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/model/inp/ww3_grid.inp b/model/inp/ww3_grid.inp index f76fae7df..735c87cd7 100644 --- a/model/inp/ww3_grid.inp +++ b/model/inp/ww3_grid.inp @@ -424,32 +424,31 @@ $ with a reasonable accuracy for using in $ a climate model. $ $ Langmuir turbulence parameterization ------------------------------- $ -$ -$ In standalone WW3 simulations the default parameters should be used. In coupled -$ simulations HSL can be received from the NUOPC cap or left at a uniform depth of -$ 10m. Additionally, setting LMPENABLED to True allows for calculation of the -$ surfaced averaged Stokes drift (USSHX/USSHY) and Langmuir parameters LAMULT -$ (Langmuir enhancement factor), and LASL (surface layer averaged Langmuir number). -$ The high frequency tail contribution can be added to the Stokes drift (USSX/USSY) -$ as well as USSHX/USSHY by setting SDTAIL to True when LMPENABLED is also True. -$ Ref: (Li et al., 2016, Ocean Model.) +$ The LMPN namelist group configures the Langmuir Mixing +$ Parameterization used within the context of climate modeling and +$ when WW3 is coupled to an active ocean model (.e.g., POP2, MOM6). +$ The LMPENABLED flag turns on the parameterization computations. +$ The SDTAIL flag enables the spectral tail contribution. HSLMODE +$ parameter determines the surface layer depth (HSL). $ $ Langmuir parameters : Namelist LMPN -$ LMPENABLED : Logical value controlling calculation of Stokes -$ drift related quantities. -$ T : Activates the calculation of surface layer -$ Stokes drift and the tail contribution. -$ F : (default) These calculations turned off. -$ SDTAIL : Logical value controlling addition of the tail -$ contribution (f^-5) to the Stokes drift. -$ T : The tail contribution is added to the -$ Stokes drift (LMPENABLED must also be T). -$ F : (default) No tail contribution added. -$ HSLMODE : Integer indicating the surface layer depth type. -$ 0 : (default) Uniform surface layer depth set -$ to the value of HSL=10m. -$ 1 : Surface layer depth (HSL) recieved from -$ NUOPC cap. +$ LMPENABLED : Logical controlling Langmuir +$ related computations. +$ T : Activates calculations +$ F : Calculations off (default) +$ SDTAIL : Logical controlling addition of +$ tail contribution. +$ T : Tail added to Stokes +$ drift (LMPENABLED=T also). +$ F : No tail added (default) +$ HSLMODE : Integer indicating surface layer +$ depth (HSL) type. +$ 0 : Uniform HSL=10m (default) +$ 1 : HSL from coupler +$ +$ For more info on the Langmuir parameterization, see: +$ Li, Qing, et al. "Langmuir mixing effects on global climate: +$ WAVEWATCH III in CESM." Ocean Modelling 103 (2016): 145-160. $ $ Miscellaneous ------------------------------------------------------ $ $ Misc. parameters : Namelist MISC diff --git a/regtests/ww3_tp2.22/info b/regtests/ww3_tp2.22/info index dc9376ebb..576995848 100644 --- a/regtests/ww3_tp2.22/info +++ b/regtests/ww3_tp2.22/info @@ -44,7 +44,7 @@ # Sample run_test commands : # # (Note: mpirun commands differ by local system) # # ./bin/run_test -s PR1 ../model ww3_tp2.22 # -# ./bin/run_test -n 3 -p mpirun -f -s PR1_MPI ../model ww3_tp2.22 # +# ./bin/run_test -n 3 -p mpirun -f -s PR1_MPI ../model ww3_tp2.22 # # # # Hendrik Tolman, Jun 2002 # # Last Mod : Dec 2013 # @@ -53,7 +53,7 @@ # # # The LMPN namelist group configures the Langmuir Mixing # # Parameterization used within the context of climate modeling and # -# when WW3 is coupled with an active ocean model (.e.g., POP2, MOM6. # +# when WW3 is coupled with an active ocean model (.e.g., POP2, MOM6). # # The LMPENABLED flag turns on the parameterization computations. # # The SDTAIL flag enabled the spectral tail contribution. # # HSLMODE parameter determines the surface layer depth (HSL). # From 9bc25b7c49a93feb3742d80957f3a228b1dce887 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 14 Sep 2023 18:13:37 +0000 Subject: [PATCH 10/63] matrix.base, matrix_cmake_ncep: first attempt at setting up regtest call --- regtests/bin/matrix.base | 229 +++++++++++++++++---------------- regtests/bin/matrix_cmake_ncep | 1 + 2 files changed, 120 insertions(+), 110 deletions(-) diff --git a/regtests/bin/matrix.base b/regtests/bin/matrix.base index a273372a9..afbb995f8 100755 --- a/regtests/bin/matrix.base +++ b/regtests/bin/matrix.base @@ -31,7 +31,7 @@ prop1D prop2D time fetch hur1mg \ multi01 multi02 multi03 multi04 multi05 \ hybd shwtr unstr pdlib smcgr rtd mudice infgrv \ - uost assim calendar confignc oasis \ + lmp uost assim calendar confignc oasis \ esmf ufs ufscoarse rstrt_b4b nth_b4b npl_b4b grib \ multi06 multi07 multi08 multi09 do @@ -74,6 +74,7 @@ echo " echo ' Growth curves (fetch) : $fetch'" >> matrix.head echo " echo ' Shallow water tests : $shwtr'" >> matrix.head echo " echo ' Unstructured grid tests : $unstr'" >> matrix.head + echo " echo ' Langmuir mixing parameterization : $lmp'" >> matrix.head echo " echo ' SMC grid tests : $smcgr'" >> matrix.head echo " echo ' Rotated pole tests : $rtd'" >> matrix.head echo " echo ' Hurricane with one moving grid : $hur1mg'" >> matrix.head @@ -171,7 +172,7 @@ echo "$rtst -s PR1 -w work_PR1_f -m grdset_f $ww3 mww3_test_04" >> matrix.body echo "$rtst -s PR1 -w work_PR1_g -m grdset_g $ww3 mww3_test_04" >> matrix.body fi - + fi if [ "$dist" = 'y' ] @@ -224,7 +225,7 @@ echo "$rtst -s PR1_MPI -w work_PR1_MPI_d -m grdset_d -f -p $mpi -n $np $ww3 mww3_test_04" >> matrix.body echo "$rtst -s PR1_MPI -w work_PR1_MPI_e -m grdset_e -f -p $mpi -n $np $ww3 mww3_test_04" >> matrix.body fi - + fi if [ "$prop2D" = 'y' ] && [ "$dist" = 'y' ] @@ -812,6 +813,11 @@ echo "$rtst -s MPI -w work_MPI_5km -g 5km -f -p $mpi -n $np $ww3 ww3_tp2.15" >> matrix.body echo "$rtst -s MPI -i input_rho -w work_PR3_UQ_RHO_MPI -f -p $mpi -n $np $ww3 ww3_tp2.15" >> matrix.body echo "$rtst -s TIDE_MPI -w work_TIDE_MPI -f -p $mpi -n $np $ww3 ww3_tp2.18" >> matrix.body + + if [ "$lmp" == "y" ]; # Langmuir mixing parameterization + then + echo "$rtst -s PR3_UQ_MPI -w work_PR3_UQ_MPI -f -p $mpi -n $np $ww3 ww3_tp2.22" >> matrix.body + fi fi if [ "$multi01" = 'y' ] @@ -985,9 +991,9 @@ if [ "$dist" = 'y' ] then -# - - - - - - - - - - - - +# - - - - - - - - - - - - - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -998,7 +1004,7 @@ echo "$rtst -s ST1_PR1_MPI -w work_ST1_PR1_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1009,7 +1015,7 @@ echo "$rtst -s ST1_PR2_UQ_MPI -w work_ST1_PR2_UQ_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1020,7 +1026,7 @@ echo "$rtst -s ST1_PR2_UNO_MPI -w work_ST1_PR2_UNO_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1031,7 +1037,7 @@ echo "$rtst -s ST1_PR3_UQ_MPI -w work_ST1_PR3_UQ_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1041,9 +1047,9 @@ then echo "$rtst -s ST1_PR3_UNO_MPI -w work_ST1_PR3_UNO_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi -# - - - - - - - - - - - - +# - - - - - - - - - - - - - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1054,7 +1060,7 @@ echo "$rtst -s ST2_PR1_MPI -w work_ST2_PR1_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1065,7 +1071,7 @@ echo "$rtst -s ST2_PR2_UQ_MPI -w work_ST2_PR2_UQ_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1076,7 +1082,7 @@ echo "$rtst -s ST2_PR2_UNO_MPI -w work_ST2_PR2_UNO_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1087,7 +1093,7 @@ echo "$rtst -s ST2_PR3_UQ_MPI -w work_ST2_PR3_UQ_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1097,9 +1103,9 @@ then echo "$rtst -s ST2_PR3_UNO_MPI -w work_ST2_PR3_UNO_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi -# - - - - - - - - - - - - +# - - - - - - - - - - - - - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1110,7 +1116,7 @@ echo "$rtst -s ST3_PR1_MPI -w work_ST3_PR1_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1121,7 +1127,7 @@ echo "$rtst -s ST3_PR2_UQ_MPI -w work_ST3_PR2_UQ_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1132,7 +1138,7 @@ echo "$rtst -s ST3_PR2_UNO_MPI -w work_ST3_PR2_UNO_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1143,7 +1149,7 @@ echo "$rtst -s ST3_PR3_UQ_MPI -w work_ST3_PR3_UQ_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1153,9 +1159,9 @@ then echo "$rtst -s ST3_PR3_UNO_MPI -w work_ST3_PR3_UNO_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi -# - - - - - - - - - - - - +# - - - - - - - - - - - - - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1168,7 +1174,7 @@ echo "$rtst -s ST4_PR1_MPI -w work_ST4_PR1_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1179,7 +1185,7 @@ echo "$rtst -s ST4_PR2_UQ_MPI -w work_ST4_PR2_UQ_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1190,7 +1196,7 @@ echo "$rtst -s ST4_PR2_UNO_MPI -w work_ST4_PR2_UNO_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1201,7 +1207,7 @@ echo "$rtst -s ST4_PR3_UQ_MPI -w work_ST4_PR3_UQ_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1211,9 +1217,9 @@ then echo "$rtst -s ST4_PR3_UNO_MPI -w work_ST4_PR3_UNO_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi -# - - - - - - - - - - - - +# - - - - - - - - - - - - - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1224,7 +1230,7 @@ echo "$rtst -s ST6_PR1_MPI -w work_ST6_PR1_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1235,7 +1241,7 @@ echo "$rtst -s ST6_PR2_UQ_MPI -w work_ST6_PR2_UQ_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1246,7 +1252,7 @@ echo "$rtst -s ST6_PR2_UNO_MPI -w work_ST6_PR2_UNO_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1257,7 +1263,7 @@ echo "$rtst -s ST6_PR3_UQ_MPI -w work_ST6_PR3_UQ_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1268,7 +1274,7 @@ echo "$rtst -s ST6_PR3_UNO_MPI -w work_ST6_PR3_UNO_MPI -m grdset_a -f -p $mpi -n $np $ww3 mww3_test_05" >> matrix.body fi -# - - - - - - - - - - - - +# - - - - - - - - - - - - fi @@ -1278,9 +1284,9 @@ if [ "$hybd" = 'y' ] then -# - - - - - - - - - - - - +# - - - - - - - - - - - - - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1291,7 +1297,7 @@ echo "$rtst -s ST1_PR1_MPI_OMPH -w work_ST1_PR1_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1302,7 +1308,7 @@ echo "$rtst -s ST1_PR2_UQ_MPI_OMPH -w work_ST1_PR2_UQ_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1313,7 +1319,7 @@ echo "$rtst -s ST1_PR2_UNO_MPI_OMPH -w work_ST1_PR2_UNO_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1324,7 +1330,7 @@ echo "$rtst -s ST1_PR3_UQ_MPI_OMPH -w work_ST1_PR3_UQ_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1334,9 +1340,9 @@ then echo "$rtst -s ST1_PR3_UNO_MPI_OMPH -w work_ST1_PR3_UNO_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi -# - - - - - - - - - - - - +# - - - - - - - - - - - - - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1347,7 +1353,7 @@ echo "$rtst -s ST2_PR1_MPI_OMPH -w work_ST2_PR1_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1358,7 +1364,7 @@ echo "$rtst -s ST2_PR2_UQ_MPI_OMPH -w work_ST2_PR2_UQ_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1369,7 +1375,7 @@ echo "$rtst -s ST2_PR2_UNO_MPI_OMPH -w work_ST2_PR2_UNO_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1380,7 +1386,7 @@ echo "$rtst -s ST2_PR3_UQ_MPI_OMPH -w work_ST2_PR3_UQ_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1390,9 +1396,9 @@ then echo "$rtst -s ST2_PR3_UNO_MPI_OMPH -w work_ST2_PR3_UNO_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi -# - - - - - - - - - - - - +# - - - - - - - - - - - - - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1403,7 +1409,7 @@ echo "$rtst -s ST3_PR1_MPI_OMPH -w work_ST3_PR1_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1414,7 +1420,7 @@ echo "$rtst -s ST3_PR2_UQ_MPI_OMPH -w work_ST3_PR2_UQ_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1425,7 +1431,7 @@ echo "$rtst -s ST3_PR2_UNO_MPI_OMPH -w work_ST3_PR2_UNO_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1436,7 +1442,7 @@ echo "$rtst -s ST3_PR3_UQ_MPI_OMPH -w work_ST3_PR3_UQ_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1446,9 +1452,9 @@ then echo "$rtst -s ST3_PR3_UNO_MPI_OMPH -w work_ST3_PR3_UNO_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi -# - - - - - - - - - - - - +# - - - - - - - - - - - - - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1459,7 +1465,7 @@ echo "$rtst -s ST4_PR1_MPI_OMPH -w work_ST4_PR1_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1470,7 +1476,7 @@ echo "$rtst -s ST4_PR2_UQ_MPI_OMPH -w work_ST4_PR2_UQ_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1481,7 +1487,7 @@ echo "$rtst -s ST4_PR2_UNO_MPI_OMPH -w work_ST4_PR2_UNO_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1492,7 +1498,7 @@ echo "$rtst -s ST4_PR3_UQ_MPI_OMPH -w work_ST4_PR3_UQ_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1502,9 +1508,9 @@ then echo "$rtst -s ST4_PR3_UNO_MPI_OMPH -w work_ST4_PR3_UNO_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi -# - - - - - - - - - - - - +# - - - - - - - - - - - - - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1515,7 +1521,7 @@ echo "$rtst -s ST6_PR1_MPI_OMPH -w work_ST6_PR1_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1526,7 +1532,7 @@ echo "$rtst -s ST6_PR2_UQ_MPI_OMPH -w work_ST6_PR2_UQ_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1537,7 +1543,7 @@ echo "$rtst -s ST6_PR2_UNO_MPI_OMPH -w work_ST6_PR2_UNO_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1548,7 +1554,7 @@ echo "$rtst -s ST6_PR3_UQ_MPI_OMPH -w work_ST6_PR3_UQ_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1559,7 +1565,7 @@ echo "$rtst -s ST6_PR3_UNO_MPI_OMPH -w work_ST6_PR3_UNO_MPI_OMPH -m grdset_a -f -p $mpi -n $nr -t $nth $ww3 mww3_test_05" >> matrix.body fi -# - - - - - - - - - - - - +# - - - - - - - - - - - - fi # Moving grid cases for OpenMP, ww3_ts3 and mww3_test_05 share switches @@ -1568,9 +1574,9 @@ if [ "$omp" = 'y' ] then -# - - - - - - - - - - - - +# - - - - - - - - - - - - - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1581,7 +1587,7 @@ echo "$rtst -s ST1_PR1_OMP -w work_ST1_PR1_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1592,7 +1598,7 @@ echo "$rtst -s ST1_PR2_UQ_OMP -w work_ST1_PR2_UQ_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1603,7 +1609,7 @@ echo "$rtst -s ST1_PR2_UNO_OMP -w work_ST1_PR2_UNO_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1614,7 +1620,7 @@ echo "$rtst -s ST1_PR3_UQ_OMP -w work_ST1_PR3_UQ_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1624,9 +1630,9 @@ then echo "$rtst -s ST1_PR3_UNO_OMP -w work_ST1_PR3_UNO_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi -# - - - - - - - - - - - - +# - - - - - - - - - - - - - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1637,7 +1643,7 @@ echo "$rtst -s ST2_PR1_OMP -w work_ST2_PR1_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1648,7 +1654,7 @@ echo "$rtst -s ST2_PR2_UQ_OMP -w work_ST2_PR2_UQ_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1659,7 +1665,7 @@ echo "$rtst -s ST2_PR2_UNO_OMP -w work_ST2_PR2_UNO_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1670,7 +1676,7 @@ echo "$rtst -s ST2_PR3_UQ_OMP -w work_ST2_PR3_UQ_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1680,9 +1686,9 @@ then echo "$rtst -s ST2_PR3_UNO_OMP -w work_ST2_PR3_UNO_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi -# - - - - - - - - - - - - +# - - - - - - - - - - - - - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1693,7 +1699,7 @@ echo "$rtst -s ST3_PR1_OMP -w work_ST3_PR1_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1704,7 +1710,7 @@ echo "$rtst -s ST3_PR2_UQ_OMP -w work_ST3_PR2_UQ_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1715,7 +1721,7 @@ echo "$rtst -s ST3_PR2_UNO_OMP -w work_ST3_PR2_UNO_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1726,7 +1732,7 @@ echo "$rtst -s ST3_PR3_UQ_OMP -w work_ST3_PR3_UQ_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1736,9 +1742,9 @@ then echo "$rtst -s ST3_PR3_UNO_OMP -w work_ST3_PR3_UNO_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi -# - - - - - - - - - - - - +# - - - - - - - - - - - - - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1749,7 +1755,7 @@ echo "$rtst -s ST4_PR1_OMP -w work_ST4_PR1_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1760,7 +1766,7 @@ echo "$rtst -s ST4_PR2_UQ_OMP -w work_ST4_PR2_UQ_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1771,7 +1777,7 @@ echo "$rtst -s ST4_PR2_UNO_OMP -w work_ST4_PR2_UNO_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1782,7 +1788,7 @@ echo "$rtst -s ST4_PR3_UQ_OMP -w work_ST4_PR3_UQ_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1792,9 +1798,9 @@ then echo "$rtst -s ST4_PR3_UNO_OMP -w work_ST4_PR3_UNO_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi -# - - - - - - - - - - - - +# - - - - - - - - - - - - - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1805,7 +1811,7 @@ echo "$rtst -s ST6_PR1_OMP -w work_ST6_PR1_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1816,7 +1822,7 @@ echo "$rtst -s ST6_PR2_UQ_OMP -w work_ST6_PR2_UQ_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1827,7 +1833,7 @@ echo "$rtst -s ST6_PR2_UNO_OMP -w work_ST6_PR2_UNO_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1838,7 +1844,7 @@ echo "$rtst -s ST6_PR3_UQ_OMP -w work_ST6_PR3_UQ_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi - if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then + if [ "$hur1mg" = 'y' ] || [ "$multi05" = 'y' ] ; then echo ' ' >> matrix.body ; fi if [ "$hur1mg" = 'y' ] then @@ -1848,13 +1854,13 @@ then echo "$rtst -s ST6_PR3_UNO_OMP -w work_ST6_PR3_UNO_OMP -m grdset_a -f -O -n $np $ww3 mww3_test_05" >> matrix.body fi -# - - - - - - - - - - - - +# - - - - - - - - - - - - fi # Second harmonic test case - if [ "$infgrv" = 'y' ] && [ "$shrd" = 'y' ] + if [ "$infgrv" = 'y' ] && [ "$shrd" = 'y' ] then echo ' ' >> matrix.body echo "$rtst $ww3 -w work_IG1 ww3_tig1.1" >> matrix.body @@ -1974,7 +1980,7 @@ echo "$rtst -s IC1IS2 -w work_IC1IS2_1000 -g 1000m $ww3 ww3_tic1.4" >> matrix.body echo "$rtst -s IC2IS2 -w work_IC2IS2_IC2b -g IC2b_1000m $ww3 ww3_tic1.4" >> matrix.body echo "$rtst -s IC2IS2 -w work_IC2IS2_IC2d -g IC2d_1000m $ww3 ww3_tic1.4" >> matrix.body - echo "$rtst -s IC2IS2 -w work_IC2IS2scat -g scat $ww3 ww3_tic2.3" >> matrix.body + echo "$rtst -s IC2IS2 -w work_IC2IS2scat -g scat $ww3 ww3_tic2.3" >> matrix.body echo "$rtst -s IC2IS2 -w work_IC2IS2creep -g creepOnly $ww3 ww3_tic2.3" >> matrix.body echo "$rtst -s IC2IS2 -w work_IC2IS2dissip -g dissipOnly $ww3 ww3_tic2.3" >> matrix.body fi @@ -2006,7 +2012,7 @@ echo "$rtst -s MPI -s NO_PDLIB -w work_ma -m grdset_a -f -p $mpi -n $np $ww3 ww3_tp2.17" >> matrix.body echo "$rtst -s MPI -s PDLIB -w work_b -g b -f -p $mpi -n $np $ww3 ww3_tp2.17" >> matrix.body echo "$rtst -s MPI -s PDLIB -w work_c -g c -f -p $mpi -n $np $ww3 ww3_tp2.17" >> matrix.body - echo "$rtst -s MPI -s PDLIB -w work_pdlib -g pdlib -f -p $mpi -n $np $ww3 ww3_tp2.6" >> matrix.body + echo "$rtst -s MPI -s PDLIB -w work_pdlib -g pdlib -f -p $mpi -n $np $ww3 ww3_tp2.6" >> matrix.body echo "$rtst -s MPI -s PDLIB -w work_mb -m grdset_b -f -p $mpi -n $np $ww3 ww3_tp2.17" >> matrix.body echo "$rtst -s MPI -s PDLIB -w work_mc -m grdset_c -f -p $mpi -n $np $ww3 ww3_tp2.17" >> matrix.body if [ "$rstrt_b4b" = 'y' ] @@ -2023,7 +2029,7 @@ fi # unstructured grid with PDLIB for domain decomposition and implicit solver, Neumann Bnd, depth breaking & triad interaction ST - if [ "$pdlib" = 'y' ] && [ "$dist" = 'y' ] + if [ "$pdlib" = 'y' ] && [ "$dist" = 'y' ] then echo ' ' >> matrix.body echo "$rtst -s MPI -s PDLIB -w work_1A_a -f -g a -p $mpi -n $np -o netcdf -i input_Case1A $ww3 ww3_tp2.19" >> matrix.body @@ -2032,23 +2038,23 @@ fi - #Unresolved Obstacles Source Term (UOST) - if [ "$uost" = 'y' ] + #Unresolved Obstacles Source Term (UOST) + if [ "$uost" = 'y' ] then echo ' ' >> matrix.body if [ "$dist" = 'y' ] - then + then echo "$rtst -s MPI -w work_rg_shel_MPI -i input_rg_shel -f -p $mpi -n $np $ww3 ww3_ts4" >> matrix.body echo "$rtst -s MPI -w work_rg_multi_MPI -i input_rg_multi -m grdset -f -p $mpi -n $np $ww3 ww3_ts4" >> matrix.body echo "$rtst -s MPI -w work_ug_MPI -i input_ug -f -p $mpi -n $np $ww3 ww3_ts4" >> matrix.body - else + else echo "$rtst -w work_rg_shel -i input_rg_shel $ww3 ww3_ts4" >> matrix.body echo "$rtst -w work_rg_multi -i input_rg_multi -m grdset $ww3 ww3_ts4" >> matrix.body echo "$rtst -w work_ug -i input_ug $ww3 ww3_ts4" >> matrix.body fi fi - # Global unstructured grid and Unresolved Obstacles Source Term (UOST) + # Global unstructured grid and Unresolved Obstacles Source Term (UOST) if [ "$uost" = 'y' ] && [ "$dist" = 'y' ] then echo ' ' >> matrix.body @@ -2062,7 +2068,10 @@ fi fi - #Test of updating the restart spectra + + + + #Test of updating the restart spectra if [ "$assim" = 'y' ] then echo ' ' >> matrix.body @@ -2082,7 +2091,7 @@ echo "$rtst -s ST4 -w work_UPD6_U_cap -i input_UPD6_U_cap $ww3 ww3_ta1" >> matrix.body fi - #Test of atmosphere, ocean, and ice coupling using OASIS + #Test of atmosphere, ocean, and ice coupling using OASIS if [ "$oasis" = 'y' ] && [ "$dist" = 'y' ] then echo ' ' >> matrix.body @@ -2204,15 +2213,15 @@ fi fi - #Test gint for restarts + #Test gint for restarts if [ "$ufs" = 'y' ] && [ "$grib" = 'y' ] then - echo ' ' >> matrix.body + echo ' ' >> matrix.body echo "$rtst -s MPI_OMPH -w work_c -m grdset_c -f -p $mpi -n $npl -t $nth1 $ww3 ww3_ufs1.2" >> matrix.body echo "mkdir -p ww3_ufs1.2/work_l" >> matrix.body echo "cp ww3_ufs1.2/work_c/restart.hafsl ww3_ufs1.2/work_l/restart.hafsl" >> matrix.body echo "$rtst -s MPI_OMPH -w work_l -m grdset_l -f -p $mpi -n $npl -t $nth1 $ww3 ww3_ufs1.2" >> matrix.body - fi + fi #GEFSv12 setup with ww3_multi and grib2 output diff --git a/regtests/bin/matrix_cmake_ncep b/regtests/bin/matrix_cmake_ncep index 19ce9c5e1..62ca6c497 100755 --- a/regtests/bin/matrix_cmake_ncep +++ b/regtests/bin/matrix_cmake_ncep @@ -203,6 +203,7 @@ EOF export shwtr='y' # shallow water tests export unstr='y' # unstructured grid tests export pdlib='y' # unstr with pdlib for domain decomposition and implicit solver + export lmp='y' # Langmuir mixing parameterization export smcgr='y' # SMC grid test export rtd='y' # Rotated pole test export mudice='y' # Mud/Ice and wave interaction tests From 0903907f293cb8fb33b3f3b324423f4d4f20ab5b Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 14 Sep 2023 19:03:04 +0000 Subject: [PATCH 11/63] ww3_tp2.22/input: clean out any files not needed for this test. also, update to ww3_grid --- regtests/ww3_tp2.22/input/switch | 1 - regtests/ww3_tp2.22/input/switch_PR1 | 1 - regtests/ww3_tp2.22/input/switch_PR1_MPI | 1 - regtests/ww3_tp2.22/input/switch_PR2_UNO | 1 - regtests/ww3_tp2.22/input/switch_PR2_UNO_MPI | 1 - regtests/ww3_tp2.22/input/switch_PR2_UQ | 1 - regtests/ww3_tp2.22/input/switch_PR2_UQ_MPI | 1 - .../ww3_tp2.22/input/switch_PR2_UQ_NC4_MPI | 1 - regtests/ww3_tp2.22/input/switch_PR3_UNO | 1 - regtests/ww3_tp2.22/input/switch_PR3_UNO_MPI | 1 - regtests/ww3_tp2.22/input/switch_PR3_UQ | 1 - regtests/ww3_tp2.22/input/ww3_grid.inp | 4 +- regtests/ww3_tp2.22/input/ww3_grid.nml | 83 ------------------- regtests/ww3_tp2.22/input/ww3_grid_nocmpr.inp | 35 -------- regtests/ww3_tp2.22/input/ww3_grid_nocmpr.nml | 83 ------------------- 15 files changed, 2 insertions(+), 214 deletions(-) delete mode 100644 regtests/ww3_tp2.22/input/switch delete mode 100644 regtests/ww3_tp2.22/input/switch_PR1 delete mode 100644 regtests/ww3_tp2.22/input/switch_PR1_MPI delete mode 100644 regtests/ww3_tp2.22/input/switch_PR2_UNO delete mode 100644 regtests/ww3_tp2.22/input/switch_PR2_UNO_MPI delete mode 100644 regtests/ww3_tp2.22/input/switch_PR2_UQ delete mode 100644 regtests/ww3_tp2.22/input/switch_PR2_UQ_MPI delete mode 100644 regtests/ww3_tp2.22/input/switch_PR2_UQ_NC4_MPI delete mode 100644 regtests/ww3_tp2.22/input/switch_PR3_UNO delete mode 100644 regtests/ww3_tp2.22/input/switch_PR3_UNO_MPI delete mode 100644 regtests/ww3_tp2.22/input/switch_PR3_UQ delete mode 100644 regtests/ww3_tp2.22/input/ww3_grid.nml delete mode 100644 regtests/ww3_tp2.22/input/ww3_grid_nocmpr.inp delete mode 100644 regtests/ww3_tp2.22/input/ww3_grid_nocmpr.nml diff --git a/regtests/ww3_tp2.22/input/switch b/regtests/ww3_tp2.22/input/switch deleted file mode 100644 index 9a795bd35..000000000 --- a/regtests/ww3_tp2.22/input/switch +++ /dev/null @@ -1 +0,0 @@ -NOGRB SHRD PR3 UQ FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR1 b/regtests/ww3_tp2.22/input/switch_PR1 deleted file mode 100644 index ca2e4ceb1..000000000 --- a/regtests/ww3_tp2.22/input/switch_PR1 +++ /dev/null @@ -1 +0,0 @@ -NOGRB SHRD PR1 FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR1_MPI b/regtests/ww3_tp2.22/input/switch_PR1_MPI deleted file mode 100644 index bc7a812fe..000000000 --- a/regtests/ww3_tp2.22/input/switch_PR1_MPI +++ /dev/null @@ -1 +0,0 @@ -NOGRB DIST MPI PR1 FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR2_UNO b/regtests/ww3_tp2.22/input/switch_PR2_UNO deleted file mode 100644 index 69bb8a2f8..000000000 --- a/regtests/ww3_tp2.22/input/switch_PR2_UNO +++ /dev/null @@ -1 +0,0 @@ -NOGRB SHRD PR2 UNO FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR2_UNO_MPI b/regtests/ww3_tp2.22/input/switch_PR2_UNO_MPI deleted file mode 100644 index 489a84f90..000000000 --- a/regtests/ww3_tp2.22/input/switch_PR2_UNO_MPI +++ /dev/null @@ -1 +0,0 @@ -NOGRB DIST MPI PR2 UNO FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR2_UQ b/regtests/ww3_tp2.22/input/switch_PR2_UQ deleted file mode 100644 index ebf7cf190..000000000 --- a/regtests/ww3_tp2.22/input/switch_PR2_UQ +++ /dev/null @@ -1 +0,0 @@ -NOGRB SHRD PR2 UQ FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR2_UQ_MPI b/regtests/ww3_tp2.22/input/switch_PR2_UQ_MPI deleted file mode 100644 index 32cfed954..000000000 --- a/regtests/ww3_tp2.22/input/switch_PR2_UQ_MPI +++ /dev/null @@ -1 +0,0 @@ -NOGRB DIST MPI PR2 UQ FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR2_UQ_NC4_MPI b/regtests/ww3_tp2.22/input/switch_PR2_UQ_NC4_MPI deleted file mode 100644 index 32cfed954..000000000 --- a/regtests/ww3_tp2.22/input/switch_PR2_UQ_NC4_MPI +++ /dev/null @@ -1 +0,0 @@ -NOGRB DIST MPI PR2 UQ FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR3_UNO b/regtests/ww3_tp2.22/input/switch_PR3_UNO deleted file mode 100644 index 8baffa623..000000000 --- a/regtests/ww3_tp2.22/input/switch_PR3_UNO +++ /dev/null @@ -1 +0,0 @@ -NOGRB SHRD PR3 UNO FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR3_UNO_MPI b/regtests/ww3_tp2.22/input/switch_PR3_UNO_MPI deleted file mode 100644 index 35ca7863d..000000000 --- a/regtests/ww3_tp2.22/input/switch_PR3_UNO_MPI +++ /dev/null @@ -1 +0,0 @@ -NOGRB DIST MPI PR3 UNO FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/switch_PR3_UQ b/regtests/ww3_tp2.22/input/switch_PR3_UQ deleted file mode 100644 index 9a795bd35..000000000 --- a/regtests/ww3_tp2.22/input/switch_PR3_UQ +++ /dev/null @@ -1 +0,0 @@ -NOGRB SHRD PR3 UQ FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 diff --git a/regtests/ww3_tp2.22/input/ww3_grid.inp b/regtests/ww3_tp2.22/input/ww3_grid.inp index aec6060e9..4b04a1022 100644 --- a/regtests/ww3_tp2.22/input/ww3_grid.inp +++ b/regtests/ww3_tp2.22/input/ww3_grid.inp @@ -1,6 +1,6 @@ $ WAVEWATCH III Grid preprocessor input file $ ------------------------------------------ - '2-D PROPAGATION AROUND GLOBE ' + '2-D PROP. AROUND GLOBE WITH LANGMUIR MIXING PARAMETERIZATION' $ 1.1 0.040 9 24 0. $ @@ -11,7 +11,7 @@ $ &PRO2 DTIME = 0. / &PRO2 DTIME = 345600. / $ &PRO3 WDTHCG = 0., WDTHTH = 0. / &PRO3 WDTHCG = 1.50, WDTHTH =1.50 / - &OUTS E3D = 1 / + &OUTS E3D = 1 / &LMPN LMPENABLED = T, SDTAIL = T, HSLMODE = 0 / END OF NAMELISTS $ diff --git a/regtests/ww3_tp2.22/input/ww3_grid.nml b/regtests/ww3_tp2.22/input/ww3_grid.nml deleted file mode 100644 index 2a10b4424..000000000 --- a/regtests/ww3_tp2.22/input/ww3_grid.nml +++ /dev/null @@ -1,83 +0,0 @@ -! -------------------------------------------------------------------- ! -! WAVEWATCH III - ww3_grid.nml - Grid pre-processing ! -! -------------------------------------------------------------------- ! - -! -------------------------------------------------------------------- ! -! Define the spectrum parameterization via SPECTRUM_NML namelist -! -------------------------------------------------------------------- ! -&SPECTRUM_NML - SPECTRUM%XFR = 1.1 - SPECTRUM%FREQ1 = 0.040 - SPECTRUM%NK = 9 - SPECTRUM%NTH = 24 -/ - -! -------------------------------------------------------------------- ! -! Define the run parameterization via RUN_NML namelist -! -------------------------------------------------------------------- ! -&RUN_NML - RUN%FLCX = T - RUN%FLCY = T - RUN%FLCTH = T -/ - -! -------------------------------------------------------------------- ! -! Define the timesteps parameterization via TIMESTEPS_NML namelist -! -------------------------------------------------------------------- ! -&TIMESTEPS_NML - TIMESTEPS%DTMAX = 2200. - TIMESTEPS%DTXY = 2200. - TIMESTEPS%DTKTH = 2200. - TIMESTEPS%DTMIN = 2200. -/ - -! -------------------------------------------------------------------- ! -! Define the grid to preprocess via GRID_NML namelist -! -------------------------------------------------------------------- ! -&GRID_NML - GRID%NAME = '2-D PROPAGATION AROUND GLOBE' - GRID%NML = '../input/namelists_2-D.nml' - GRID%TYPE = 'RECT' - GRID%COORD = 'SPHE' - GRID%CLOS = 'NONE' - GRID%ZLIM = -5. - GRID%DMIN = 5.75 -/ - -! -------------------------------------------------------------------- ! -! Define the rectilinear grid type via RECT_NML namelist -! -------------------------------------------------------------------- ! -&RECT_NML - RECT%NX = 193 - RECT%NY = 93 - RECT%SX = 1. - RECT%SY = 1. - RECT%X0 = -6. - RECT%Y0 = -46. -/ - -! -------------------------------------------------------------------- ! -! Define the depth to preprocess via DEPTH_NML namelist -! -------------------------------------------------------------------- ! -&DEPTH_NML - DEPTH%SF = -2500. - DEPTH%FILENAME = '../input/2-D.depth' - DEPTH%IDLA = 2 -/ - -! -------------------------------------------------------------------- ! -! Define the output boundary points via OUTBND_COUNT_NML and -! OUTBND_LINE_NML namelist -! -------------------------------------------------------------------- ! -&OUTBND_COUNT_NML - OUTBND_COUNT%N_LINE = 2 -/ - -&OUTBND_LINE_NML - OUTBND_LINE(1) = 0. -40. 0.5 0.866 100 - OUTBND_LINE(2) = 0. 40. 0.5 -0.866 -100 -/ - -! -------------------------------------------------------------------- ! -! WAVEWATCH III - end of namelist ! -! -------------------------------------------------------------------- ! diff --git a/regtests/ww3_tp2.22/input/ww3_grid_nocmpr.inp b/regtests/ww3_tp2.22/input/ww3_grid_nocmpr.inp deleted file mode 100644 index 4936ff3f7..000000000 --- a/regtests/ww3_tp2.22/input/ww3_grid_nocmpr.inp +++ /dev/null @@ -1,35 +0,0 @@ -$ WAVEWATCH III Grid preprocessor input file -$ ------------------------------------------ - '2-D PROPAGATION AROUND GLOBE ' -$ - 1.1 0.040 9 24 0. -$ - F T T T F F - 2200. 2200. 2200. 2200. -$ -$ &PRO2 DTIME = 0. / - &PRO2 DTIME = 345600. / -$ &PRO3 WDTHCG = 0., WDTHTH = 0. / - &PRO3 WDTHCG = 1.50, WDTHTH =1.50 / - &OUTS E3D = 1 / - &MISC TRCKCMPR = F / -END OF NAMELISTS -$ - 'RECT' T 'NONE' - 193 93 - 1. 1. 1. - -6. -46. 1. -$ - -5. 5.75 10 -2500. 2 1 '(....)' 'UNIT' 'input' -$ - 17949*1 -$ - 10 1 1 '(....)' 'PART' 'input' -$ - 0 0 F - 0 0 F - 0 0 -$ - 0. -40. 0.5 0.866 100 - 0. 40. 0.5 -0.866 -100 - 0. 0. 0. 0. 0 diff --git a/regtests/ww3_tp2.22/input/ww3_grid_nocmpr.nml b/regtests/ww3_tp2.22/input/ww3_grid_nocmpr.nml deleted file mode 100644 index 11c07ad3c..000000000 --- a/regtests/ww3_tp2.22/input/ww3_grid_nocmpr.nml +++ /dev/null @@ -1,83 +0,0 @@ -! -------------------------------------------------------------------- ! -! WAVEWATCH III - ww3_grid.nml - Grid pre-processing ! -! -------------------------------------------------------------------- ! - -! -------------------------------------------------------------------- ! -! Define the spectrum parameterization via SPECTRUM_NML namelist -! -------------------------------------------------------------------- ! -&SPECTRUM_NML - SPECTRUM%XFR = 1.1 - SPECTRUM%FREQ1 = 0.040 - SPECTRUM%NK = 9 - SPECTRUM%NTH = 24 -/ - -! -------------------------------------------------------------------- ! -! Define the run parameterization via RUN_NML namelist -! -------------------------------------------------------------------- ! -&RUN_NML - RUN%FLCX = T - RUN%FLCY = T - RUN%FLCTH = T -/ - -! -------------------------------------------------------------------- ! -! Define the timesteps parameterization via TIMESTEPS_NML namelist -! -------------------------------------------------------------------- ! -&TIMESTEPS_NML - TIMESTEPS%DTMAX = 2200. - TIMESTEPS%DTXY = 2200. - TIMESTEPS%DTKTH = 2200. - TIMESTEPS%DTMIN = 2200. -/ - -! -------------------------------------------------------------------- ! -! Define the grid to preprocess via GRID_NML namelist -! -------------------------------------------------------------------- ! -&GRID_NML - GRID%NAME = '2-D PROPAGATION AROUND GLOBE' - GRID%NML = '../input/namelists_nocmpr.nml' - GRID%TYPE = 'RECT' - GRID%COORD = 'SPHE' - GRID%CLOS = 'NONE' - GRID%ZLIM = -5. - GRID%DMIN = 5.75 -/ - -! -------------------------------------------------------------------- ! -! Define the rectilinear grid type via RECT_NML namelist -! -------------------------------------------------------------------- ! -&RECT_NML - RECT%NX = 193 - RECT%NY = 93 - RECT%SX = 1. - RECT%SY = 1. - RECT%X0 = -6. - RECT%Y0 = -46. -/ - -! -------------------------------------------------------------------- ! -! Define the depth to preprocess via DEPTH_NML namelist -! -------------------------------------------------------------------- ! -&DEPTH_NML - DEPTH%SF = -2500. - DEPTH%FILENAME = '../input/nocmpr.depth' - DEPTH%IDLA = 2 -/ - -! -------------------------------------------------------------------- ! -! Define the output boundary points via OUTBND_COUNT_NML and -! OUTBND_LINE_NML namelist -! -------------------------------------------------------------------- ! -&OUTBND_COUNT_NML - OUTBND_COUNT%N_LINE = 2 -/ - -&OUTBND_LINE_NML - OUTBND_LINE(1) = 0. -40. 0.5 0.866 100 - OUTBND_LINE(2) = 0. 40. 0.5 -0.866 -100 -/ - -! -------------------------------------------------------------------- ! -! WAVEWATCH III - end of namelist ! -! -------------------------------------------------------------------- ! From 7f29db688328f8f746377d2c63ebae733786f29e Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Thu, 21 Sep 2023 19:08:40 -0600 Subject: [PATCH 12/63] convert HSLMODE to an integer --- model/src/w3gdatmd.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/src/w3gdatmd.F90 b/model/src/w3gdatmd.F90 index 1e0a171ca..add5db979 100644 --- a/model/src/w3gdatmd.F90 +++ b/model/src/w3gdatmd.F90 @@ -730,7 +730,7 @@ MODULE W3GDATMD #endif LOGICAL :: LMPENABLED ! flag to enable Li et al. Langmuir parameterization LOGICAL :: SDTAIL ! flag to enable high-freq tail in Li et al. Stokes Drift computations - REAL :: HSLMODE ! 0 for test (HSL=10m everywhere, 1 for coupler-based HSL) + INTEGER :: HSLMODE ! 0 for test (HSL=10m everywhere, 1 for coupler-based HSL) ! ! unstructured data ! @@ -1089,7 +1089,7 @@ MODULE W3GDATMD ! LOGICAL, POINTER :: LMPENABLED LOGICAL, POINTER :: SDTAIL - REAL, POINTER :: HSLMODE + INTEGER, POINTER :: HSLMODE ! ! Variables for unstructured grids ! From f79e1565957fdd80f61b1cffb38329ea2472f843 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Fri, 20 Oct 2023 20:35:27 +0000 Subject: [PATCH 13/63] ww3_tp2.22/info: update for Stokes drift output variables. --- regtests/ww3_tp2.22/info | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/regtests/ww3_tp2.22/info b/regtests/ww3_tp2.22/info index 576995848..7ebea70ff 100644 --- a/regtests/ww3_tp2.22/info +++ b/regtests/ww3_tp2.22/info @@ -40,6 +40,10 @@ # + switch_PR2_UQ_MPI # # + switch_PR3_UNO_MPI # # + switch_PR3_UQ_MPI # +# - Test case output: +# * USSX/USSY: surface Stokes drift +# * USSHX/USSHX: surface layer averaged Stokes drift +# # # # Sample run_test commands : # # (Note: mpirun commands differ by local system) # From 5b1a73afac53a1cb2d5494caa14ef16039577f98 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Wed, 25 Oct 2023 15:34:14 +0000 Subject: [PATCH 14/63] ww3_grid.inp: addresses clean up request for commented out code --- regtests/ww3_tp2.22/input/ww3_grid.inp | 2 -- 1 file changed, 2 deletions(-) diff --git a/regtests/ww3_tp2.22/input/ww3_grid.inp b/regtests/ww3_tp2.22/input/ww3_grid.inp index 4b04a1022..9cdf683fe 100644 --- a/regtests/ww3_tp2.22/input/ww3_grid.inp +++ b/regtests/ww3_tp2.22/input/ww3_grid.inp @@ -7,9 +7,7 @@ $ F T T T F F 2200. 2200. 2200. 2200. $ -$ &PRO2 DTIME = 0. / &PRO2 DTIME = 345600. / -$ &PRO3 WDTHCG = 0., WDTHTH = 0. / &PRO3 WDTHCG = 1.50, WDTHTH =1.50 / &OUTS E3D = 1 / &LMPN LMPENABLED = T, SDTAIL = T, HSLMODE = 0 / From 8e7d8b2cdcd5c3fb01f9476c2c42881cdcb777d3 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Wed, 25 Oct 2023 21:37:54 +0000 Subject: [PATCH 15/63] ww3_tp2.22: *.nml removed --- regtests/ww3_tp2.22/input/namelists_2-D.nml | 4 -- .../ww3_tp2.22/input/namelists_nocmpr.nml | 5 -- regtests/ww3_tp2.22/input/ww3_multi.nml | 57 --------------- regtests/ww3_tp2.22/input/ww3_ounf.nml | 27 ------- regtests/ww3_tp2.22/input/ww3_ounp.nml | 46 ------------ regtests/ww3_tp2.22/input/ww3_shel.nml | 72 ------------------- regtests/ww3_tp2.22/input/ww3_trnc.nml | 21 ------ 7 files changed, 232 deletions(-) delete mode 100644 regtests/ww3_tp2.22/input/namelists_2-D.nml delete mode 100644 regtests/ww3_tp2.22/input/namelists_nocmpr.nml delete mode 100644 regtests/ww3_tp2.22/input/ww3_multi.nml delete mode 100644 regtests/ww3_tp2.22/input/ww3_ounf.nml delete mode 100644 regtests/ww3_tp2.22/input/ww3_ounp.nml delete mode 100644 regtests/ww3_tp2.22/input/ww3_shel.nml delete mode 100644 regtests/ww3_tp2.22/input/ww3_trnc.nml diff --git a/regtests/ww3_tp2.22/input/namelists_2-D.nml b/regtests/ww3_tp2.22/input/namelists_2-D.nml deleted file mode 100644 index 8abfad12c..000000000 --- a/regtests/ww3_tp2.22/input/namelists_2-D.nml +++ /dev/null @@ -1,4 +0,0 @@ -&PRO2 DTIME = 345600. / -&PRO3 WDTHCG = 1.50, WDTHTH =1.50 / -&OUTS E3D = 1 / -END OF NAMELISTS diff --git a/regtests/ww3_tp2.22/input/namelists_nocmpr.nml b/regtests/ww3_tp2.22/input/namelists_nocmpr.nml deleted file mode 100644 index 9545826d2..000000000 --- a/regtests/ww3_tp2.22/input/namelists_nocmpr.nml +++ /dev/null @@ -1,5 +0,0 @@ -&PRO2 DTIME = 345600. / -&PRO3 WDTHCG = 1.50, WDTHTH =1.50 / -&OUTS E3D = 1 / -&MISC TRCKCMPR = F / -END OF NAMELISTS diff --git a/regtests/ww3_tp2.22/input/ww3_multi.nml b/regtests/ww3_tp2.22/input/ww3_multi.nml deleted file mode 100644 index 95c0f379c..000000000 --- a/regtests/ww3_tp2.22/input/ww3_multi.nml +++ /dev/null @@ -1,57 +0,0 @@ -! -------------------------------------------------------------------- ! -! WAVEWATCH III ww3_multi.nml - multi-grid model ! -! -------------------------------------------------------------------- ! - - -! -------------------------------------------------------------------- ! -! Define top-level model parameters via DOMAIN_NML namelist -! -------------------------------------------------------------------- ! -&DOMAIN_NML - DOMAIN%FLGHG1 = T - DOMAIN%FLGHG2 = T - DOMAIN%STOP = '19680618 000000' -/ - -! -------------------------------------------------------------------- ! -! Define each input grid via the INPUT_GRID_NML namelist -! -------------------------------------------------------------------- ! -&INPUT_GRID_NML -/ - -! -------------------------------------------------------------------- ! -! Define each model grid via the MODEL_GRID_NML namelist -! -------------------------------------------------------------------- ! -&MODEL_GRID_NML - MODEL(1)%NAME = 'ww3' -/ - -! -------------------------------------------------------------------- ! -! Define the output types point parameters via OUTPUT_TYPE_NML namelist -! -------------------------------------------------------------------- ! -&OUTPUT_TYPE_NML - ALLTYPE%FIELD%LIST = 'HS T0M1 DIR SPR' - ALLTYPE%POINT%FILE = '../input/points.list' -/ - -! -------------------------------------------------------------------- ! -! Define output dates via OUTPUT_DATE_NML namelist -! -------------------------------------------------------------------- ! -&OUTPUT_DATE_NML - ALLDATE%FIELD = '19680606 000000' '86400' '19680618 000000' - ALLDATE%POINT = '19680606 000000' '21600' '19680618 000000' - ALLDATE%TRACK = '19680606 000000' '3600' '19680618 000000' - ALLDATE%BOUNDARY = '19680606 000000' '3600' '19680618 000000' -/ - -! -------------------------------------------------------------------- ! -! Define homogeneous input via HOMOG_COUNT_NML and HOMOG_INPUT_NML namelist -! -------------------------------------------------------------------- ! -&HOMOG_COUNT_NML -/ - -&HOMOG_INPUT_NML -/ - -! -------------------------------------------------------------------- ! -! WAVEWATCH III - end of namelist ! -! -------------------------------------------------------------------- ! diff --git a/regtests/ww3_tp2.22/input/ww3_ounf.nml b/regtests/ww3_tp2.22/input/ww3_ounf.nml deleted file mode 100644 index 44db63521..000000000 --- a/regtests/ww3_tp2.22/input/ww3_ounf.nml +++ /dev/null @@ -1,27 +0,0 @@ -! -------------------------------------------------------------------- ! -! WAVEWATCH III ww3_ounf.nml - Grid output post-processing ! -! -------------------------------------------------------------------- ! - -! -------------------------------------------------------------------- ! -! Define the output fields to postprocess via FIELD_NML namelist -! -------------------------------------------------------------------- ! -&FIELD_NML - FIELD%TIMESTART = '19680606 000000' - FIELD%TIMESTRIDE = '10800.' - FIELD%TIMECOUNT = '100' - FIELD%LIST = 'HS T01 DIR SPR' - FIELD%PARTITION = '0 1 2' - FIELD%TYPE = 4 -/ - -! -------------------------------------------------------------------- ! -! Define the content of the output file via FILE_NML namelist -! -------------------------------------------------------------------- ! -&FILE_NML - FILE%IXN = 100000 - FILE%IYN = 100000 -/ - -! -------------------------------------------------------------------- ! -! WAVEWATCH III - end of namelist ! -! -------------------------------------------------------------------- ! diff --git a/regtests/ww3_tp2.22/input/ww3_ounp.nml b/regtests/ww3_tp2.22/input/ww3_ounp.nml deleted file mode 100644 index 29fa1897d..000000000 --- a/regtests/ww3_tp2.22/input/ww3_ounp.nml +++ /dev/null @@ -1,46 +0,0 @@ -! -------------------------------------------------------------------- ! -! WAVEWATCH III ww3_ounp.nml - Point output post-processing ! -! -------------------------------------------------------------------- ! - -! -------------------------------------------------------------------- ! -! Define the output fields to postprocess via POINT_NML namelist -! -------------------------------------------------------------------- ! -&POINT_NML - POINT%TIMESTART = '19680606 000000' - POINT%TIMESTRIDE = '21600.' - POINT%TIMECOUNT = '1000' - POINT%LIST = '1 2 3' -/ - -! -------------------------------------------------------------------- ! -! Define the content of the output file via FILE_NML namelist -! -------------------------------------------------------------------- ! -&FILE_NML -/ - -! -------------------------------------------------------------------- ! -! Define the type 0, inventory of file -! -------------------------------------------------------------------- ! - - -! -------------------------------------------------------------------- ! -! Define the type 1, spectra via SPECTRA_NML namelist -! -------------------------------------------------------------------- ! -&SPECTRA_NML -/ - -! -------------------------------------------------------------------- ! -! Define the type 2, mean parameter via PARAM_NML namelist -! -------------------------------------------------------------------- ! -&PARAM_NML -/ - -! -------------------------------------------------------------------- ! -! Define the type 3, source terms via SOURCE_NML namelist -! -------------------------------------------------------------------- ! -&SOURCE_NML -/ - -! -------------------------------------------------------------------- ! -! WAVEWATCH III - end of namelist ! -! -------------------------------------------------------------------- ! diff --git a/regtests/ww3_tp2.22/input/ww3_shel.nml b/regtests/ww3_tp2.22/input/ww3_shel.nml deleted file mode 100644 index 578f05f93..000000000 --- a/regtests/ww3_tp2.22/input/ww3_shel.nml +++ /dev/null @@ -1,72 +0,0 @@ -! -------------------------------------------------------------------- ! -! WAVEWATCH III ww3_shel.nml - single-grid model ! -! -------------------------------------------------------------------- ! - - -! -------------------------------------------------------------------- ! -! Define top-level model parameters via DOMAIN_NML namelist -! -------------------------------------------------------------------- ! -&DOMAIN_NML - DOMAIN%STOP = '19680606 120000' -/ - -! -------------------------------------------------------------------- ! -! Define each forcing via the INPUT_NML namelist -! -------------------------------------------------------------------- ! -&INPUT_NML - INPUT%FORCING%CURRENTS = 'H' - INPUT%FORCING%WINDS = 'H' -/ - -! -------------------------------------------------------------------- ! -! Define the output types point parameters via OUTPUT_TYPE_NML namelist -! -------------------------------------------------------------------- ! -&OUTPUT_TYPE_NML - TYPE%FIELD%LIST = 'HS EF T01 DIR SPR' - TYPE%POINT%FILE = '../input/points.list' -/ - -! -------------------------------------------------------------------- ! -! Define output dates via OUTPUT_DATE_NML namelist -! -------------------------------------------------------------------- ! -&OUTPUT_DATE_NML - DATE%FIELD = '19680606 000000' '10800' '19680608 000000' - DATE%POINT = '19680606 000000' '21600' '19680608 000000' - DATE%TRACK = '19680606 000000' '14400' '19680608 000000' -/ - -! -------------------------------------------------------------------- ! -! Define homogeneous input via HOMOG_COUNT_NML and HOMOG_INPUT_NML namelist -! -------------------------------------------------------------------- ! -&HOMOG_COUNT_NML - HOMOG_COUNT%N_CUR = 1 - HOMOG_COUNT%N_WND = 3 -/ - -&HOMOG_INPUT_NML - HOMOG_INPUT(1)%NAME = 'CUR' - HOMOG_INPUT(1)%DATE = '19680606 030000' - HOMOG_INPUT(1)%VALUE1 = 2.0 - HOMOG_INPUT(1)%VALUE2 = 45. - - HOMOG_INPUT(2)%NAME = 'WND' - HOMOG_INPUT(2)%VALUE1 = 20.0 - HOMOG_INPUT(2)%VALUE2 = 180. - HOMOG_INPUT(2)%VALUE3 = 2. - - HOMOG_INPUT(3)%NAME = 'WND' - HOMOG_INPUT(3)%DATE = '19680606 040000' - HOMOG_INPUT(3)%VALUE1 = 15.0 - HOMOG_INPUT(3)%VALUE2 = 130. - HOMOG_INPUT(3)%VALUE3 = 1. - - HOMOG_INPUT(4)%NAME = 'WND' - HOMOG_INPUT(4)%DATE = '19680606 080000' - HOMOG_INPUT(4)%VALUE1 = 25.0 - HOMOG_INPUT(4)%VALUE2 = 90. - HOMOG_INPUT(4)%VALUE3 = 3. -/ - -! -------------------------------------------------------------------- ! -! WAVEWATCH III - end of namelist ! -! -------------------------------------------------------------------- ! diff --git a/regtests/ww3_tp2.22/input/ww3_trnc.nml b/regtests/ww3_tp2.22/input/ww3_trnc.nml deleted file mode 100644 index e4ae8ceab..000000000 --- a/regtests/ww3_tp2.22/input/ww3_trnc.nml +++ /dev/null @@ -1,21 +0,0 @@ -! -------------------------------------------------------------------- ! -! WAVEWATCH III ww3_trnc.nml - Track output post-processing ! -! -------------------------------------------------------------------- ! - -! -------------------------------------------------------------------- ! -! Define the output fields to postprocess via TRACK_NML namelist -! -------------------------------------------------------------------- ! -&TRACK_NML - TRACK%TIMESTART = '19680606 000000' - TRACK%TIMESTRIDE = '3600.' -/ - -! -------------------------------------------------------------------- ! -! Define the content of the input file via FILE_NML namelist -! -------------------------------------------------------------------- ! -&FILE_NML -/ - -! -------------------------------------------------------------------- ! -! WAVEWATCH III - end of namelist ! -! -------------------------------------------------------------------- ! From dd89cfe7e7be7cbfc6abbebc3b901cd6e26f9faf Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Wed, 25 Oct 2023 21:39:17 +0000 Subject: [PATCH 16/63] ww3_tp2.22: removed ww3_multi.inp --- regtests/ww3_tp2.22/input/ww3_multi.inp | 31 ------------------------- 1 file changed, 31 deletions(-) delete mode 100644 regtests/ww3_tp2.22/input/ww3_multi.inp diff --git a/regtests/ww3_tp2.22/input/ww3_multi.inp b/regtests/ww3_tp2.22/input/ww3_multi.inp deleted file mode 100644 index 4d5d699e6..000000000 --- a/regtests/ww3_tp2.22/input/ww3_multi.inp +++ /dev/null @@ -1,31 +0,0 @@ -$ WAVEWATCH III multi-scale input file -$ ------------------------------ - 1 0 F 1 F F -$ - 'ww3' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 1 1 0.00 1.00 F -$ - 19680606 000000 19680618 000000 -$ - T T -$ - 19680606 000000 86400 19680618 000000 -$ - N - HS T0M1 DIR SPR -$ - 19680606 000000 21600 19680618 000000 - 0.0 0.0 'LEFT' - 90.0 0.0 'CENTER' - 180.0 0.0 'RIGHT' - 0.0 0.0 'STOPSTRING' - 19680606 000000 3600 19680618 000000 - T - 19680612 000000 0 19680612 000000 - 19680606 000000 3600 19680618 000000 - 19680612 000000 0 19680612 000000 -$ - 'the_end' 0 -$ - 'STP' -$ -$ End of input file From 63ac370aa8efe3e5e3560acdb393600a9080ebee Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Wed, 25 Oct 2023 21:47:31 +0000 Subject: [PATCH 17/63] ww3_tp2.22: removed - nocmpr.depth, points.list. dont believe they are necessary --- regtests/ww3_tp2.22/input/nocmpr.depth | 1 - regtests/ww3_tp2.22/input/points.list | 3 --- 2 files changed, 4 deletions(-) delete mode 100644 regtests/ww3_tp2.22/input/nocmpr.depth delete mode 100644 regtests/ww3_tp2.22/input/points.list diff --git a/regtests/ww3_tp2.22/input/nocmpr.depth b/regtests/ww3_tp2.22/input/nocmpr.depth deleted file mode 100644 index e3dcb6b06..000000000 --- a/regtests/ww3_tp2.22/input/nocmpr.depth +++ /dev/null @@ -1 +0,0 @@ -17949*1 diff --git a/regtests/ww3_tp2.22/input/points.list b/regtests/ww3_tp2.22/input/points.list deleted file mode 100644 index 30197c2ef..000000000 --- a/regtests/ww3_tp2.22/input/points.list +++ /dev/null @@ -1,3 +0,0 @@ -0.0 0.0 'LEFT' -90.0 0.0 'CENTER' -180.0 0.0 'RIGHT' From 0a9e5471a6ed9d7f34bcd5f3014ca56a5becced6 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Wed, 25 Oct 2023 21:49:31 +0000 Subject: [PATCH 18/63] ww3_tp2.22: removed - 2-D.depth. dont believe it is necessary. --- regtests/ww3_tp2.22/input/2-D.depth | 1 - 1 file changed, 1 deletion(-) delete mode 100644 regtests/ww3_tp2.22/input/2-D.depth diff --git a/regtests/ww3_tp2.22/input/2-D.depth b/regtests/ww3_tp2.22/input/2-D.depth deleted file mode 100644 index e3dcb6b06..000000000 --- a/regtests/ww3_tp2.22/input/2-D.depth +++ /dev/null @@ -1 +0,0 @@ -17949*1 From 670d1f22ec2c79ac76ec2e4af9c7040657d50bba Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Wed, 25 Oct 2023 21:50:42 +0000 Subject: [PATCH 19/63] ww3_tp2.22: removed ww3_trck.inp, ww3_trnc.inp. dont believe they are necessary. --- regtests/ww3_tp2.22/input/ww3_trck.inp | 11 ----------- regtests/ww3_tp2.22/input/ww3_trnc.inp | 20 -------------------- 2 files changed, 31 deletions(-) delete mode 100755 regtests/ww3_tp2.22/input/ww3_trck.inp delete mode 100755 regtests/ww3_tp2.22/input/ww3_trnc.inp diff --git a/regtests/ww3_tp2.22/input/ww3_trck.inp b/regtests/ww3_tp2.22/input/ww3_trck.inp deleted file mode 100755 index 6610b6085..000000000 --- a/regtests/ww3_tp2.22/input/ww3_trck.inp +++ /dev/null @@ -1,11 +0,0 @@ -$ -------------------------------------------------------------------- $ -$ WAVEWATCH III Track output post-processing $ -$--------------------------------------------------------------------- $ -$ The number of wavenumbers and directions need to be read in as they -$ determine the record length of the data file -$ - 9 24 -$ -$ -------------------------------------------------------------------- $ -$ End of input file $ -$ -------------------------------------------------------------------- $ diff --git a/regtests/ww3_tp2.22/input/ww3_trnc.inp b/regtests/ww3_tp2.22/input/ww3_trnc.inp deleted file mode 100755 index df60800b8..000000000 --- a/regtests/ww3_tp2.22/input/ww3_trnc.inp +++ /dev/null @@ -1,20 +0,0 @@ -$ -------------------------------------------------------------------- $ -$ WAVEWATCH III Track output post-processing $ -$--------------------------------------------------------------------- $ -$ First output time (yyyymmdd hhmmss), increment of output (s), -$ and number of output times. -$ - 19680606 000000 3600. 100000 -$ -$ Output type -------------------------------------------------------- $ -$ netCDF version [3,4] -$ file prefix -$ number of characters in date [4(yearly),6(monthly),8(daily),10(hourly)] -$ - 3 - ww3. - 6 -$ -$ -------------------------------------------------------------------- $ -$ End of input file $ -$ -------------------------------------------------------------------- $ From 3f55d26920565bdea3885abca415a2736a6840b7 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Fri, 27 Oct 2023 15:25:04 +0000 Subject: [PATCH 20/63] ww3_grid.inp: update desc string --- regtests/ww3_tp2.22/input/ww3_grid.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regtests/ww3_tp2.22/input/ww3_grid.inp b/regtests/ww3_tp2.22/input/ww3_grid.inp index 9cdf683fe..e021a094a 100644 --- a/regtests/ww3_tp2.22/input/ww3_grid.inp +++ b/regtests/ww3_tp2.22/input/ww3_grid.inp @@ -1,6 +1,6 @@ $ WAVEWATCH III Grid preprocessor input file $ ------------------------------------------ - '2-D PROP. AROUND GLOBE WITH LANGMUIR MIXING PARAMETERIZATION' + 'LANGMUIR MIXING PARAMETERIZATION FOR 2-D PROP. AROUND GLOBE' $ 1.1 0.040 9 24 0. $ From 0bb8e11f9d522555f61b01f3d9efa68a18ef1a50 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Fri, 27 Oct 2023 15:59:02 +0000 Subject: [PATCH 21/63] ww3_shel.inp: add output request for USSX/Y --- regtests/ww3_tp2.22/input/ww3_shel.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regtests/ww3_tp2.22/input/ww3_shel.inp b/regtests/ww3_tp2.22/input/ww3_shel.inp index aba7af3e4..64232ed6a 100644 --- a/regtests/ww3_tp2.22/input/ww3_shel.inp +++ b/regtests/ww3_tp2.22/input/ww3_shel.inp @@ -18,7 +18,7 @@ $ 19680606 000000 10800 19680608 000000 $ N - HS EF T01 DIR SPR + HS EF T01 DIR SPR USSX USSY $ 19680606 000000 21600 19680608 000000 0.0 0.0 'LEFT' From 86873adbb20061b930f8d28fadaa22bdd6ff1c2a Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Fri, 27 Oct 2023 17:18:50 +0000 Subject: [PATCH 22/63] ww3_tp2.22: *.inp updates for USSX/Y --- regtests/ww3_tp2.22/input/gx_outf.inp | 3 +-- regtests/ww3_tp2.22/input/ww3_ounf.inp | 6 +++--- regtests/ww3_tp2.22/input/ww3_outf.inp | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/regtests/ww3_tp2.22/input/gx_outf.inp b/regtests/ww3_tp2.22/input/gx_outf.inp index 770759ae9..719869826 100644 --- a/regtests/ww3_tp2.22/input/gx_outf.inp +++ b/regtests/ww3_tp2.22/input/gx_outf.inp @@ -5,7 +5,6 @@ $ F F F F F T F F T F F F F F F F F F F F F F F F F F F F F F F F $ N - HS T01 DIR SPR + HS T01 DIR SPR USSX USSY $ 1 193 1 93 T T - diff --git a/regtests/ww3_tp2.22/input/ww3_ounf.inp b/regtests/ww3_tp2.22/input/ww3_ounf.inp index 1d901574c..1c7078ab5 100644 --- a/regtests/ww3_tp2.22/input/ww3_ounf.inp +++ b/regtests/ww3_tp2.22/input/ww3_ounf.inp @@ -1,7 +1,7 @@ $ -------------------------------------------------------------------- $ $ WAVEWATCH III Grid output post-processing $ $--------------------------------------------------------------------- $ -$ First output time (yyyymmdd hhmmss), increment of output (s), +$ First output time (yyyymmdd hhmmss), increment of output (s), $ and number of output times. $ 19680606 000000 10800. 100 @@ -13,13 +13,13 @@ $ file for a full documentation of field output options. Namelist type $ selection is used here (for alternative F/T flags, see ww3_shel.inp). $ N - HS T01 DIR SPR + HS T01 DIR SPR USSX USSY $ $--------------------------------------------------------------------- $ $ netCDF version [3,4] $ and variable type 4 [2 = SHORT, 3 = it depends , 4 = REAL] $ swell partitions [0 1 2 3 4 5] -$ variables in same file [T] or not [F] +$ variables in same file [T] or not [F] $ 3 4 0 1 2 diff --git a/regtests/ww3_tp2.22/input/ww3_outf.inp b/regtests/ww3_tp2.22/input/ww3_outf.inp index 4b062a870..d7d17f0df 100644 --- a/regtests/ww3_tp2.22/input/ww3_outf.inp +++ b/regtests/ww3_tp2.22/input/ww3_outf.inp @@ -3,7 +3,7 @@ $ ----------------------------------------- 19680612 000000 518400. 2 $ N - HS T01 DIR SPR + HS T01 DIR SPR USSX USSY $ 1 0 $ From 500f6a49f0edb3f7237f9d90bfe046cf54aeeeaa Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Fri, 27 Oct 2023 17:43:43 +0000 Subject: [PATCH 23/63] ww3_tp2.22/*.inp: USSX/Y --> USS --- regtests/ww3_tp2.22/input/gx_outf.inp | 2 +- regtests/ww3_tp2.22/input/ww3_ounf.inp | 2 +- regtests/ww3_tp2.22/input/ww3_outf.inp | 2 +- regtests/ww3_tp2.22/input/ww3_shel.inp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/regtests/ww3_tp2.22/input/gx_outf.inp b/regtests/ww3_tp2.22/input/gx_outf.inp index 719869826..8d36f84f9 100644 --- a/regtests/ww3_tp2.22/input/gx_outf.inp +++ b/regtests/ww3_tp2.22/input/gx_outf.inp @@ -5,6 +5,6 @@ $ F F F F F T F F T F F F F F F F F F F F F F F F F F F F F F F F $ N - HS T01 DIR SPR USSX USSY + HS T01 DIR SPR USS $ 1 193 1 93 T T diff --git a/regtests/ww3_tp2.22/input/ww3_ounf.inp b/regtests/ww3_tp2.22/input/ww3_ounf.inp index 1c7078ab5..3a596fc03 100644 --- a/regtests/ww3_tp2.22/input/ww3_ounf.inp +++ b/regtests/ww3_tp2.22/input/ww3_ounf.inp @@ -13,7 +13,7 @@ $ file for a full documentation of field output options. Namelist type $ selection is used here (for alternative F/T flags, see ww3_shel.inp). $ N - HS T01 DIR SPR USSX USSY + HS T01 DIR SPR USS $ $--------------------------------------------------------------------- $ $ netCDF version [3,4] diff --git a/regtests/ww3_tp2.22/input/ww3_outf.inp b/regtests/ww3_tp2.22/input/ww3_outf.inp index d7d17f0df..c1d1a0811 100644 --- a/regtests/ww3_tp2.22/input/ww3_outf.inp +++ b/regtests/ww3_tp2.22/input/ww3_outf.inp @@ -3,7 +3,7 @@ $ ----------------------------------------- 19680612 000000 518400. 2 $ N - HS T01 DIR SPR USSX USSY + HS T01 DIR SPR USS $ 1 0 $ diff --git a/regtests/ww3_tp2.22/input/ww3_shel.inp b/regtests/ww3_tp2.22/input/ww3_shel.inp index 64232ed6a..1c25475a9 100644 --- a/regtests/ww3_tp2.22/input/ww3_shel.inp +++ b/regtests/ww3_tp2.22/input/ww3_shel.inp @@ -18,7 +18,7 @@ $ 19680606 000000 10800 19680608 000000 $ N - HS EF T01 DIR SPR USSX USSY + HS EF T01 DIR SPR USS $ 19680606 000000 21600 19680608 000000 0.0 0.0 'LEFT' From 58fef56e666f67230f613a1250015fa5834c9838 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Fri, 27 Oct 2023 19:23:36 +0000 Subject: [PATCH 24/63] ww3_tp2.22: info - typo for USSY --- regtests/ww3_tp2.22/info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regtests/ww3_tp2.22/info b/regtests/ww3_tp2.22/info index 7ebea70ff..6059cc939 100644 --- a/regtests/ww3_tp2.22/info +++ b/regtests/ww3_tp2.22/info @@ -42,7 +42,7 @@ # + switch_PR3_UQ_MPI # # - Test case output: # * USSX/USSY: surface Stokes drift -# * USSHX/USSHX: surface layer averaged Stokes drift +# * USSHX/USSHY: surface layer averaged Stokes drift # # # # Sample run_test commands : # From 743044c2e9f2cd1d22a9dfc1c065be732f2a06d4 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Fri, 27 Oct 2023 19:25:42 +0000 Subject: [PATCH 25/63] ww3_tp2.22: remove gx_outf.inp, map2_2.gs. Looks like grads support is being dropped. --- regtests/ww3_tp2.22/input/gx_outf.inp | 10 -- regtests/ww3_tp2.22/input/map2_2.gs | 126 -------------------------- 2 files changed, 136 deletions(-) delete mode 100644 regtests/ww3_tp2.22/input/gx_outf.inp delete mode 100644 regtests/ww3_tp2.22/input/map2_2.gs diff --git a/regtests/ww3_tp2.22/input/gx_outf.inp b/regtests/ww3_tp2.22/input/gx_outf.inp deleted file mode 100644 index 8d36f84f9..000000000 --- a/regtests/ww3_tp2.22/input/gx_outf.inp +++ /dev/null @@ -1,10 +0,0 @@ -$ WAVEWATCH III Grid output post-processing (GrADS) -$ ------------------------------------------------- - 19680606 000000 43200. 25 -$ - F F F F F T F F T F F F F F F F F F F F F F F F F F F F F F F F -$ - N - HS T01 DIR SPR USS -$ - 1 193 1 93 T T diff --git a/regtests/ww3_tp2.22/input/map2_2.gs b/regtests/ww3_tp2.22/input/map2_2.gs deleted file mode 100644 index d0a6e23b4..000000000 --- a/regtests/ww3_tp2.22/input/map2_2.gs +++ /dev/null @@ -1,126 +0,0 @@ -* -* map2_2.gs : GrADS wave heigt and mean direction for ww3_tp2.2 -* ---------------------------------------------------------------- -* Data set with multiple times expected. -* Input from ww3.ctl ww3.grads -* Scripts used : -* colorset.gs : Sets up shading colors -* -* General set up - - 'set display color white' - 'clear' - 'run colorset.gs' - - gdate="yyyy/mm/dd" - '!date -u "+%Y/%m/%d" > tmp_grads_gdate' - result = read (tmp_grads_gdate) - gdate = sublin(result,2) - '!rm -f tmp_grads_gdate' - -* Get the data, loop through times ... - - 'open ww3' - -t = 1 -while ( t <= 13 ) - - 'set t ' t - - 'query time' - gradsdate = subwrd(result,3) - test = substr ( gradsdate, 3, 1 ) - if ( test='Z' ) - year = substr ( gradsdate, 9, 4 ) - mnth = substr ( gradsdate, 6, 3 ) - day = substr ( gradsdate, 4, 2 ) - hour = substr ( gradsdate, 1, 2 ) - min = '00' - else - year = substr ( gradsdate, 12, 4 ) - mnth = substr ( gradsdate, 9, 3 ) - day = substr ( gradsdate, 7, 2 ) - hour = substr ( gradsdate, 1, 2 ) - min = substr ( gradsdate, 4, 2 ) - endif - - month= '??' - if (mnth='JAN'); month= '01'; endif; - if (mnth='FEB'); month= '02'; endif; - if (mnth='MAR'); month= '03'; endif; - if (mnth='APR'); month= '04'; endif; - if (mnth='MAY'); month= '05'; endif; - if (mnth='JUN'); month= '06'; endif; - if (mnth='JUL'); month= '07'; endif; - if (mnth='AUG'); month= '08'; endif; - if (mnth='SEP'); month= '09'; endif; - if (mnth='OCT'); month= '10'; endif; - if (mnth='NOV'); month= '11'; endif; - if (mnth='DEC'); month= '12'; endif; - - vdate = year '/' month '/' day ' ' hour ':' min 'z' - -* Basic plot set up - - 'set grads off' - 'set lon -5 185' - 'set lat -45 45' - 'set xlint 10' - 'set ylint 10' - 'set grid on 3 60' - 'set mpdraw off' - -* 'set parea 1. 7.5 2.5 9.' - 'set mproj latlon' - -* Land sea and ice map - - 'set gxout grfill' - 'set clevs -0.5 0.5' - 'set ccols 63 62 0' - 'd map' - -* Plot wave heights - - 'set gxout shaded' - 'set clevs 0.05 0.1 0.15 0.2 0.25 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.25 1.5 2. 3' - 'set ccols 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38' - 'd hs' - 'run cbarn' - -* Plot mean directions - - 'set gxout vector' - 'set cthick 3' - 'set arrscl 0.25' - 'set arrlab off' - 'set ccolor 0' - 'd skip(cos(dir),5);skip(sin(dir),5)' - -* Text around plot - - 'set strsiz 0.18' - 'set string 1 c 5' - 'draw string 5.5 7.7 WAVEWATCH III TEST' - - 'set strsiz 0.12' - 'set string 1 l' - 'draw string 0.5 7.3 Propagation test ww3_tp2.2' - 'set string 1 r' - 'draw string 10.5 7.3 valid ' vdate - 'set string 1 c' - 'draw string 5.5 1.0 wave height (shaded, m) and mean direction (vector, not scaled)' - 'draw string 5.5 7.3 plot generated ' gdate - -* Print this page and clear - - 'printim map2_2_'t'.png' - 'clear' - 'set grads off' - - t = t + 1 -endwhile - -'quit' - -* end of map2_2.gs From a1296986420f56f1bcdc3ea603982182b4092c78 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Fri, 27 Oct 2023 20:18:40 +0000 Subject: [PATCH 26/63] ww3_tp2.22: *.inp - adjust sim times --- regtests/ww3_tp2.22/input/ww3_ounf.inp | 2 +- regtests/ww3_tp2.22/input/ww3_outf.inp | 2 +- regtests/ww3_tp2.22/input/ww3_shel.inp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/regtests/ww3_tp2.22/input/ww3_ounf.inp b/regtests/ww3_tp2.22/input/ww3_ounf.inp index 3a596fc03..37bd76c61 100644 --- a/regtests/ww3_tp2.22/input/ww3_ounf.inp +++ b/regtests/ww3_tp2.22/input/ww3_ounf.inp @@ -4,7 +4,7 @@ $--------------------------------------------------------------------- $ $ First output time (yyyymmdd hhmmss), increment of output (s), $ and number of output times. $ - 19680606 000000 10800. 100 + 19680606 000000 3600. 12 $ $ Fields requested --------------------------------------------------- $ $ diff --git a/regtests/ww3_tp2.22/input/ww3_outf.inp b/regtests/ww3_tp2.22/input/ww3_outf.inp index c1d1a0811..a342c20ef 100644 --- a/regtests/ww3_tp2.22/input/ww3_outf.inp +++ b/regtests/ww3_tp2.22/input/ww3_outf.inp @@ -1,6 +1,6 @@ $ WAVEWATCH III Grid output post-processing $ ----------------------------------------- - 19680612 000000 518400. 2 + 19680606 000000 3600. 12 $ N HS T01 DIR SPR USS diff --git a/regtests/ww3_tp2.22/input/ww3_shel.inp b/regtests/ww3_tp2.22/input/ww3_shel.inp index 1c25475a9..e1547e036 100644 --- a/regtests/ww3_tp2.22/input/ww3_shel.inp +++ b/regtests/ww3_tp2.22/input/ww3_shel.inp @@ -15,7 +15,7 @@ $ $ 1 $ - 19680606 000000 10800 19680608 000000 + 19680606 000000 3600 19680608 000000 $ N HS EF T01 DIR SPR USS From ac7ab56f123825af62180c681ed06093bb35384b Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Fri, 27 Oct 2023 20:28:16 +0000 Subject: [PATCH 27/63] ww3_tp2.22: info - updates for output variables --- regtests/ww3_tp2.22/info | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/regtests/ww3_tp2.22/info b/regtests/ww3_tp2.22/info index 6059cc939..97cd6bfeb 100644 --- a/regtests/ww3_tp2.22/info +++ b/regtests/ww3_tp2.22/info @@ -1,8 +1,8 @@ ############################################################################# # # -# ww3_tp2.22 Test script for WW-III, two-dimensional propagation and LMP # -# Propagation over half the globe. # -# Langmuir Mixing Parameterization # +# ww3_tp2.22 Test script for WW-III demonstrating the Langmuir Mixing # +# Parmeterization, for the case of two-dimensional propagation # +# over half the globe. # # # # Model should be compiled with the switches : # # # @@ -16,33 +16,12 @@ # !/O0 !/O1 !/O2 !/O3 !/O4 !/O5 !/O6 !/O7 Sdt out output options. # # # # Remarks : # -# - Test case input (default): # -# * Single grid, but run using ww3_multi. # -# * ww3_grid.inp : (default) # -# + Spatial grid: 193 x 93 rectilinear lat/lon grid # -# - dx = 1.0 deg, dy = 1.0 deg # -# - Xrange = -6:186 deg, Yrange = -46:46 deg # -# + Spectral grid: ntheta = 24, nf = 3, f1 = 0.03679, fgamma = 1.1 # +# - Test case input: # + Langmuir mixing parameterization (LMPENABLED = T) and tail # # contribution (SDTAIL = T) enabled. A uniform (10m) surface layer # # depth is asumed (HSLMODE = 0). # -# * map2_2.gs: grads script for visualizing results. # -# * GSE correction is enabled. To disable GSE correction # -# comment/uncomment the appropriate lines in ww3_grid.inp. # -# * switch options (mostly self-explanatory). # -# + switch_PR1 : First order scheme # -# + switch_PR2_UNO : UQ scheme with diffusion # -# + switch_PR2_UQ : UQ scheme with diffusion # -# + switch_PR3_UNO : UQ scheme with averaging (default) # -# + switch_PR3_UQ : UQ scheme with averaging (default) # -# + switch_PR1_MPI # -# + switch_PR2_UNO_MPI # -# + switch_PR2_UQ_MPI # -# + switch_PR3_UNO_MPI # -# + switch_PR3_UQ_MPI # # - Test case output: -# * USSX/USSY: surface Stokes drift -# * USSHX/USSHY: surface layer averaged Stokes drift +# + USSX/USSY: surface Stokes drift # # # # Sample run_test commands : # @@ -64,6 +43,8 @@ # When HSLMODE == 0, a uniform 10m HSL is assumed for testing purposes. # # When HSLMODE == 1, the HSL field is to be received from the active # # ocean model via coupler. # +# +# The WW3 output variables ... USSX,USSY. USSHX,USSHY. # # # For more info on the Langmuir parameterization, see: # # Li, Qing, et al. "Langmuir mixing effects on global climate: # From 94801a7cf9bf5fb8c0996e1e226f62d8ae2905c8 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Tue, 7 Nov 2023 08:25:16 -0600 Subject: [PATCH 28/63] ww3_shel.inp: add USSH --- regtests/ww3_tp2.22/input/ww3_shel.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regtests/ww3_tp2.22/input/ww3_shel.inp b/regtests/ww3_tp2.22/input/ww3_shel.inp index e1547e036..6b946943c 100644 --- a/regtests/ww3_tp2.22/input/ww3_shel.inp +++ b/regtests/ww3_tp2.22/input/ww3_shel.inp @@ -18,7 +18,7 @@ $ 19680606 000000 3600 19680608 000000 $ N - HS EF T01 DIR SPR USS + HS EF T01 DIR SPR USS USSH $ 19680606 000000 21600 19680608 000000 0.0 0.0 'LEFT' From 25750e251d34f06710c9d626e6f8ac9a80e4cc4d Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Tue, 7 Nov 2023 09:55:40 -0600 Subject: [PATCH 29/63] w3ounfmetamd.F90: update for USSH --- model/src/w3ounfmetamd.F90 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/model/src/w3ounfmetamd.F90 b/model/src/w3ounfmetamd.F90 index fd00c7bb3..7789dc80a 100644 --- a/model/src/w3ounfmetamd.F90 +++ b/model/src/w3ounfmetamd.F90 @@ -3744,6 +3744,10 @@ SUBROUTINE DEFAULT_META() META(2)%VARNS='' META(2)%VARNG='' META(2)%VARNC='toc=sqrt(utoc**2+vtoc**2)' + + + + ! !---------- GROUP 7 ---------------- ! @@ -3956,6 +3960,29 @@ SUBROUTINE DEFAULT_META() META(1)%VARNC='Goda wave peakedness parameter' META(1)%VMIN = 0 META(1)%VMAX = 32 + + + ! IFI=8, IFJ=14, USSH + META => GROUP(8)%FIELD(14)%META + META(1)%FSC = 0.0005 + META(1)%UNITS = 'm s-1' + META(1)%ENAME = '.ussh' + + ! First component + META(1)%VARNM='uussh' + META(1)%VARNL='eastward surface averaged stokes drift' + META(1)%VARNS='sea_surface_wave_averaged_stokes_drift_eastward_velocity' + META(1)%VARNG='eastward_surface_averaged_stokes_drift' + META(1)%VARND=DIRCOM + META(1)%VMIN = -4.95 + META(1)%VMAX = 4.95 + + ! Second component + META(2) = META(1) + META(2)%VARNM='vussh' + META(2)%VARNL='northward surface averaged stokes drift' + META(2)%VARNS='sea_surface_wave_averaged_stokes_drift_northward_velocity' + META(2)%VARNG='northward_surface_averaged_stokes_drift' ! !---------- GROUP 9 ---------------- ! From 1be8e3356f473fcf05ef7c2071075ea30cfa4418 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Tue, 7 Nov 2023 10:29:58 -0600 Subject: [PATCH 30/63] w3ounfmetamd.F90: fix group number, 8 -> 6 --- model/src/w3ounfmetamd.F90 | 42 ++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/model/src/w3ounfmetamd.F90 b/model/src/w3ounfmetamd.F90 index 7789dc80a..b3fb394f2 100644 --- a/model/src/w3ounfmetamd.F90 +++ b/model/src/w3ounfmetamd.F90 @@ -3745,7 +3745,27 @@ SUBROUTINE DEFAULT_META() META(2)%VARNG='' META(2)%VARNC='toc=sqrt(utoc**2+vtoc**2)' + ! IFI=6, IFJ=14, USSH + META => GROUP(6)%FIELD(14)%META + META(1)%FSC = 0.0005 + META(1)%UNITS = 'm s-1' + META(1)%ENAME = '.ussh' + ! First component + META(1)%VARNM='uussh' + META(1)%VARNL='eastward surface averaged stokes drift' + META(1)%VARNS='sea_surface_wave_averaged_stokes_drift_eastward_velocity' + META(1)%VARNG='eastward_surface_averaged_stokes_drift' + META(1)%VARND=DIRCOM + META(1)%VMIN = -4.95 + META(1)%VMAX = 4.95 + + ! Second component + META(2) = META(1) + META(2)%VARNM='vussh' + META(2)%VARNL='northward surface averaged stokes drift' + META(2)%VARNS='sea_surface_wave_averaged_stokes_drift_northward_velocity' + META(2)%VARNG='northward_surface_averaged_stokes_drift' ! @@ -3961,28 +3981,6 @@ SUBROUTINE DEFAULT_META() META(1)%VMIN = 0 META(1)%VMAX = 32 - - ! IFI=8, IFJ=14, USSH - META => GROUP(8)%FIELD(14)%META - META(1)%FSC = 0.0005 - META(1)%UNITS = 'm s-1' - META(1)%ENAME = '.ussh' - - ! First component - META(1)%VARNM='uussh' - META(1)%VARNL='eastward surface averaged stokes drift' - META(1)%VARNS='sea_surface_wave_averaged_stokes_drift_eastward_velocity' - META(1)%VARNG='eastward_surface_averaged_stokes_drift' - META(1)%VARND=DIRCOM - META(1)%VMIN = -4.95 - META(1)%VMAX = 4.95 - - ! Second component - META(2) = META(1) - META(2)%VARNM='vussh' - META(2)%VARNL='northward surface averaged stokes drift' - META(2)%VARNS='sea_surface_wave_averaged_stokes_drift_northward_velocity' - META(2)%VARNG='northward_surface_averaged_stokes_drift' ! !---------- GROUP 9 ---------------- ! From e789a2169870e752c856d8d64d98b0d7bfb0f636 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Tue, 7 Nov 2023 11:52:32 -0600 Subject: [PATCH 31/63] ww3_ounf.F90: add USSHX/Y --- model/src/ww3_ounf.F90 | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/model/src/ww3_ounf.F90 b/model/src/ww3_ounf.F90 index 0a2cadfca..3c8ebb4ec 100644 --- a/model/src/ww3_ounf.F90 +++ b/model/src/ww3_ounf.F90 @@ -186,7 +186,7 @@ PROGRAM W3OUNF TAUOX, TAUOY, TAUWIX, & TAUWIY, PHIAW, PHIOC, TUSX, TUSY, PRMS, TPMS,& USSX, USSY, MSSX, MSSY, MSSD, MSCX, MSCY, & - MSCD, CHARN, TWS, TAUA, TAUADIR, & + MSCD, CHARN, TWS, TAUA, TAUADIR,USSHX,USSHY, & TAUWNX, TAUWNY, BHD, T02, HSIG, CGE, & T01, BEDFORMS, WHITECAP, TAUBBL, PHIBBL, & CFLTHMAX, CFLXYMAX, CFLKMAX, TAUICE, PHICE, & @@ -1854,6 +1854,23 @@ SUBROUTINE W3EXNC ( NX, NY, IX1, IXN, IY1, IYN, NSEA, & CALL W3S2XY ( NSEA, NSEA, NX+1, NY, TAUOCY(1:NSEA) & , MAPSF, XY ) ENDIF ! SMCGRD + ! + NFIELD=2 + + ! + ! Surface averaged stokes drift + ELSE IF ( IFI .EQ. 6 .AND. IFJ .EQ. 14 ) THEN + DO ISEA=1, NSEA + USSHX(ISEA)=MAX(-0.9998,MIN(0.9998,USSHX(ISEA))) + USSHY(ISEA)=MAX(-0.9998,MIN(0.9998,USSHY(ISEA))) + END DO +#ifdef W3_RTD + ! Rotate x,y vector back to standard pole + IF ( FLAGUNR ) CALL W3XYRTN(NSEA, USSHX(1:NSEA), USSHY(1:NSEA), AnglD) +#endif + CALL S2GRID(USSHX(1:NSEA), XX) + CALL S2GRID(USSHY(1:NSEA), XY) + ! NFIELD=2 ! ! RMS of bottom displacement amplitude From c1f4b84fda09e4bd39337be8d193cc97602fd68a Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Tue, 7 Nov 2023 11:52:57 -0600 Subject: [PATCH 32/63] ww3_outf.F90: add USSHX/Y --- model/src/ww3_outf.F90 | 51 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/model/src/ww3_outf.F90 b/model/src/ww3_outf.F90 index e4c1affed..f3a0e6bc2 100644 --- a/model/src/ww3_outf.F90 +++ b/model/src/ww3_outf.F90 @@ -1940,6 +1940,57 @@ SUBROUTINE W3EXGO ( NX, NY, NSEA ) CALL W3S2XY (NSEA,NSEA,NX+1,NY, TAUOCY(1:NSEA) & , MAPSF, X2 ) ENDIF + + ! + ELSE IF ( IFI .EQ. 6 .AND. IFJ .EQ. 14 ) THEN + IF ( VECTOR ) THEN + FLTWO = .TRUE. + ELSE + FLDIR = .TRUE. + END IF + FSC = 0.001 + UNITS = 'm s-1' + ENAME = '.ussh' + DO ISEA=1, NSEA + IF (USSHX(ISEA) .NE. UNDEF) THEN + USSHX(ISEA)=MAX(-0.9998,MIN(0.9998,USSHX(ISEA))) + USSHY(ISEA)=MAX(-0.9998,MIN(0.9998,USSHY(ISEA))) + END IF + END DO +#ifdef W3_RTD + ! Rotate x,y vector back to standard pole + IF ( FLAGUNR ) CALL W3XYRTN(NSEA, USSHX, USSHY, AnglD) +#endif + IF ( ITYPE .EQ. 4 ) THEN + XS1 = USSHX(1:NSEA) + XS2 = USSHY(1:NSEA) + ELSE + CALL W3S2XY ( NSEA, NSEA, NX+1, NY, USSHX(1:NSEA) & + , MAPSF, XX ) + CALL W3S2XY ( NSEA, NSEA, NX+1, NY, USSHY(1:NSEA) & + , MAPSF, XY ) + ENDIF + DO ISEA=1, NSEA + CABS = SQRT(USSHX(ISEA)**2+USSHY(ISEA)**2) + IF ( USSHX(ISEA) .NE. UNDEF ) THEN + USSHY(ISEA) = MOD ( 630. - & + RADE*ATAN2(USSHY(ISEA),USSHX(ISEA)) , 360. ) + ELSE + USSHY(ISEA) = UNDEF + CABS = UNDEF + END IF + USSHX(ISEA) = CABS + END DO + IF ( ITYPE .EQ. 4 ) THEN + XS3 = USSHX(1:NSEA) + XS4 = USSHY(1:NSEA) + ELSE + CALL W3S2XY ( NSEA, NSEA, NX+1, NY, USSHX(1:NSEA), & + MAPSF, X1 ) + CALL W3S2XY ( NSEA, NSEA, NX+1, NY, USSHY(1:NSEA), & + MAPSF, X2 ) + ENDIF + ! ELSE IF ( IFI .EQ. 7 .AND. IFJ .EQ. 1 ) THEN IF ( VECTOR ) THEN From f1d5b93d903732e71c7148611cb616c1bd21ac70 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Tue, 7 Nov 2023 11:58:17 -0600 Subject: [PATCH 33/63] ww3_shel.inp: add USSHX/Y --- model/inp/ww3_shel.inp | 1 + 1 file changed, 1 insertion(+) diff --git a/model/inp/ww3_shel.inp b/model/inp/ww3_shel.inp index 8eca9b58a..a56dcf51b 100644 --- a/model/inp/ww3_shel.inp +++ b/model/inp/ww3_shel.inp @@ -198,6 +198,7 @@ $ F F 6 10 TAUICE TWI Wave to sea ice stress $ F F 6 11 PHICE FIC Wave to sea ice energy flux $ F F 6 12 USSP USP Partitioned surface Stokes drift $ F F 6 13 TAUOC[X,Y] TOC Total momentum to the ocean +$ F F 6 14 USSH[X,Y] USSH Surface averaged Stokes drift $ ------------------------------------------------- $ 7 Wave-bottom layer $ ------------------------------------------------- From b1ddc7f02c50bbe5d224a76756d626c2fa1a7bc1 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Tue, 7 Nov 2023 12:08:17 -0600 Subject: [PATCH 34/63] w3odatmd.F90: update for USSH --- model/src/w3odatmd.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/src/w3odatmd.F90 b/model/src/w3odatmd.F90 index 203280468..5c1c7d239 100644 --- a/model/src/w3odatmd.F90 +++ b/model/src/w3odatmd.F90 @@ -876,7 +876,7 @@ SUBROUTINE W3NOUT ( NDSERR, NDSTST ) ! ! 6) Wave-ocean layer ! - NOGE(6) = 13 + NOGE(6) = 14 ! IDOUT( 6, 1) = 'Radiation stresses ' IDOUT( 6, 2) = 'Wave-ocean mom. flux' @@ -891,7 +891,7 @@ SUBROUTINE W3NOUT ( NDSERR, NDSTST ) IDOUT( 6,11) = 'Wave-ice energy flux' IDOUT( 6,12) = 'Split Surface Stokes' IDOUT( 6,13) = 'Tot wav-ocn mom flux' - IDOUT( 6,14) = 'Turbulent Langmuir number' + IDOUT( 6,14) = 'Stokes drift sfc ave' ! ! 7) Wave-bottom layer ! From d7ced8b353a1f34235ddadf8de8d96650f349b3a Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Tue, 7 Nov 2023 12:43:20 -0600 Subject: [PATCH 35/63] ww3_ounf.inp: update for USSH --- regtests/ww3_tp2.22/input/ww3_ounf.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regtests/ww3_tp2.22/input/ww3_ounf.inp b/regtests/ww3_tp2.22/input/ww3_ounf.inp index 37bd76c61..0b8c65089 100644 --- a/regtests/ww3_tp2.22/input/ww3_ounf.inp +++ b/regtests/ww3_tp2.22/input/ww3_ounf.inp @@ -13,7 +13,7 @@ $ file for a full documentation of field output options. Namelist type $ selection is used here (for alternative F/T flags, see ww3_shel.inp). $ N - HS T01 DIR SPR USS + HS T01 DIR SPR USS USSH $ $--------------------------------------------------------------------- $ $ netCDF version [3,4] From 00ea0167f573115612f488d2467eac5be5031716 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Tue, 7 Nov 2023 12:43:49 -0600 Subject: [PATCH 36/63] ww3_outf.inp: update for USSH --- regtests/ww3_tp2.22/input/ww3_outf.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regtests/ww3_tp2.22/input/ww3_outf.inp b/regtests/ww3_tp2.22/input/ww3_outf.inp index a342c20ef..2ee125996 100644 --- a/regtests/ww3_tp2.22/input/ww3_outf.inp +++ b/regtests/ww3_tp2.22/input/ww3_outf.inp @@ -3,7 +3,7 @@ $ ----------------------------------------- 19680606 000000 3600. 12 $ N - HS T01 DIR SPR USS + HS T01 DIR SPR USS USSH $ 1 0 $ From e3e950b9c190c18db276731a1da6466bcba6174e Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Tue, 7 Nov 2023 12:44:28 -0600 Subject: [PATCH 37/63] info: add USSH + polishing --- regtests/ww3_tp2.22/info | 49 ++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/regtests/ww3_tp2.22/info b/regtests/ww3_tp2.22/info index 97cd6bfeb..d16906ae1 100644 --- a/regtests/ww3_tp2.22/info +++ b/regtests/ww3_tp2.22/info @@ -1,36 +1,23 @@ ############################################################################# # # -# ww3_tp2.22 Test script for WW-III demonstrating the Langmuir Mixing # -# Parmeterization, for the case of two-dimensional propagation # -# over half the globe. # +# ww3_tp2.22 Test script for WW-III, demonstrating Langmuir Mixing # +# Parmeterization for the case of two-dimensional propagation # +# over half the globe. Based on ww3_tp2.2 using switch # +# PR3_UQ_MPI. # # # -# Model should be compiled with the switches : # +# Remarks : # +# - Test case input: # +# + Langmuir mixing parameterization (LMPENABLED = T), with # +# + tail contribution (SDTAIL = T) enabled. # +# + A uniform (10m) surface layer depth is assumed (HSLMODE = 0). # # # -# !/LN0 !/ST0 !/NL0 !/BT0 !/DB0 !/TR0 !/BS0 # -# Select the 'no source terms' option. # -# !/PRn Selecting one of the propagation schemes. # -# 1: First order. # -# 2: UQ with diffusion term. # -# 3: UQ with averaging (set to zero here). # -# !/WNX1 !/WNT1 !/CRX1 !/CRT1 Wind and current interpolation. # -# !/O0 !/O1 !/O2 !/O3 !/O4 !/O5 !/O6 !/O7 Sdt out output options. # +# - Test case output: # +# + USSX/USSY: surface Stokes drift (.nc: uuss/vuss) # +# + USSHX/USSHY: surface averaged Stokes drift (.nc: uussh/vussh) # # # -# Remarks : # -# - Test case input: -# + Langmuir mixing parameterization (LMPENABLED = T) and tail # -# contribution (SDTAIL = T) enabled. A uniform (10m) surface layer # -# depth is asumed (HSLMODE = 0). # -# - Test case output: -# + USSX/USSY: surface Stokes drift -# -# # -# Sample run_test commands : # +# Sample run_test commands : # # (Note: mpirun commands differ by local system) # -# ./bin/run_test -s PR1 ../model ww3_tp2.22 # -# ./bin/run_test -n 3 -p mpirun -f -s PR1_MPI ../model ww3_tp2.22 # -# # -# Hendrik Tolman, Jun 2002 # -# Last Mod : Dec 2013 # +# ./bin/run_cmake_test -n 4 -p mpirun -f -s PR3_UQ_MPI ../model ww3_tp2.22 # # # # Notes on LMPN namelist and Langmuir Mixing Parameterization: # # # @@ -43,15 +30,17 @@ # When HSLMODE == 0, a uniform 10m HSL is assumed for testing purposes. # # When HSLMODE == 1, the HSL field is to be received from the active # # ocean model via coupler. # -# -# The WW3 output variables ... USSX,USSY. USSHX,USSHY. +# # +# The WW3 output variables ... USSX,USSY. USSHX,USSHY. # # # # For more info on the Langmuir parameterization, see: # # Li, Qing, et al. "Langmuir mixing effects on global climate: # # WAVEWATCH III in CESM." Ocean Modelling 103 (2016): 145-160. # # # +# Hendrik Tolman, Jun 2002 # +# Last Mod : Li / Altuntas, Nov 2023 # # # -# Copyright 2009-2013 National Weather Service (NWS), # +# Copyright 2009-2023 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. # From ecbce556f38f63d0a0b266531be63b6cde2e1d48 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Tue, 7 Nov 2023 13:39:51 -0600 Subject: [PATCH 38/63] ww3_outf.F90: USE W3ADATMD.F90 ONLY USSHX,USSHY --- model/src/ww3_outf.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/src/ww3_outf.F90 b/model/src/ww3_outf.F90 index f3a0e6bc2..12f0a0f06 100644 --- a/model/src/ww3_outf.F90 +++ b/model/src/ww3_outf.F90 @@ -167,7 +167,7 @@ PROGRAM W3OUTF CFLTHMAX, CFLKMAX, BEDFORMS, WHITECAP, T02, & CGE, T01, HSIG, STMAXE, STMAXD, HMAXE, & HCMAXE, HMAXD, HCMAXD, MSSD, MSCD, WBT, & - WNMEAN, TAUA, TAUADIR + WNMEAN, TAUA, TAUADIR, USSHX, USSHY USE W3ODATMD, ONLY: NDSO, NDSE, NDST, NOGRP, NGRPP, IDOUT, & UNDEF, FLOGRD, FNMPRE, NOSWLL, NOGE ! From c9cfedd61844add18915955a2581afd205e4b4ec Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Wed, 8 Nov 2023 19:42:01 +0000 Subject: [PATCH 39/63] ww3_tp2.22/ww3_grid*.inp: update for "sdtail" and "no tail" --- regtests/ww3_tp2.22/input/ww3_grid.inp | 2 +- regtests/ww3_tp2.22/input/ww3_grid_sdtail.inp | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 regtests/ww3_tp2.22/input/ww3_grid_sdtail.inp diff --git a/regtests/ww3_tp2.22/input/ww3_grid.inp b/regtests/ww3_tp2.22/input/ww3_grid.inp index e021a094a..83213e0e1 100644 --- a/regtests/ww3_tp2.22/input/ww3_grid.inp +++ b/regtests/ww3_tp2.22/input/ww3_grid.inp @@ -10,7 +10,7 @@ $ &PRO2 DTIME = 345600. / &PRO3 WDTHCG = 1.50, WDTHTH =1.50 / &OUTS E3D = 1 / - &LMPN LMPENABLED = T, SDTAIL = T, HSLMODE = 0 / + &LMPN LMPENABLED = T, SDTAIL = F, HSLMODE = 0 / END OF NAMELISTS $ 'RECT' T 'NONE' diff --git a/regtests/ww3_tp2.22/input/ww3_grid_sdtail.inp b/regtests/ww3_tp2.22/input/ww3_grid_sdtail.inp new file mode 100644 index 000000000..e021a094a --- /dev/null +++ b/regtests/ww3_tp2.22/input/ww3_grid_sdtail.inp @@ -0,0 +1,33 @@ +$ WAVEWATCH III Grid preprocessor input file +$ ------------------------------------------ + 'LANGMUIR MIXING PARAMETERIZATION FOR 2-D PROP. AROUND GLOBE' +$ + 1.1 0.040 9 24 0. +$ + F T T T F F + 2200. 2200. 2200. 2200. +$ + &PRO2 DTIME = 345600. / + &PRO3 WDTHCG = 1.50, WDTHTH =1.50 / + &OUTS E3D = 1 / + &LMPN LMPENABLED = T, SDTAIL = T, HSLMODE = 0 / +END OF NAMELISTS +$ + 'RECT' T 'NONE' + 193 93 + 1. 1. 1. + -6. -46. 1. +$ + -5. 5.75 10 -2500. 2 1 '(....)' 'UNIT' 'input' +$ + 17949*1 +$ + 10 1 1 '(....)' 'PART' 'input' +$ + 0 0 F + 0 0 F + 0 0 +$ + 0. -40. 0.5 0.866 100 + 0. 40. 0.5 -0.866 -100 + 0. 0. 0. 0. 0 From b865de14194cfd81953d86b10259e6188a16f764 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Wed, 8 Nov 2023 20:00:34 +0000 Subject: [PATCH 40/63] matrix.base: add ww3_tp2.22 - "sdtail" and "no tail" --- regtests/bin/matrix.base | 2 ++ 1 file changed, 2 insertions(+) diff --git a/regtests/bin/matrix.base b/regtests/bin/matrix.base index afbb995f8..30df4b874 100755 --- a/regtests/bin/matrix.base +++ b/regtests/bin/matrix.base @@ -816,7 +816,9 @@ if [ "$lmp" == "y" ]; # Langmuir mixing parameterization then + echo ' ' >> matrix.body echo "$rtst -s PR3_UQ_MPI -w work_PR3_UQ_MPI -f -p $mpi -n $np $ww3 ww3_tp2.22" >> matrix.body + echo "$rtst -s PR3_UQ_MPI -g sdtail -w work_PR3_UQ_MPI_SDTAIL -f -p $mpi -n $np $ww3 ww3_tp2.22" >> matrix.body fi fi From 7b013dac5817e144faffcb233077088eac5038ba Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 16 Nov 2023 19:16:07 +0000 Subject: [PATCH 41/63] rename: switch_PR3_UQ_MPI --> switch --- regtests/ww3_tp2.22/input/{switch_PR3_UQ_MPI => switch} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename regtests/ww3_tp2.22/input/{switch_PR3_UQ_MPI => switch} (100%) diff --git a/regtests/ww3_tp2.22/input/switch_PR3_UQ_MPI b/regtests/ww3_tp2.22/input/switch similarity index 100% rename from regtests/ww3_tp2.22/input/switch_PR3_UQ_MPI rename to regtests/ww3_tp2.22/input/switch From 3a5ea6748a9132cdb3e5256100f2c68477c7fe53 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 16 Nov 2023 20:04:23 +0000 Subject: [PATCH 42/63] model/inp/ww3_grid.inp: document output parameters --- model/inp/ww3_grid.inp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/model/inp/ww3_grid.inp b/model/inp/ww3_grid.inp index 735c87cd7..27675a5ef 100644 --- a/model/inp/ww3_grid.inp +++ b/model/inp/ww3_grid.inp @@ -431,7 +431,7 @@ $ The LMPENABLED flag turns on the parameterization computations. $ The SDTAIL flag enables the spectral tail contribution. HSLMODE $ parameter determines the surface layer depth (HSL). $ -$ Langmuir parameters : Namelist LMPN +$ Input parameters : Namelist LMPN $ LMPENABLED : Logical controlling Langmuir $ related computations. $ T : Activates calculations @@ -446,6 +446,12 @@ $ depth (HSL) type. $ 0 : Uniform HSL=10m (default) $ 1 : HSL from coupler $ +$ Output parameters : +$ USS : surface Stokes drift +$ USSX/Y (netCDF: uuss/vuss) +$ USSH : surface layer averaged Stokes drift +$ USSHX/Y (netCDF: uussh/vussh) +$ $ For more info on the Langmuir parameterization, see: $ Li, Qing, et al. "Langmuir mixing effects on global climate: $ WAVEWATCH III in CESM." Ocean Modelling 103 (2016): 145-160. From 84ec561bbfd5af3cc038cc172e5a6e26d6bfa35a Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 16 Nov 2023 20:06:07 +0000 Subject: [PATCH 43/63] info: updates for Test Cases, output parameters, general desc --- regtests/ww3_tp2.22/info | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/regtests/ww3_tp2.22/info b/regtests/ww3_tp2.22/info index d16906ae1..c5e483a3c 100644 --- a/regtests/ww3_tp2.22/info +++ b/regtests/ww3_tp2.22/info @@ -1,23 +1,35 @@ ############################################################################# # # -# ww3_tp2.22 Test script for WW-III, demonstrating Langmuir Mixing # +# ww3_tp2.22 Test script for WW-III demonstrating Langmuir Mixing # # Parmeterization for the case of two-dimensional propagation # -# over half the globe. Based on ww3_tp2.2 using switch # -# PR3_UQ_MPI. # +# over half the globe. Based on regtest ww3_tp2.2 with # +# switch_PR3_UQ_MPI used as a sample switch. # # # -# Remarks : # -# - Test case input: # -# + Langmuir mixing parameterization (LMPENABLED = T), with # -# + tail contribution (SDTAIL = T) enabled. # -# + A uniform (10m) surface layer depth is assumed (HSLMODE = 0). # +# Two test cases are run. Both have LMPENABLED, with one which # +# includes the tail contribution, the other does not. # # # -# - Test case output: # -# + USSX/USSY: surface Stokes drift (.nc: uuss/vuss) # -# + USSHX/USSHY: surface averaged Stokes drift (.nc: uussh/vussh) # +# Remarks : # +# - Test case input parameters: # +# I. NO TAIL # +# ---------- # +# + LMPENABLED = T: Langmuir mixing parameterization enabled. # +# + SDTAIL = F: tail contribution NOT enabled. # +# + HSLMODE = 0: uniform (10m) surface layer depth is assumed. # +# # +# II. TAIL INCLUDED # +# ----------------- # +# + LMPENABLED = T: Langmuir mixing parameterization enabled. # +# + SDTAIL = T: tail contribution enabled. # +# + HSLMODE = 0: uniform (10m) surface layer depth is assumed. # +# # +# - Test case output parameters: # +# + USSX/USSY: surface Stokes drift (netCDF: uuss/vuss) # +# + USSHX/USSHY: surface averaged Stokes drift (netCDF: uussh/vussh) # # # # Sample run_test commands : # # (Note: mpirun commands differ by local system) # -# ./bin/run_cmake_test -n 4 -p mpirun -f -s PR3_UQ_MPI ../model ww3_tp2.22 # +# ./bin/run_cmake_test -n 4 -p mpirun -f ../model ww3_tp2.22 # +# ./bin/run_cmake_test -n 4 -p mpirun -f -g sdtail ../model ww3_tp2.22 # # # # Notes on LMPN namelist and Langmuir Mixing Parameterization: # # # @@ -25,14 +37,12 @@ # Parameterization used within the context of climate modeling and # # when WW3 is coupled with an active ocean model (.e.g., POP2, MOM6). # # The LMPENABLED flag turns on the parameterization computations. # -# The SDTAIL flag enabled the spectral tail contribution. # +# The SDTAIL flag enables the spectral tail contribution. # # HSLMODE parameter determines the surface layer depth (HSL). # # When HSLMODE == 0, a uniform 10m HSL is assumed for testing purposes. # # When HSLMODE == 1, the HSL field is to be received from the active # # ocean model via coupler. # # # -# The WW3 output variables ... USSX,USSY. USSHX,USSHY. # -# # # For more info on the Langmuir parameterization, see: # # Li, Qing, et al. "Langmuir mixing effects on global climate: # # WAVEWATCH III in CESM." Ocean Modelling 103 (2016): 145-160. # From 8250be07362fb12f5b60579604fd1252b91d93a1 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 16 Nov 2023 20:25:17 +0000 Subject: [PATCH 44/63] model/inp/ww3_shel.inp: add TOC to group 6,13 to prep for USSH group 6,14 --- model/inp/ww3_shel.inp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/model/inp/ww3_shel.inp b/model/inp/ww3_shel.inp index a56dcf51b..52ac5ebc0 100644 --- a/model/inp/ww3_shel.inp +++ b/model/inp/ww3_shel.inp @@ -190,7 +190,7 @@ $ F F 6 2 TAUO[X,Y] TWO Wave to ocean momentum flux $ F F 6 3 BHD BHD Bernoulli head (J term) $ F F 6 4 PHIOC FOC Wave to ocean energy flux $ F F 6 5 TUS[X,Y] TUS Stokes transport -$ F F 6 6 USS[X,Y] USS Surface Stokes drift +$ F F 6 6 USS[X,Y] USS Surface layer Stokes drift $ F F 6 7 [PR,TP]MS P2S Second-order sum pressure $ F F 6 8 US3D USF Spectrum of surface Stokes drift $ F F 6 9 P2SMS P2L Micro seism source term @@ -198,7 +198,7 @@ $ F F 6 10 TAUICE TWI Wave to sea ice stress $ F F 6 11 PHICE FIC Wave to sea ice energy flux $ F F 6 12 USSP USP Partitioned surface Stokes drift $ F F 6 13 TAUOC[X,Y] TOC Total momentum to the ocean -$ F F 6 14 USSH[X,Y] USSH Surface averaged Stokes drift +$ F F 6 14 USSH[X,Y] USSH Surface layer averaged Stokes drift $ ------------------------------------------------- $ 7 Wave-bottom layer $ ------------------------------------------------- @@ -258,8 +258,8 @@ $ UST CHA CGE FAW TAW TWA WCC WCF WCH WCM FWS T T T T T T T T T T T $ (6) Wave-Ocean layer T -$ SXY TWO BHD FOC TUS USS P2S USF P2L TWI FIC USP - T T T T T T T F F F F T +$ SXY TWO BHD FOC TUS USS P2S USF P2L TWI FIC USP TOC + T T T T T T T F F F F T T $ (7) Wave-bottom layer T $ ABR UBR BED FBB TBB From 258a7721f0b5b518caead9f352eb28eeb6d0aab3 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 16 Nov 2023 20:26:18 +0000 Subject: [PATCH 45/63] model/inp/ww3_shel.inp: add USSH group 6,14 --- model/inp/ww3_shel.inp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/inp/ww3_shel.inp b/model/inp/ww3_shel.inp index 52ac5ebc0..1fc2220c1 100644 --- a/model/inp/ww3_shel.inp +++ b/model/inp/ww3_shel.inp @@ -258,8 +258,8 @@ $ UST CHA CGE FAW TAW TWA WCC WCF WCH WCM FWS T T T T T T T T T T T $ (6) Wave-Ocean layer T -$ SXY TWO BHD FOC TUS USS P2S USF P2L TWI FIC USP TOC - T T T T T T T F F F F T T +$ SXY TWO BHD FOC TUS USS P2S USF P2L TWI FIC USP TOC USSH + T T T T T T T F F F F T T T $ (7) Wave-bottom layer T $ ABR UBR BED FBB TBB From 921f7a05350003e813ec457b600dc666382e78ea Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 16 Nov 2023 20:27:46 +0000 Subject: [PATCH 46/63] model/inp/ww3_ounf.inp: add USSH to listings --- model/inp/ww3_ounf.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/inp/ww3_ounf.inp b/model/inp/ww3_ounf.inp index 7bde30754..8505a4233 100644 --- a/model/inp/ww3_ounf.inp +++ b/model/inp/ww3_ounf.inp @@ -15,7 +15,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 +$ WCF WCH WCM SXY TWO BHD FOC TUS USS USSH P2S USF P2L TWI FIC ABR UBR BED $ FBB TBB MSS MSC DTD FC CFX CFD CFK U1 U2 WNM TOC $ N From 4c0ee1c3bea3fda41411f16cda5f99d62ac5a0c9 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 16 Nov 2023 20:36:07 +0000 Subject: [PATCH 47/63] matrix.base: update to remove PR3_UQ_MPI switch identifier --- regtests/bin/matrix.base | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regtests/bin/matrix.base b/regtests/bin/matrix.base index 30df4b874..28d78634a 100755 --- a/regtests/bin/matrix.base +++ b/regtests/bin/matrix.base @@ -817,8 +817,8 @@ if [ "$lmp" == "y" ]; # Langmuir mixing parameterization then echo ' ' >> matrix.body - echo "$rtst -s PR3_UQ_MPI -w work_PR3_UQ_MPI -f -p $mpi -n $np $ww3 ww3_tp2.22" >> matrix.body - echo "$rtst -s PR3_UQ_MPI -g sdtail -w work_PR3_UQ_MPI_SDTAIL -f -p $mpi -n $np $ww3 ww3_tp2.22" >> matrix.body + echo "$rtst -w work_LMPN -f -p $mpi -n $np $ww3 ww3_tp2.22" >> matrix.body + echo "$rtst -g sdtail -w work_LMPN_SDTAIL -f -p $mpi -n $np $ww3 ww3_tp2.22" >> matrix.body fi fi From fc6f815738fd83941d1ce6d3201f22697c735328 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 14 Dec 2023 19:34:55 +0000 Subject: [PATCH 48/63] ww3_ounf.inp: update output netcdf from 3 to 4 --- regtests/ww3_tp2.22/input/ww3_ounf.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regtests/ww3_tp2.22/input/ww3_ounf.inp b/regtests/ww3_tp2.22/input/ww3_ounf.inp index 0b8c65089..6d1998f36 100644 --- a/regtests/ww3_tp2.22/input/ww3_ounf.inp +++ b/regtests/ww3_tp2.22/input/ww3_ounf.inp @@ -21,7 +21,7 @@ $ and variable type 4 [2 = SHORT, 3 = it depends , 4 = REAL] $ swell partitions [0 1 2 3 4 5] $ variables in same file [T] or not [F] $ - 3 4 + 4 4 0 1 2 T $ From 53682b5ebb6a6a7d21c379f7ca39b6f80d39aa8a Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 14 Dec 2023 19:43:14 +0000 Subject: [PATCH 49/63] ww3_ounp.inp: update output netcdf from 3 to 4 --- regtests/ww3_tp2.22/input/ww3_ounp.inp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/regtests/ww3_tp2.22/input/ww3_ounp.inp b/regtests/ww3_tp2.22/input/ww3_ounp.inp index 4816a3a7e..4358accbd 100644 --- a/regtests/ww3_tp2.22/input/ww3_ounp.inp +++ b/regtests/ww3_tp2.22/input/ww3_ounp.inp @@ -1,14 +1,14 @@ $ -------------------------------------------------------------------- $ $ WAVEWATCH III NETCDF Point output post-processing $ $--------------------------------------------------------------------- $ -$ First output time (yyyymmdd hhmmss), increment of output (s), +$ First output time (yyyymmdd hhmmss), increment of output (s), $ and number of output times. $ 19680606 000000 21600. 1000 $ $ Points requested --------------------------------------------------- $ $ -$ Define points index for which output is to be generated. +$ Define points index for which output is to be generated. $ If no one defined, all points are selected $ One index number per line, negative number identifies end of list. 1 @@ -21,7 +21,7 @@ $--------------------------------------------------------------------- $ $ file prefix $ number of characters in date [4(yearly),6(monthly),8(daily),10(hourly)] $ netCDF version [3,4] -$ points in same file [T] or not [F] +$ points in same file [T] or not [F] $ and max number of points to be processed in one pass $ output type ITYPE [0,1,2,3] $ flag for global attributes WW3 [0] or variable version [1-2-3-4] @@ -29,8 +29,8 @@ $ flag for dimensions order time,station [T] or station,time [F] $ ww3. 6 - 3 - T 150 + 4 + T 150 1 0 T @@ -72,7 +72,7 @@ $ 2 : Mean wave pars. $ 3 : Nondimensional pars. (U*) $ 4 : Nondimensional pars. (U10) $ 5 : 'Validation table' -$ 6 : WMO standard output +$ 6 : WMO standard output $ 4 $ $ -------------------------------------------------------------------- $ From 4db3dd818c783828fbebca3ba8da8d54611f1e68 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 14 Dec 2023 19:46:26 +0000 Subject: [PATCH 50/63] ww3_ounf.inp: update output variables to match ww3_shel.inp --- regtests/ww3_tp2.22/input/ww3_ounf.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regtests/ww3_tp2.22/input/ww3_ounf.inp b/regtests/ww3_tp2.22/input/ww3_ounf.inp index 6d1998f36..37703605d 100644 --- a/regtests/ww3_tp2.22/input/ww3_ounf.inp +++ b/regtests/ww3_tp2.22/input/ww3_ounf.inp @@ -13,7 +13,7 @@ $ file for a full documentation of field output options. Namelist type $ selection is used here (for alternative F/T flags, see ww3_shel.inp). $ N - HS T01 DIR SPR USS USSH + HS EF T01 DIR SPR USS USSH $ $--------------------------------------------------------------------- $ $ netCDF version [3,4] From c200ab0e0b55ed5bd9ecc75222badf3e60109d7d Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 14 Dec 2023 19:47:34 +0000 Subject: [PATCH 51/63] ww3_outf.inp: update output variables to match ww3_shel.inp --- regtests/ww3_tp2.22/input/ww3_outf.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regtests/ww3_tp2.22/input/ww3_outf.inp b/regtests/ww3_tp2.22/input/ww3_outf.inp index 2ee125996..3bc3e4908 100644 --- a/regtests/ww3_tp2.22/input/ww3_outf.inp +++ b/regtests/ww3_tp2.22/input/ww3_outf.inp @@ -3,7 +3,7 @@ $ ----------------------------------------- 19680606 000000 3600. 12 $ N - HS T01 DIR SPR USS USSH + HS EF T01 DIR SPR USS USSH $ 1 0 $ From 5197ac07db32120964644d114338d39853438b7f Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 14 Dec 2023 19:56:11 +0000 Subject: [PATCH 52/63] ww3_grid.inp: remove output parameters from LMPN namelist section --- model/inp/ww3_grid.inp | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/model/inp/ww3_grid.inp b/model/inp/ww3_grid.inp index 6b0cc5589..55b75a598 100644 --- a/model/inp/ww3_grid.inp +++ b/model/inp/ww3_grid.inp @@ -305,25 +305,25 @@ $ limitation and the GSE alleviation. $ $ Unstructured grids ------------------------------------------------ $ $ UNST parameters : Namelist UNST -$ UGBCCFL : Turns on/off (TRUE/FALSE) the computation of the CFL number on the physical domain boundary. +$ UGBCCFL : Turns on/off (TRUE/FALSE) the computation of the CFL number on the physical domain boundary. $ If FALSE the explicit scheme can be much faster though stability is not guaranteed $ (default TRUE) $ UGOBCAUTO : TRUE: OBC points are taken from type 15 elements (default) $ FALSE: OBC points must be listed in ww3_grid.inp $ UGOBCDEPTH : Threshold ( < 0) depth (default -10) for OBC points if UGOBCAUTO is TRUE -$ UGOBCFILE : File name of file for reading boudary (default 'unset') +$ UGOBCFILE : File name of file for reading boudary (default 'unset') $ -$ The following are TRUE/FALSE variables and only one can be TRUE. -$ By default, EXPFSN is TRUE and must be set to false to activate another option +$ The following are TRUE/FALSE variables and only one can be TRUE. +$ By default, EXPFSN is TRUE and must be set to false to activate another option $ EXPFSN : Activation of N scheme (default option) $ EXPFSPSI : Activation of PSI scheme $ EXPFSFCT : Activation of FCT scheme $ IMPFSN : Activation of N implicit scheme $ EXPTOTAL : Activation of Block explicit N scheme solver $ IMPTOTAL : Activation of fully implicit scheme, non splitting -$ +$ $ The following TRUE/FALSE variables are only for IMPTOTAL=TRUE -$ IMPREFRACTION : Turn on implicit freq. shift (default FALSE) +$ IMPREFRACTION : Turn on implicit freq. shift (default FALSE) $ IMPFREQSHIFT : Turn on implicit freq. shift terms (default FALSE) $ IMPSOURCE : Turn on implicit source terms (default FALSE) $ @@ -332,17 +332,17 @@ $ JGS_TERMINATE_DIFFERENCE : Terminate based on the t $ JGS_TERMINATE_NORM : Terminate based on the norm of the solution (TRUE/FALSE, default FALSE) $ JGS_USE_JACOBI : Use Jacobi solver family (TRUE/FALSE, default TRUE) $ JGS_BLOCK_GAUSS_SEIDEL : Use Block Gauss Seidel method for imptotal instead of the conservative jacobi iterator. (TRUE/FALSE, default TRUE) -$ JGS_MAXITER : Max. Number of solver iterations for JGS_TERMINATE_MAXITER (integer, default 100) -$ JGS_PMIN : % of grid points that do not need to converge during solver iteration (real, default 1) +$ JGS_MAXITER : Max. Number of solver iterations for JGS_TERMINATE_MAXITER (integer, default 100) +$ JGS_PMIN : % of grid points that do not need to converge during solver iteration (real, default 1) $ JGS_DIFF_THR : Implicit solver threshold for JGS_TERMINATE_DIFFERENCE (real, default 1.0e-10) $ JGS_NORM_THR : Norm of the solution for JGS_TERMINATE_NORM (real, default 1.0e-20) $ JGS_LIMITER : TRUE: Use total (quasi-steady: limits whole equation) instead of local limiter (un-steady: limits only source terms) -$ FALSE: default +$ FALSE: default $ JGS_LIMITER_FUNC : 1 - old limiter (default) $ 2 - alternatnive limiter -$ SETUP_APPLY_WLV : Compute wave setup (TRUE/FALSE, default TRUE) +$ 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) +$ CRIT_DEP_SETUP : Critical depth for setup computations (default 0.1) $ $ SMC grid propagation : Namelist PSMC and default values @@ -457,12 +457,6 @@ $ depth (HSL) type. $ 0 : Uniform HSL=10m (default) $ 1 : HSL from coupler $ -$ Output parameters : -$ USS : surface Stokes drift -$ USSX/Y (netCDF: uuss/vuss) -$ USSH : surface layer averaged Stokes drift -$ USSHX/Y (netCDF: uussh/vussh) -$ $ For more info on the Langmuir parameterization, see: $ Li, Qing, et al. "Langmuir mixing effects on global climate: $ WAVEWATCH III in CESM." Ocean Modelling 103 (2016): 145-160. From 308d7a7992af9465412146f872dcd8309cae6228 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 14 Dec 2023 20:18:12 +0000 Subject: [PATCH 53/63] matrix_cmake_[datarmor,milhydro,ukmo_cray]: add "lmp" export --- regtests/bin/matrix_cmake_datarmor | 13 +++++++------ regtests/bin/matrix_cmake_milhydro | 17 +++++++++-------- regtests/bin/matrix_cmake_ukmo_cray | 11 ++++++----- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/regtests/bin/matrix_cmake_datarmor b/regtests/bin/matrix_cmake_datarmor index f8ffaaa63..a197d3a03 100755 --- a/regtests/bin/matrix_cmake_datarmor +++ b/regtests/bin/matrix_cmake_datarmor @@ -27,7 +27,7 @@ usage () { cat 2>&1 << EOF -Usage: $myname model_dir +Usage: $myname model_dir Required: model_dir : path to model dir of WW3 source EOF @@ -51,7 +51,7 @@ main_dir="`cd $main_dir 1>/dev/null 2>&1 && pwd`" # 1. Set up - + export np='28' #number of mpi tasks export npl='28' #number of mpi tasks for ufs applications and large setups export npl1='20' #number of mpi tasks for ufs/large setups (b4b check) @@ -151,9 +151,10 @@ main_dir="`cd $main_dir 1>/dev/null 2>&1 && pwd`" export shwtr='y' # shallow water tests export unstr='y' # unstructured grid tests export pdlib='y' # unstr with pdlib for domain decomposition and implicit solver + export lmp='y' # Langmuir mixing parameterization export smcgr='y' # SMC grid test export rtd='y' # Rotated pole test - export mudice='y' # Mud/Ice and wave interaction tests + export mudice='y' # Mud/Ice and wave interaction tests export infgrv='y' # Second harmonic generation tests export uost='y' # ww3_ts4 Unresolved Obstacles Source Term (UOST) export assim='y' # Restart spectra update @@ -178,17 +179,17 @@ main_dir="`cd $main_dir 1>/dev/null 2>&1 && pwd`" export nth_b4b='y' # Thread Reproducibility export esmf='n' # ESMF coupling # export filter='PR3 ST2 UQ' - # The filter does a set of consecutive greps on the + # The filter does a set of consecutive greps on the # command lines generated by filter.base with the above # selected options. # --------------------------------------------------------------------------- # # 2. Execute matrix.base ... # # --------------------------------------------------------------------------- # - + $main_dir/../regtests/bin/matrix.base - $main_dir/../regtests/bin/matrix_divider_cmake.sh + $main_dir/../regtests/bin/matrix_divider_cmake.sh # --------------------------------------------------------------------------- # # End to the matrix # diff --git a/regtests/bin/matrix_cmake_milhydro b/regtests/bin/matrix_cmake_milhydro index 8213b9b33..6be47ab24 100755 --- a/regtests/bin/matrix_cmake_milhydro +++ b/regtests/bin/matrix_cmake_milhydro @@ -19,10 +19,10 @@ # # # --------------------------------------------------------------------------- # usage () -{ +{ cat 2>&1 << EOF - Usage: $myname model_dir + Usage: $myname model_dir Required: model_dir : path to model dir of WW3 source EOF @@ -41,7 +41,7 @@ EOF # Convert main_dir to absolute path main_dir="`cd $main_dir 1>/dev/null 2>&1 && pwd`" -# Set batchq queue, choose modules and other custom variables to fit system and +# Set batchq queue, choose modules and other custom variables to fit system and # to define headers etc (default to original version if empty) # 1. Set up # 1.a Computer/ user dependent set up @@ -58,7 +58,7 @@ EOF echo " export path_build_root=$(dirname $main_dir)/regtests/buildmatrix" >> matrix.head echo ' [[ -d ${path_build_root} ]] && rm -rf ${path_build_root}' >> matrix.head - echo ' ' + echo ' ' if [ "$batchq" = 'slurm' ] then @@ -97,9 +97,10 @@ echo " export path_build_root=$(dirname $main_dir)/regtests/buildmatrix" >> mat export shwtr='y' # shallow water tests export unstr='y' # unstructured grid tests export pdlib='y' # unstr with pdlib for domain decomposition and implicit solver + export lmp='y' # Langmuir mixing parameterization export smcgr='y' # SMC grid test export rtd='y' # Rotated pole test - export mudice='y' # Mud/Ice and wave interaction tests + export mudice='y' # Mud/Ice and wave interaction tests export infgrv='y' # Second harmonic generation tests export uost='y' # ww3_ts4 Unresolved Obstacles Source Term (UOST) export assim='y' # Restart spectra update @@ -124,14 +125,14 @@ echo " export path_build_root=$(dirname $main_dir)/regtests/buildmatrix" >> mat export npl_b4b='n' # MPI task Reproducibility export nth_b4b='n' # Thread Reproducibility export esmf='n' # ESMF coupling - # The filter does a set of consecutinve greps on the + # The filter does a set of consecutinve greps on the # command lines generated by filter.base with the above # selected options. # --------------------------------------------------------------------------- # # 2. Execute matrix.base ... # # --------------------------------------------------------------------------- # - + $main_dir/../regtests/bin/matrix.base @@ -146,7 +147,7 @@ echo " export path_build_root=$(dirname $main_dir)/regtests/buildmatrix" >> mat do echo "sbatch < $file" >> msuball.sh done - fi + fi # --------------------------------------------------------------------------- # # End to the matrix # diff --git a/regtests/bin/matrix_cmake_ukmo_cray b/regtests/bin/matrix_cmake_ukmo_cray index fc6cf64b9..a4df5da0a 100755 --- a/regtests/bin/matrix_cmake_ukmo_cray +++ b/regtests/bin/matrix_cmake_ukmo_cray @@ -29,7 +29,7 @@ usage () { cat 2>&1 << EOF - Usage: $myname model_dir + Usage: $myname model_dir Required: model_dir : path to model dir of WW3 source EOF @@ -139,14 +139,15 @@ fi export shwtr='y' # shallow water tests export unstr='y' # unstructured grid tests export pdlib='y' # unstr with pdlib for domain decomposition and implicit solver + export lmp='y' # Langmuir mixing parameterization export smcgr='y' # SMC grid test export rtd='y' # Rotated pole test - export mudice='y' # Mud/Ice and wave interaction tests + export mudice='y' # Mud/Ice and wave interaction tests export infgrv='y' # Second harmonic generation tests export uost='y' # ww3_ts4 Unresolved Obstacles Source Term (UOST) export assim='y' # Restart spectra update export oasis='y' # Atmosphere, ocean, and ice coupling using oasis - export calendar='y' # Calendar type + export calendar='y' # Calendar type export confignc='y' # Configurable netCDF meta data (ww3_ounf) export multi01='y' # mww3_test_01 (wetting and drying) @@ -166,14 +167,14 @@ fi export nth_b4b='y' # Thread Reproducibility export esmf='n' # ESMF coupling # export filter='PR3 ST2 UQ' - # The filter does a set of consecutinve greps on the + # The filter does a set of consecutinve greps on the # command lines generated by filter.base with the above # selected options. # --------------------------------------------------------------------------- # # 2. Execute matrix.base ... # # --------------------------------------------------------------------------- # - + $main_dir/../regtests/bin/matrix.base $main_dir/../regtests/bin/matrix_divider_cmake.sh From 75dc7da5767c7e61b947c162888e271ad403abfc Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Tue, 19 Dec 2023 19:40:47 +0000 Subject: [PATCH 54/63] ww3_shel.inp: remove output parameter "EF" --- regtests/ww3_tp2.22/input/ww3_shel.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regtests/ww3_tp2.22/input/ww3_shel.inp b/regtests/ww3_tp2.22/input/ww3_shel.inp index 6b946943c..8a32e5584 100644 --- a/regtests/ww3_tp2.22/input/ww3_shel.inp +++ b/regtests/ww3_tp2.22/input/ww3_shel.inp @@ -18,7 +18,7 @@ $ 19680606 000000 3600 19680608 000000 $ N - HS EF T01 DIR SPR USS USSH + HS T01 DIR SPR USS USSH $ 19680606 000000 21600 19680608 000000 0.0 0.0 'LEFT' From ef8e0389408daf0aaf99c29a4c98bb2c655aa172 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Tue, 19 Dec 2023 19:41:30 +0000 Subject: [PATCH 55/63] ww3_outf.inp: remove output parameter "EF" --- regtests/ww3_tp2.22/input/ww3_outf.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regtests/ww3_tp2.22/input/ww3_outf.inp b/regtests/ww3_tp2.22/input/ww3_outf.inp index 3bc3e4908..2ee125996 100644 --- a/regtests/ww3_tp2.22/input/ww3_outf.inp +++ b/regtests/ww3_tp2.22/input/ww3_outf.inp @@ -3,7 +3,7 @@ $ ----------------------------------------- 19680606 000000 3600. 12 $ N - HS EF T01 DIR SPR USS USSH + HS T01 DIR SPR USS USSH $ 1 0 $ From 586450e0ddc439c80e833c46d717b75be9bf890a Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Tue, 19 Dec 2023 19:42:48 +0000 Subject: [PATCH 56/63] ww3_ounf.inp: remove output parameter "EF" --- regtests/ww3_tp2.22/input/ww3_ounf.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regtests/ww3_tp2.22/input/ww3_ounf.inp b/regtests/ww3_tp2.22/input/ww3_ounf.inp index 37703605d..6d1998f36 100644 --- a/regtests/ww3_tp2.22/input/ww3_ounf.inp +++ b/regtests/ww3_tp2.22/input/ww3_ounf.inp @@ -13,7 +13,7 @@ $ file for a full documentation of field output options. Namelist type $ selection is used here (for alternative F/T flags, see ww3_shel.inp). $ N - HS EF T01 DIR SPR USS USSH + HS T01 DIR SPR USS USSH $ $--------------------------------------------------------------------- $ $ netCDF version [3,4] From ea361a58635c4cfe22065571c44abcb7dc249b9b Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 22 Feb 2024 19:10:13 +0000 Subject: [PATCH 57/63] matrix_cmake_ncep: update modules for spack-stack --- regtests/bin/matrix_cmake_ncep | 57 +++++++++++++++------------------- 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/regtests/bin/matrix_cmake_ncep b/regtests/bin/matrix_cmake_ncep index 771b6f96e..7d0d26bec 100755 --- a/regtests/bin/matrix_cmake_ncep +++ b/regtests/bin/matrix_cmake_ncep @@ -41,16 +41,18 @@ EOF # Convert main_dir to absolute path main_dir="`cd $main_dir 1>/dev/null 2>&1 && pwd`" -# Module Versions from HPC-Stack that are common for all platforms - modnetcdf='netcdf/4.7.4' - modjasper='jasper/2.0.25' - modzlib='zlib/1.2.11' +# Module Versions from spack-stack that are common for all platforms + modnetcdfc='netcdf-c/4.9.2' + modnetcdff='netcdf-fortran/4.6.0' + modjasper='jasper/2.0.32' + modzlib='zlib/1.2.13' modpng='libpng/1.6.37' - modhdf5='hdf5/1.10.6' + modhdf5='hdf5/1.14.0' modbacio='bacio/2.4.1' modg2='g2/3.4.5' - modw3emc='w3emc/2.9.2' - modesmf='esmf/8.3.0b09' + modw3emc='w3emc/2.10.0' + modesmf='esmf/8.4.2' + modscotch='scotch/7.0.4' # Set batchq queue, choose modules and other custom variables to fit system and # to define headers etc (default to original version if empty) @@ -60,27 +62,19 @@ EOF then # If no other h, assuming Hera batchq='slurm' - basemodcomp='intel/2022.1.2' - basemodmpi='impi/2022.1.2' - hpcstackpath='/scratch1/NCEPDEV/nems/role.epic/hpc-stack/libs/intel-2022.1.2/modulefiles/stack' - hpcstackversion='hpc/1.2.0' - modcomp='hpc-intel/2022.1.2' - modmpi='hpc-impi/2022.1.2' - scotchpath='/scratch1/NCEPDEV/climate/Matthew.Masarik/waves/opt/hpc-stack/scotch-v7.0.3/install' - metispath='/scratch1/NCEPDEV/climate/Matthew.Masarik/waves/opt/hpc-stack/parmetis-4.0.3/install' - modcmake='cmake/3.20.1' + spackstackpath='/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.0/envs/unified-env-noavx512/install/modulefiles/Core' + modcomp='stack-intel/2021.5.0' + modmpi='stack-intel-oneapi-mpi/2021.5.1' + metispath='/scratch1/NCEPDEV/climate/Matthew.Masarik/waves/opt/spack-stack/1.5.0/parmetis-4.0.3/install' + modcmake='cmake/3.23.1' elif [ $isorion ] then batchq='slurm' - basemodcomp='intel/2022.1.2' - basemodmpi='impi/2022.1.2' - hpcstackpath='/work/noaa/epic-ps/role-epic-ps/hpc-stack/libs/intel-2022.1.2/modulefiles/stack' - hpcstackversion='hpc/1.2.0' - modcomp='hpc-intel/2022.1.2' - modmpi='hpc-impi/2022.1.2' - scotchpath='/work2/noaa/marine/mmasarik/waves/opt/hpc-stack/scotch-v7.0.3/install' - metispath='/work2/noaa/marine/mmasarik/waves/opt/hpc-stack/parmetis-4.0.3/install' - modcmake='cmake/3.22.1' + spackstackpath='/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.5.0/envs/unified-env/install/modulefiles/Core' + modcomp='stack-intel/2022.0.2' + modmpi='stack-intel-oneapi-mpi/2021.5.1' + metispath='/work/noaa/marine/Matthew.Masarik/waves/opt/spack-stack/1.5.0/parmetis-4.0.3/install' + modcmake='cmake/3.23.1' else batchq= fi @@ -96,7 +90,7 @@ EOF # 1.a Computer/ user dependent set up - echo '#!/bin/sh --login' > matrix.head + echo '#!/bin/sh' > matrix.head echo ' ' >> matrix.head if [ $batchq = "slurm" ] && [ $isorion ] then @@ -139,29 +133,28 @@ EOF # Netcdf, Parmetis and SCOTCH modules & variables echo " module purge" >> matrix.head - echo " module load $modcmake" >> matrix.head if [ ! -z $basemodcomp ]; then echo " module load $basemodcomp" >> matrix.head fi if [ ! -z $basemodmpi ]; then echo " module load $basemodmpi" >> matrix.head fi - echo " module use $hpcstackpath" >> matrix.head - echo " module load $hpcstackversion" >> matrix.head + echo " module use $spackstackpath" >> matrix.head echo " module load $modcomp" >> matrix.head echo " module load $modmpi" >> matrix.head + echo " module load $modcmake" >> matrix.head echo " module load $modpng" >> matrix.head echo " module load $modzlib" >> matrix.head echo " module load $modjasper" >> matrix.head echo " module load $modhdf5" >> matrix.head - echo " module load $modnetcdf" >> matrix.head + echo " module load $modnetcdfc" >> matrix.head + echo " module load $modnetcdff" >> matrix.head echo " module load $modbacio" >> matrix.head echo " module load $modg2" >> matrix.head echo " module load $modw3emc" >> matrix.head echo " module load $modesmf" >> matrix.head - + echo " module load $modscotch" >> matrix.head echo " export METIS_PATH=${metispath}" >> matrix.head - echo " export SCOTCH_PATH=${scotchpath}" >> matrix.head echo " export path_build_root=$(dirname $main_dir)/regtests/buildmatrix" >> matrix.head echo ' [[ -d ${path_build_root} ]] && rm -rf ${path_build_root}' >> matrix.head echo ' ' From 3caad4e1f861a2df245f7ca999bda00b323f50b0 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Fri, 23 Feb 2024 15:11:03 +0000 Subject: [PATCH 58/63] intel.yml: update cache key --- .github/workflows/intel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index 700553cea..ef7f6721e 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -8,7 +8,7 @@ concurrency: # Set I_MPI_CC/F90 so Intel MPI wrapper uses icc/ifort instead of gcc/gfortran env: - cache_key: intel10 + cache_key: intel11 CC: icc FC: ifort CXX: icpc From 6e7b1adc2343a559db12e33030810f80f1f1bb1c Mon Sep 17 00:00:00 2001 From: Edward Hartnett <38856240+edwardhartnett@users.noreply.github.com> Date: Tue, 26 Dec 2023 13:16:55 -0700 Subject: [PATCH 59/63] Updated intel workflow to install oneapi compilers from new location. (#1157) --- .github/workflows/intel.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index ef7f6721e..54a388c55 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -1,3 +1,8 @@ +# This is a GitHub actions workflow for WW3. +# +# This workflow builds with the Intel compilers. +# +# Matt Masarik, Alex Richert, Ed Hartnett name: Intel Linux Build on: [push, pull_request, workflow_dispatch] @@ -8,7 +13,7 @@ concurrency: # Set I_MPI_CC/F90 so Intel MPI wrapper uses icc/ifort instead of gcc/gfortran env: - cache_key: intel11 + cache_key: intel10-3 CC: icc FC: ifort CXX: icpc @@ -51,7 +56,7 @@ jobs: sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list sudo apt-get update - sudo apt-get install intel-oneapi-dev-utilities intel-oneapi-mpi-devel intel-oneapi-openmp intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic + sudo apt-get install intel-oneapi-dev-utilities intel-oneapi-mpi-devel intel-oneapi-compiler-fortran-2023.2.1 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.1 intel-oneapi-openmp # Build WW3 spack environment - name: install-dependencies-with-spack From a10573cb44a2128c061280055f40031ab1baa284 Mon Sep 17 00:00:00 2001 From: Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> Date: Thu, 11 Jan 2024 14:12:05 -0500 Subject: [PATCH 60/63] Update Intel CI (relocate /usr/local; ensure intel-oneapi-mpi; use ubuntu-latest) (#1161) --- .github/workflows/intel.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index 54a388c55..f5de65dcd 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -26,7 +26,7 @@ env: jobs: setup: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: @@ -62,6 +62,7 @@ jobs: - name: install-dependencies-with-spack if: steps.cache-env.outputs.cache-hit != 'true' run: | + sudo mv /usr/local /usr/local_mv # Install NetCDF, ESMF, g2, etc using Spack . /opt/intel/oneapi/setvars.sh git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git @@ -72,7 +73,7 @@ jobs: spack compiler find sudo apt install cmake spack external find - spack add intel-oneapi-mpi + spack config add "packages:mpi:require:'intel-oneapi-mpi'" spack config add "packages:all:require:['%intel']" spack concretize spack install --dirty -v --fail-fast @@ -97,7 +98,7 @@ jobs: strategy: matrix: switch: [Ifremer1, NCEP_st2, NCEP_st4, ite_pdlib, NCEP_st4sbs, NCEP_glwu, OASACM, UKMO, MULTI_ESMF] - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: checkout-ww3 @@ -118,6 +119,8 @@ jobs: - name: build-ww3 run: | + sudo mv /usr/local /usr/local_mv + sudo apt install cmake . /opt/intel/oneapi/setvars.sh source spack/share/spack/setup-env.sh spack env activate ww3-intel From 30729521bb8550b00504ac6f033e749578bf3d30 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Fri, 23 Feb 2024 15:46:03 +0000 Subject: [PATCH 61/63] intel.yml: update cache key --- .github/workflows/intel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index f5de65dcd..1159e8599 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -13,7 +13,7 @@ concurrency: # Set I_MPI_CC/F90 so Intel MPI wrapper uses icc/ifort instead of gcc/gfortran env: - cache_key: intel10-3 + cache_key: intel12 CC: icc FC: ifort CXX: icpc From 6944915c718daf194080028a9951d09f31900a20 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Fri, 23 Feb 2024 19:57:43 +0000 Subject: [PATCH 62/63] matrix_cmake_ncep: remove temp module updates used for internal testing --- regtests/bin/matrix_cmake_ncep | 57 +++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/regtests/bin/matrix_cmake_ncep b/regtests/bin/matrix_cmake_ncep index 4e2b3504d..8d1ca00e5 100755 --- a/regtests/bin/matrix_cmake_ncep +++ b/regtests/bin/matrix_cmake_ncep @@ -41,18 +41,16 @@ EOF # Convert main_dir to absolute path main_dir="`cd $main_dir 1>/dev/null 2>&1 && pwd`" -# Module Versions from spack-stack that are common for all platforms - modnetcdfc='netcdf-c/4.9.2' - modnetcdff='netcdf-fortran/4.6.0' - modjasper='jasper/2.0.32' - modzlib='zlib/1.2.13' +# Module Versions from HPC-Stack that are common for all platforms + modnetcdf='netcdf/4.7.4' + modjasper='jasper/2.0.25' + modzlib='zlib/1.2.11' modpng='libpng/1.6.37' - modhdf5='hdf5/1.14.0' + modhdf5='hdf5/1.10.6' modbacio='bacio/2.4.1' modg2='g2/3.4.5' - modw3emc='w3emc/2.10.0' - modesmf='esmf/8.4.2' - modscotch='scotch/7.0.4' + modw3emc='w3emc/2.9.2' + modesmf='esmf/8.3.0b09' # Set batchq queue, choose modules and other custom variables to fit system and # to define headers etc (default to original version if empty) @@ -62,19 +60,27 @@ EOF then # If no other h, assuming Hera batchq='slurm' - spackstackpath='/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.0/envs/unified-env-noavx512/install/modulefiles/Core' - modcomp='stack-intel/2021.5.0' - modmpi='stack-intel-oneapi-mpi/2021.5.1' - metispath='/scratch1/NCEPDEV/climate/Matthew.Masarik/waves/opt/spack-stack/1.5.0/parmetis-4.0.3/install' - modcmake='cmake/3.23.1' + basemodcomp='intel/2022.1.2' + basemodmpi='impi/2022.1.2' + hpcstackpath='/scratch1/NCEPDEV/nems/role.epic/hpc-stack/libs/intel-2022.1.2/modulefiles/stack' + hpcstackversion='hpc/1.2.0' + modcomp='hpc-intel/2022.1.2' + modmpi='hpc-impi/2022.1.2' + scotchpath='/scratch1/NCEPDEV/climate/Matthew.Masarik/waves/opt/hpc-stack/scotch-v7.0.3/install' + metispath='/scratch1/NCEPDEV/climate/Matthew.Masarik/waves/opt/hpc-stack/parmetis-4.0.3/install' + modcmake='cmake/3.20.1' elif [ $isorion ] then batchq='slurm' - spackstackpath='/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.5.0/envs/unified-env/install/modulefiles/Core' - modcomp='stack-intel/2022.0.2' - modmpi='stack-intel-oneapi-mpi/2021.5.1' - metispath='/work/noaa/marine/Matthew.Masarik/waves/opt/spack-stack/1.5.0/parmetis-4.0.3/install' - modcmake='cmake/3.23.1' + basemodcomp='intel/2022.1.2' + basemodmpi='impi/2022.1.2' + hpcstackpath='/work/noaa/epic-ps/role-epic-ps/hpc-stack/libs/intel-2022.1.2/modulefiles/stack' + hpcstackversion='hpc/1.2.0' + modcomp='hpc-intel/2022.1.2' + modmpi='hpc-impi/2022.1.2' + scotchpath='/work2/noaa/marine/mmasarik/waves/opt/hpc-stack/scotch-v7.0.3/install' + metispath='/work2/noaa/marine/mmasarik/waves/opt/hpc-stack/parmetis-4.0.3/install' + modcmake='cmake/3.22.1' else batchq= fi @@ -90,7 +96,7 @@ EOF # 1.a Computer/ user dependent set up - echo '#!/bin/sh' > matrix.head + echo '#!/bin/sh --login' > matrix.head echo ' ' >> matrix.head if [ $batchq = "slurm" ] && [ $isorion ] then @@ -133,28 +139,29 @@ EOF # Netcdf, Parmetis and SCOTCH modules & variables echo " module purge" >> matrix.head + echo " module load $modcmake" >> matrix.head if [ ! -z $basemodcomp ]; then echo " module load $basemodcomp" >> matrix.head fi if [ ! -z $basemodmpi ]; then echo " module load $basemodmpi" >> matrix.head fi - echo " module use $spackstackpath" >> matrix.head + echo " module use $hpcstackpath" >> matrix.head + echo " module load $hpcstackversion" >> matrix.head echo " module load $modcomp" >> matrix.head echo " module load $modmpi" >> matrix.head - echo " module load $modcmake" >> matrix.head echo " module load $modpng" >> matrix.head echo " module load $modzlib" >> matrix.head echo " module load $modjasper" >> matrix.head echo " module load $modhdf5" >> matrix.head - echo " module load $modnetcdfc" >> matrix.head - echo " module load $modnetcdff" >> matrix.head + echo " module load $modnetcdf" >> matrix.head echo " module load $modbacio" >> matrix.head echo " module load $modg2" >> matrix.head echo " module load $modw3emc" >> matrix.head echo " module load $modesmf" >> matrix.head - echo " module load $modscotch" >> matrix.head + echo " export METIS_PATH=${metispath}" >> matrix.head + echo " export SCOTCH_PATH=${scotchpath}" >> matrix.head echo " export path_build_root=$(dirname $main_dir)/regtests/buildmatrix" >> matrix.head echo ' [[ -d ${path_build_root} ]] && rm -rf ${path_build_root}' >> matrix.head echo ' ' From 749feab460058257fb4bb89fa16b50ec90e5a126 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Tue, 19 Mar 2024 08:49:01 -0500 Subject: [PATCH 63/63] w3iogomd.F90: fix IF-stmt indention --- model/src/w3iogomd.F90 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/model/src/w3iogomd.F90 b/model/src/w3iogomd.F90 index 144c2f833..61495a6fe 100644 --- a/model/src/w3iogomd.F90 +++ b/model/src/w3iogomd.F90 @@ -1602,7 +1602,7 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 ) TPMS(JSEA) = TPI/SIG(IK) END IF - IF (LMPENABLED) then + IF (LMPENABLED) then IF (HSLMODE.EQ.0) then LHSL = 10.0 ! a constant value for testing purposes ELSE @@ -1610,8 +1610,8 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 ) IX = MAPSF(ISEA,1) IY = MAPSF(ISEA,2) LHSL = HSL(IX,IY) ! depth over which SD is averaged - END IF END IF + END IF ! ! Directional moments in the last freq. band @@ -1654,12 +1654,12 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 ) GRAV*WN(IK,ISEA) * EBD(IK,JSEA) / (SINH(2.*KD)) IF (LMPENABLED) THEN USSCOH=0.5*FKD*SIG(IK)*(1.-EXP(-2.*WN(IK,ISEA)*LHSL))/LHSL*COSH(2.*KD) - ENDIF + ENDIF ELSE USSCO=FACTOR*SIG(IK)*2.*WN(IK,ISEA) IF (LMPENABLED) THEN USSCOH=FACTOR*SIG(IK)*(1.-EXP(-2.*WN(IK,ISEA)*LHSL))/LHSL - ENDIF + ENDIF END IF ! ABXX(JSEA) = MAX ( 0. , ABXX(JSEA) ) * FACTOR @@ -1678,7 +1678,7 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 ) IF (LMPENABLED) THEN USSHX(JSEA) = USSHX(JSEA) + ABX(JSEA)*USSCOH USSHY(JSEA) = USSHY(JSEA) + ABY(JSEA)*USSCOH - ENDIF + ENDIF ! ! Fills the 3D Stokes drift spectrum array ! ! The US3D Stokes drift specrum array is now calculated in a @@ -1961,8 +1961,8 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 ) IX = MAPSF(ISEA,1) IY = MAPSF(ISEA,2) LHSL = HSL(IX,IY) ! depth over which SD is averaged - END IF END IF + END IF ! ! 3.a Directional mss parameters ! NB: the slope PDF is proportional to ell1=ETYY*EC2-2*ETXY*ECS+ETXX*ES2 = C*EC2-2*B*ECS+A*ES2 @@ -2008,7 +2008,7 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 ) USSHY(JSEA) = USSHY(JSEA) + 2*GRAV*ETUSCY(JSEA)/SIG(NK) & *(1.-(1.-4.*LHSL*WN(NK,ISEA))*EXP(-2.*WN(NK,ISEA)*LHSL)) & /6./WN(NK,ISEA)/LHSL - END IF + END IF UBS(JSEA) = UBS(JSEA) + FTWL * EBAND/GRAV END DO !