From e81b80a521bf0a7e9facb3b423a00a580e910bb4 Mon Sep 17 00:00:00 2001 From: Carsten Hansen Date: Tue, 15 Sep 2020 16:31:55 +0200 Subject: [PATCH 1/3] Fb rtd2 (#7) FB_rtd2: Output boundary conditions to rotated grids * This feature allows the user to specify the pole of each nested grid output of boundary conditions (nest) file. - There is no effect unless the switch RTD is set for compilation. - The contents of b.c. output files nestI.ww3 are not affected. - A model compiled with combined switches SMC and RTD is not affected. * Updated manual Sec. "3.4.9 Rotated grids" * Added regtests for testing input/output BCs in rotated pole context. * Updated revision of ww3_bound.ftn to 7.11 * Added new ww3_tr1 regtest (rotated pole) to matrix.base. Also, split the SMC/RTD regtests into their own separate switches. Co-authored-by: ukmo-chris.bunney --- manual/num/rotagrid.tex | 45 +- model/ftn/w3iobcmd.ftn | 52 +- model/ftn/w3updtmd.ftn | 16 +- model/ftn/ww3_bound.ftn | 2 +- model/ftn/ww3_grid.ftn | 217 +++++-- model/ftn/ww3_ounf.ftn | 202 ++++--- model/inp/ww3_grid.inp | 47 +- model/nml/namelists.nml | 634 ++++++++++++++++----- regtests/bin/matrix.base | 31 +- regtests/bin/matrix.comp | 2 +- regtests/bin/matrix_datarmor | 3 +- regtests/bin/matrix_ncep | 3 +- regtests/bin/matrix_ukmo_cray | 7 +- regtests/bin/matrix_zeus_HLT | 3 +- regtests/ww3_tr1/info | 45 ++ regtests/ww3_tr1/input/switch | 1 + regtests/ww3_tr1/input/ww3_grid.inp | 58 ++ regtests/ww3_tr1/input/ww3_outp.inp | 10 + regtests/ww3_tr1/input/ww3_shel.inp | 34 ++ regtests/ww3_tr1/input_bndin/bnd1.spc | 101 ++++ regtests/ww3_tr1/input_bndin/bnd2.spc | 101 ++++ regtests/ww3_tr1/input_bndin/bnd3.spc | 101 ++++ regtests/ww3_tr1/input_bndin/switch | 1 + regtests/ww3_tr1/input_bndin/ww3_bound.inp | 12 + regtests/ww3_tr1/input_bndin/ww3_grid.inp | 39 ++ regtests/ww3_tr1/input_bndin/ww3_outp.inp | 10 + regtests/ww3_tr1/input_bndin/ww3_shel.inp | 31 + regtests/ww3_tr1/input_std/switch | 1 + regtests/ww3_tr1/input_std/ww3_grid.inp | 56 ++ regtests/ww3_tr1/input_std/ww3_outp.inp | 10 + regtests/ww3_tr1/input_std/ww3_shel.inp | 34 ++ 31 files changed, 1571 insertions(+), 338 deletions(-) create mode 100644 regtests/ww3_tr1/info create mode 100644 regtests/ww3_tr1/input/switch create mode 100644 regtests/ww3_tr1/input/ww3_grid.inp create mode 100644 regtests/ww3_tr1/input/ww3_outp.inp create mode 100644 regtests/ww3_tr1/input/ww3_shel.inp create mode 100644 regtests/ww3_tr1/input_bndin/bnd1.spc create mode 100644 regtests/ww3_tr1/input_bndin/bnd2.spc create mode 100644 regtests/ww3_tr1/input_bndin/bnd3.spc create mode 100644 regtests/ww3_tr1/input_bndin/switch create mode 100644 regtests/ww3_tr1/input_bndin/ww3_bound.inp create mode 100644 regtests/ww3_tr1/input_bndin/ww3_grid.inp create mode 100644 regtests/ww3_tr1/input_bndin/ww3_outp.inp create mode 100644 regtests/ww3_tr1/input_bndin/ww3_shel.inp create mode 100644 regtests/ww3_tr1/input_std/switch create mode 100644 regtests/ww3_tr1/input_std/ww3_grid.inp create mode 100644 regtests/ww3_tr1/input_std/ww3_outp.inp create mode 100644 regtests/ww3_tr1/input_std/ww3_shel.inp diff --git a/manual/num/rotagrid.tex b/manual/num/rotagrid.tex index c44c6f387e..c0e5249da9 100644 --- a/manual/num/rotagrid.tex +++ b/manual/num/rotagrid.tex @@ -4,8 +4,8 @@ \subsubsection{~Rotated grids} \label{sub:num_space_rotagrid} \noindent The rotated grid is a latitude-longitude (lat-lon) grid and is obtained by -rotating the North Pole to a new position at latitude $\phi_{p}$ and -longitude $\lambda_{p}$ in the standard latitude-longitude system. The new +rotating the North Pole along a longitude $\lambda_{p}$ to a new position at +latitude $\phi_{p}$ in the standard latitude-longitude system. The new pole position is chosen so that the model domain of interest may be placed around the rotated equatorial area for a evenly-spaced lat-lon mesh. For this reason the rotated grid is also known as \emph{Equatorial grid}. For instance, @@ -15,22 +15,41 @@ \subsubsection{~Rotated grids} \label{sub:num_space_rotagrid} grid allows a much more evenly spaced lat-lon mesh in the NAEW domain than the standard lat-lon grid in the same area. -In \ws\, the rotated grid is implemented with minimum changes to the original +In \ws, the rotated grid is implemented with minimum changes to the original lat-lon grid. In fact, the rotated grid is treated just like the standard lat-lon grid inside the model. To set up and run a rotated grid model configuration, users should choose the regular lat-lon grid along with the {\code RTD} switch. -The rotated pole position is set using the {\code PLAT} and {\code PLON} variables in the -{\bf ww3\_grid.inp} namelist {\code ROTD}. Model input files, like wind, current and ice files -should be mapped on to the rotated grid. For convenience of nesting in standard -lat-lon grid frameworks, boundary conditions provided to and output from the +The rotated pole position is set using the {\code PLAT} and {\code PLON} variables +under the namelist {\code ROTD} in the input file {\bf ww3\_grid.inp} +(see Sect.~\ref{sec:config011}). If the pole is set as {\code PLAT = 90.0}, +{\code PLON = -180.0}, the grid is treated as a standard lat-lon system. + +Model input files, like wind, current and ice files +should be mapped on to the rotated grid. For convenience of nesting in standard +lat-lon grid frameworks, boundary conditions data provided to and output from the rotated grid use spectra referenced to a standard grid north and standard lat-lon -grid points values, which are converted into rotated grid lat-lon inside \ws\. -The list of 2D spectral output locations in {\bf ww3\_shel.inp} are also specified in -standard lat-lon. +grid points values, which are converted into rotated grid lat-lon inside \ws. +The list of 2D spectral output locations in {\bf ww3\_shel.inp} or +{\bf ww3\_shel.nml} are also specified in standard lat-lon. + +When nesting from a standard grid to a rotated grid model, both the outer and inner +grids should be built with the {\code RTD} switch set when compiling executables for +the models. When nesting from a rotated grid to a standard grid model, the inner +(standard) grid model does not require to be built with {\code RTD}. + +Output of spectra at boundary points to one-way nested inner grids are transferred +as described in Appendix~\ref{app:nest}. Output b.c.\ are defined in the input +file (see {\bf ww3\_grid.inp}, Sect.~\ref{sec:config011}) as a sequence of straight +lines given in coordinates of the inner grid. If the inner grid is rotated, it's +pole position must be defined as the values of the array elements +{\code BPLAT(\sl{n})} and {\code BPLON(\sl{n})} under namelist {\code ROTB} +for the outer grid. The array index {\sl{n}} is the index ({\sl{1:9}}) of the boundary +conditions file {\file nest{\sl{n}}.ww3}. -Model directional and x-y vector outputs can be converted to a standard grid -north reference by setting the UNROT variable in the {\bf ww3\_grid.inp} namelist -ROTD to True. With this set, for point outputs lat-lon locations all directional +Model directional and x-y vector outputs from a rotated grid can be converted +to a standard grid north reference by setting the UNROT variable in the +{\bf ww3\_grid.inp} namelist ROTD to True. With this set, for point outputs +lat-lon locations all directional values such as wind direction, current direction and 2D spectra are converted into standard lat-lon orientation. Functions to de-rotate gridded fields are applied in {\bf ww3\_ounf}, {\bf ww3\_outf} and {\bf ww3\_grib}. diff --git a/model/ftn/w3iobcmd.ftn b/model/ftn/w3iobcmd.ftn index 9f6f9c94d8..115642f772 100644 --- a/model/ftn/w3iobcmd.ftn +++ b/model/ftn/w3iobcmd.ftn @@ -103,6 +103,8 @@ !/ (T.J. Campbell, NRL) ( version 6.02 ) !/ 01-Mar-2018 : Rotate boundary points and directions !/ of input spectra for rotated grids ( version 6.02 ) +!/ 07-Oct-2019 : RTD option with standard lat-lon +!/ grid when nesting to rotated grid ( version 7.11 ) !/ ! 1. Purpose : ! @@ -230,8 +232,6 @@ !/RTD !! Declare rotation angle and rotated lat/lon variables for !/RTD !! boundary points. JGLi12Jun2012 !/RTD REAL, ALLOCATABLE :: Anglbdy(:), ELatbdy(:), ELonbdy(:) - REAL, ALLOCATABLE :: XBPO2(:), YBPO2(:) -!/RTD REAL, ALLOCATABLE :: ANG(:) !/RTD REAL :: Spectr(NK*NTH) !/RTD REAL :: XRLIM, YRLIM REAL, ALLOCATABLE :: TMPSPC(:,:) @@ -311,26 +311,12 @@ !/T WRITE (NDST,9002) IFILE, NDSL(IFILE), IDSTRBC, & !/T VERBPTBC, NBO(IFILE)-NBO(IFILE-1) ! -! - ! Temporary storage for boundary points: - ! The arrays are required to allow rotation of - ! x,y coordinate data under the /RTD option - ALLOCATE( XBPO2(NBO(IFILE)-NBO(IFILE-1)) ) - ALLOCATE( YBPO2(NBO(IFILE)-NBO(IFILE-1)) ) -!/RTD ALLOCATE( ANG(NBO(IFILE)-NBO(IFILE-1)) ) - XBPO2=XBPO(NBO(IFILE-1)+1:NBO(IFILE)) - YBPO2=YBPO(NBO(IFILE-1)+1:NBO(IFILE)) -! -!/RTD ! Convert rotated lat/lon back to standard pole grid. -!/RTD CALL W3EQTOLL ( YBPO(NBO(IFILE-1)+1:NBO(IFILE)), & -!/RTD XBPO(NBO(IFILE-1)+1:NBO(IFILE)), & -!/RTD YBPO2,XBPO2,ANG,POLAT,POLON, & -!/RTD NBO(IFILE)-NBO(IFILE-1) ) -!/RTD - ! Modified write below to write out XBPO2 and YBPO2, - ! instead of XBPO/YBPO +!/RTD ! By running the ww3_grid program the arrays XBPO, YBPO have been +!/RTD ! remapped to standard lat-lon and stored in mod_def.* +!/RTD ! WRITE (NDSL(IFILE)) & - XBPO2, YBPO2, & + (XBPO(I),I=NBO(IFILE-1)+1,NBO(IFILE)), & + (YBPO(I),I=NBO(IFILE-1)+1,NBO(IFILE)), & ((IPBPO(I,J),I=NBO(IFILE-1)+1,NBO(IFILE)),J=1,4),& ((RDBPO(I,J),I=NBO(IFILE-1)+1,NBO(IFILE)),J=1,4) ! @@ -340,10 +326,6 @@ !/T0 YBPO(I), (IPBPO(I,J),J=1,4), & !/T0 (RDBPO(I,J),J=1,4) !/T0 END DO -! - ! Deallocate temporary storage for boundary points - DEALLOCATE( XBPO2, YBPO2 ) -!/RTD DEALLOCATE( ANG ) ! END DO END IF @@ -404,6 +386,10 @@ ((IPBPI(I,J),I=1,NBI),J=1,4), & ((RDBPI(I,J),I=1,NBI),J=1,4) ! +!/RTD ! All boundary conditions position arrays XBPI, YBPI are defined +!/RTD ! in standard lat/lon coordinates. If Polat = 90. (and Polon = -180.), +!/RTD ! the b.c. positions don't need to be remapped +!/RTD IF ( Polat < 90. ) THEN !/RTD !! Convert standard into rotated lat/lon. JGLi12Jun2012 !/RTD ALLOCATE ( Anglbdy(NBI), ELatbdy(NBI), ELonbdy(NBI) ) !/RTD @@ -433,6 +419,8 @@ !/RTD ENDDO !/RTD !/RTD DEALLOCATE ( Anglbdy, ELatbdy, ELonbdy ) +!/RTD +!/RTD END IF ! ( Polat < 90. ) !/RTD FLOK = .TRUE. IF (GTYPE .EQ. UNGTYPE) THEN @@ -541,11 +529,15 @@ !/DIST CG(1+(IS-1)/NTH,ISEA) !/DIST END DO ! -!/RTD ! Added spectral turning for rotated grid -!/RTD ! (rotate back to standard pole) -!/RTD Spectr = ABPOS(:,ISOUT) -!/RTD CALL W3ACTURN( NTH, NK, -AnglD(ISEA), Spectr ) -!/RTD ABPOS(:,ISOUT) = Spectr +!/RTD ! Polat == 90. means the grid is standard lat-lon, and the spectra +!/RTD ! need not be rotated back +!/RTD IF ( Polat < 90. ) THEN +!/RTD ! Added spectral turning for rotated grid +!/RTD ! (rotate back to standard pole) +!/RTD Spectr = ABPOS(:,ISOUT) +!/RTD CALL W3ACTURN( NTH, NK, -AnglD(ISEA), Spectr ) +!/RTD ABPOS(:,ISOUT) = Spectr +!/RTD END IF ! WRITE (NDSL(IFILE)) (ABPOS(IS,ISOUT),IS=1,NSPEC) ! diff --git a/model/ftn/w3updtmd.ftn b/model/ftn/w3updtmd.ftn index c89cb43fcd..5b5aebda8c 100644 --- a/model/ftn/w3updtmd.ftn +++ b/model/ftn/w3updtmd.ftn @@ -54,6 +54,8 @@ !/ and add ICEH initialization in W3UICE. !/ 13-Jan-2016 : Changed initial value of ICEDMAX ( version 5.08 ) !/ 26-Mar-2018 : Sea-point only Wnd/Cur input. JGLi ( version 6.04 ) +!/ 07-Oct-2019 : RTD option with standard lat-lon +!/ grid when nesting to rotated grid ( version 7.11 ) !/ !/ Copyright 2009-2014 National Weather Service (NWS), !/ National Oceanic and Atmospheric Administration. All rights @@ -903,6 +905,7 @@ !/ 12-Jun-2012 : Add /RTD option or rotated grid option. !/ (Jian-Guo Li) ( version 4.06 ) !/ 06-Jun-2018 : Add DEBUGIOBC/SETUP/DEBUGW3ULEV ( version 6.04 ) +!/ 13-Jun-2019 : Rotation only if POLAT<90 (C.Hansen)( version 7.11 ) !/ ! 1. Purpose : ! @@ -955,7 +958,7 @@ !/ ------------------------------------------------------------------- / USE W3GDATMD, ONLY: NSPEC, MAPWN, SIG2, DDEN !/RTD !! Use rotation angle and action conversion sub. JGLi12Jun2012 -!/RTD USE W3GDATMD, ONLY: NK, NTH, NSPEC, AnglD +!/RTD USE W3GDATMD, ONLY: NK, NTH, NSPEC, AnglD, PoLat !/RTD USE W3SERVMD, ONLY: W3ACTURN USE W3ADATMD, ONLY: CG USE W3ODATMD, ONLY: NBI, ABPI0, ABPIN, ISBPI, IPBPI, RDBPI, & @@ -1022,10 +1025,13 @@ END DO ! !/RTD !! Rotate the spectra if model is on rotated grid. JGLi12Jun2012 -!/RTD Spectr = BBPIN(:,IBI) -!/RTD AnglBP = AnglD(ISEA) -!/RTD CALL W3ACTURN( NTH, NK, AnglBP, Spectr ) -!/RTD BBPIN(:,IBI) = Spectr +!/RTD !! PoLat == 90. if the grid is standard lat/lon (C. Hansen 20190613) +!/RTD IF ( PoLat < 90. ) THEN +!/RTD Spectr = BBPIN(:,IBI) +!/RTD AnglBP = AnglD(ISEA) +!/RTD CALL W3ACTURN( NTH, NK, AnglBP, Spectr ) +!/RTD BBPIN(:,IBI) = Spectr +!/RTD END IF !/RTD ! END DO diff --git a/model/ftn/ww3_bound.ftn b/model/ftn/ww3_bound.ftn index 14cf3535d4..665cc02d50 100644 --- a/model/ftn/ww3_bound.ftn +++ b/model/ftn/ww3_bound.ftn @@ -12,7 +12,7 @@ !/ 28-Aug-2012 : adaptation from SHOM/Ifremer code ( version 4.08 ) !/ 01-Nov-2012 : Bug correction for NKI != NK ( version 4.08 ) !/ 20-Oct-2016 : Error statement updates ( version 5.15 ) -!/ 21-Jul-2020 : Support rotated pole grid ( version 7.06 ) +!/ 21-Jul-2020 : Support rotated pole grid ( version 7.11 ) !/ Chris Bunney, UKMO. !/ !/ Copyright 2012-2012 National Weather Service (NWS), diff --git a/model/ftn/ww3_grid.ftn b/model/ftn/ww3_grid.ftn index ee1964b731..1335b96e02 100644 --- a/model/ftn/ww3_grid.ftn +++ b/model/ftn/ww3_grid.ftn @@ -107,6 +107,7 @@ !/ 20-Feb-2020 : Include Romero's dissipation in ST4 ( version 7.06 ) !/ 15-Apr-2020 : Adds optional opt-out for CFL on BC ( version 7.08 ) !/ 18-Jun-2020 : Adds 360-day calendar option ( version 7.08 ) +!/ 24-Jun-2020 : RTD output b. c. to rotated grid. ( version 7.11 ) !/ !/ Copyright 2009-2013 National Weather Service (NWS), !/ National Oceanic and Atmospheric Administration. All rights @@ -480,7 +481,7 @@ ! correction for swell dispersion. ! !/PR3 Averaging ULTIMATE QUICKEST scheme. ! -! !/RTD Rotated regular lat-lon grid. +! !/RTD Rotated regular lat-lon grid. Special case is standard Polat=90. ! !/SMC UNO2 scheme on Spherical Multiple-Cell grid. ! !/ARC Append the Arctic part to the SMC grid. ! @@ -507,7 +508,7 @@ USE W3ODATMD, ONLY: W3NOUT, W3SETO, W3DMO5 USE W3IOGRMD, ONLY: W3IOGR USE W3SERVMD, ONLY: ITRACE, NEXTLN, EXTCDE -!/RTD USE W3SERVMD, ONLY: W3EQTOLL +!/RTD USE W3SERVMD, ONLY: W3EQTOLL, W3LLTOEQ !/ARC USE W3SERVMD, ONLY: W3LLTOEQ !/S USE W3SERVMD, ONLY: STRACE USE W3ARRYMD, ONLY: INA2R, INA2I @@ -630,6 +631,12 @@ !/ARC REAL, ALLOCATABLE :: XLONAC(:),YLATAC(:),ELONAC(:),ELATAC(:) ! !/RTD REAL, ALLOCATABLE :: AnglDin(:,:),StdLon(:,:),StdLat(:,:) +!/RTD ! 1-dim boundary sectors +!/RTD REAL, ALLOCATABLE :: BDYLON(:), BDYLAT(:), & +!/RTD ELatbdy(:), ELonbdy(:), Anglbdy(:) +!/RTD ! If the destination grid for an output b.c. is rotated, its pole is: +!/RTD REAL :: bPolat, bPolon +!/RTD! REAL, ALLOCATABLE :: XGRDIN(:,:), YGRDIN(:,:) REAL, ALLOCATABLE :: ZBIN(:,:), OBSX(:,:), OBSY(:,:) REAL, ALLOCATABLE :: REFD(:,:), REFD2(:,:), REFS(:,:) @@ -804,6 +811,8 @@ !/RTD REAL :: PLAT, PLON !/RTD LOGICAL :: UNROT +!/RTD ! Poles of the output nested grids. May be a mix of rotated and standard +!/RTD REAL, DIMENSION(9) :: BPLAT, BPLON ! !/FLD1 NAMELIST /FLD1/ TAILTYPE, TAILLEV, TAILT1, TAILT2 !/FLD2 NAMELIST /FLD2/ TAILTYPE, TAILLEV, TAILT1, TAILT2 @@ -916,6 +925,8 @@ !/REF1 REFFREQPOW, REFUNSTSOURCE !/ !/RTD NAMELIST /ROTD/ PLAT, PLON, UNROT +!/RTD! Poles of destination grids for boundary conditions output +!/RTD NAMELIST /ROTB/ BPLAT, BPLON !/ !/ ------------------------------------------------------------------- / !/ @@ -2183,11 +2194,33 @@ CTMAX = CFLTM ! !/RTD ! Set/ read in rotation values - these will be written out -!/RTD ! out later with the rest of the grid info -!/RTD PLAT = -999.9 -!/RTD PLON = -999.9 -!/RTD UNROT = .TRUE. +!/RTD ! later with the rest of the grid info +!/RTD ! Default is a non-rotated lat-lon grid +!/RTD PLAT = 90. +!/RTD PLON = -180. +!/RTD UNROT = .FALSE. !/RTD CALL READNL ( NDSS, 'ROTD', STATUS ) +!/RTD PLON = MOD( PLON + 180., 360. ) - 180. +!/RTD ! Ensure that a grid with pole at the geographic North is standard lat-lon +!/RTD IF ( PLAT == 90. .AND. ( PLON /= -180. .OR. UNROT ) ) THEN +!/RTD WRITE( NDSE, 1052 ) +!/RTD CALL EXTCDE ( 33 ) +!/RTD ENDIF +!/RTD ! Default poles of output b. c. are non-rotated: +!/RTD BPLAT = 90. +!/RTD BPLON = -180. +!/RTD CALL READNL ( NDSS, 'ROTB', STATUS ) +!/RTD ! A b. c. dest. grid with pole at the geographic North must be non-rotated +!/RTD DO I=1,9 +!/RTD IF ( BPLAT(I) == 90. ) THEN +!/RTD ! Require BPLON(I) == -180., but don't blaim the user if BPLON(I) == 180. +!/RTD IF ( BPLON(I) == 180. ) BPLON(I) = -180. +!/RTD IF ( BPLON(I) == -180. ) CYCLE +!/RTD END IF +!/RTD IF ( BPLAT(I) < 90. ) CYCLE +!/RTD WRITE( NDSE, 1053 ) +!/RTD CALL EXTCDE ( 34 ) +!/RTD END DO ! ! 6.n Set miscellaneous parameters (ice, seeding, numerics ... ) ! @@ -2783,6 +2816,8 @@ ! !/FLD1 WRITE(NDSO,2987) TAIL_ID, TAIL_LEV, TAIL_TRAN1, TAIL_TRAN2 !/FLD2 WRITE(NDSO,2987) TAIL_ID, TAIL_LEV, TAIL_TRAN1, TAIL_TRAN2 +!/RTD WRITE(NDSO,4991) PLAT, PLON, UNROT +!/RTD WRITE(NDSO,4992) BPLAT, BPLON ! WRITE (NDSO,918) END IF @@ -3469,24 +3504,26 @@ !Li ! !/RTD ! 7.h Calculate rotation angles for configs with rotated pole -!/RTD ! Check that pole lat/lon values have been read in -!/RTD ! and exit the program if they have not !/RTD PoLon = PLON !/RTD PoLat = PLAT !/RTD FLAGUNR = UNROT -!/RTD IF( PoLon .EQ. -999.9 .OR. PoLat .EQ. -999.9 ) THEN -!/RTD WRITE( NDSE, 1050 ) -!/RTD CALL EXTCDE ( 63 ) -!/RTD ENDIF +!/RTD ! Default values PLON=-180, PLAT=90, UNROT=.FALSE. for standard lat-lon !/RTD !/RTD ALLOCATE( AnglDin(NX,NY) ) -!/RTD ALLOCATE(StdLat(NX,NY), StdLon(NX,NY)) +!/RTD ! For standard lat-lon the rotation angles are zero +!/RTD IF ( PoLat == 90. ) THEN +!/RTD AnglDin = 0. +!/RTD ELSE +!/RTD ALLOCATE(StdLat(NX,NY), StdLon(NX,NY)) !/RTD -!/RTD ! Calculate rotation angles; (StdLon/Lat are returned, but not used) -!/RTD ! The regular grid X/YGRDIN are used as equatorial lon and lat -!/RTD CALL W3EQTOLL( YGRDIN, XGRDIN, StdLat, StdLon, AnglDin, & +!/RTD ! Calculate rotation angles; (StdLon/Lat are returned, but not used) +!/RTD ! The regular grid X/YGRDIN are used as equatorial lon and lat +!/RTD CALL W3EQTOLL( YGRDIN, XGRDIN, StdLat, StdLon, AnglDin, & !/RTD PoLat, PoLon, NX*NY ) !/RTD +!/RTD ! Clean up +!/RTD DEALLOCATE( StdLat, StdLon ) +!/RTD END IF !/RTD ! Write out rotation information !/RTD WRITE (NDSO,4203) PoLat, PoLon !/RTD WRITE (NDSO,4200) @@ -3496,8 +3533,6 @@ !/RTD IF ( FLAGUNR ) WRITE (NDSO,4204) !/RTD WRITE (NDSO,*) ' ' !/RTD -!/RTD ! Clean up -!/RTD DEALLOCATE( StdLat, StdLon ) ! !/SMC !! 7.i Read SMC grid cell and face integer arrays. !/SMC IF (FLGNML) THEN @@ -4992,9 +5027,19 @@ ! FIRST = .FALSE. ! +!/RTD IF ( NPO.NE.0 ) THEN +!/RTD ! Destination pole lat, lon from namelist +!/RTD bPolat = BPLAT(NFBPO+1) +!/RTD bPolon = BPLON(NFBPO+1) +!/RTD END IF +!/RTD ! IF ( NFBPO.GE.1 .AND. ILOOP.EQ.2 ) THEN WRITE (NDSO,991) NFBPO, NBO(NFBPO) - NBO(NFBPO-1), & NBO2(NFBPO) - NBO2(NFBPO-1) +!/RTD ! Print dest. Pole lat/lon if either the dest or present grid is rotated +!/RTD IF ( BPLAT(NFBPO) < 90. .OR. Polat < 90. ) & +!/RTD WRITE (NDSO,1991) BPLAT(NFBPO), BPLON(NFBPO) +!/RTD ! !/O1 IF ( NBO(NFBPO) - NBO(NFBPO-1) .EQ. 1 ) THEN !/O1 IF ( FLAGLL ) THEN !/O1 WRITE (NDSO,992) @@ -5057,13 +5102,73 @@ ! ! ... Loop over line segment - - - - - - - - - - - - - - - - - - - - - ! +!/RTD ! If either base or destination grid is rotated lat-lon +!/RTD IF ( allocated(BDYLON) .eqv. .TRUE. ) THEN +!/RTD deallocate( BDYLON, BDYLAT ) +!/RTD IF ( bPolat < 90. .OR. Polat < 90. ) & +!/RTD deallocate( ELatbdy, ELonbdy, Anglbdy ) +!/RTD END IF +!/RTD allocate( BDYLON(NPO), BDYLAT(NPO)) +!/RTD IF ( bPolat < 90. .OR. Polat < 90. ) & +!/RTD allocate( ELatbdy(NPO), ELonbdy(NPO), Anglbdy(NPO) ) +!/RTD ! !/T WRITE (NDST,9090) ! DO IP=1, NPO ! XO = XO0 + REAL(IP-1)*DXO YO = YO0 + REAL(IP-1)*DYO -! +!/RTD ! +!/RTD ! Boundary points are specified in coordinates of the destination grid +!/RTD ! +!/RTD ! Collect the line segment points into arrays +!/RTD BDYLON(IP) = XO +!/RTD BDYLAT(IP) = YO +!/RTD ! Close the loop before calculating rotated lat-lon coordinates. +!/RTD END DO +!/RTD +!/RTD ! Create one or two sets of the segment points: +!/RTD ! 1. (BDYLAT, BDYLON) in standard lat-lon coordinates, +!/RTD ! 2. Also (ELatbdy, ELonbdy) in case the base grid is rotated +!/RTD +!/RTD IF ( bPolat < 90. ) THEN +!/RTD ! The destination grid is rotated (std->rot or rot->rot) +!/RTD ! Change BDYLAT, BDYLON to their standard lat-lon positions +!/RTD ! Let ELatbdy,ELonbdy contain the rotated lat-lon coordinates +!/RTD ELatbdy(:) = BDYLAT(:) +!/RTD ELonbdy(:) = BDYLON(:) +!/RTD CALL W3EQTOLL ( ELatbdy, ELonbdy, BDYLAT, BDYLON, & +!/RTD & Anglbdy, bPolat, bPolon, NPO ) +!/RTD ! Let the standard longitudes BDYLON be within the range [-180.,180.[ +!/RTD ! or [0., 360.[ depending on the grid pole +!/RTD IF ( Polon < -90. .OR. Polon > 90. ) THEN +!/RTD BDYLON(:) = MOD( BDYLON(:) + 180., 360. ) - 180. +!/RTD ELSE +!/RTD BDYLON(:) = MOD( BDYLON(:) + 360., 360. ) +!/RTD END IF +!/RTD END IF ! bPolat < 90. +!/RTD ! From now, BDYLAT, BDYLON are defined in standard lat-lon coordinates +!/RTD ! +!/RTD IF ( Polat < 90. ) THEN +!/RTD ! The base grid is rotated (rot->std or rot->rot) +!/RTD ! Find lat-lon in coordinates of the rotated base grid +!/RTD CALL W3LLTOEQ ( BDYLAT, BDYLON, ELatbdy, ELonbdy, & +!/RTD & Anglbdy, Polat, Polon, NPO ) +!/RTD END IF +!/RTD ! +!/RTD ! Take up again the loop over the line segment points +!/RTD DO IP=1, NPO +!/RTD IF ( Polat < 90. ) THEN +!/RTD ! The base grid is rotated (rot->std, rot->rot) +!/RTD ! (The std. lat-lon values BDYLAT, BDYLON go to YBPO, XBPO) +!/RTD XO = ELonbdy(IP) +!/RTD YO = ELatbdy(IP) +!/RTD ELSE +!/RTD ! The base grid is standard geographic (std->rot or std->std) +!/RTD XO = BDYLON(IP) +!/RTD YO = BDYLAT(IP) +!/RTD END IF +! ! ... Compute bilinear remapping weights ! INGRID = W3GRMP( GSU, XO, YO, IXR, IYR, RD ) @@ -5082,22 +5187,28 @@ ! ! ... Check if point not on land ! - IF ( ( MAPSTA(IYR(1),IXR(1)).GT.0 .AND. & - RD(1).GT.0.05 ) .OR. & - ( MAPSTA(IYR(2),IXR(2)).GT.0 .AND. & - RD(2).GT.0.05 ) .OR. & - ( MAPSTA(IYR(3),IXR(3)).GT.0 .AND. & - RD(3).GT.0.05 ) .OR. & - ( MAPSTA(IYR(4),IXR(4)).GT.0 .AND. & - RD(4).GT.0.05 ) ) THEN + IF ( ( MAPSTA(IYR(1),IXR(1)).GT.0 .AND. & + RD(1).GT.0.05 ) .OR. & + ( MAPSTA(IYR(2),IXR(2)).GT.0 .AND. & + RD(2).GT.0.05 ) .OR. & + ( MAPSTA(IYR(3),IXR(3)).GT.0 .AND. & + RD(3).GT.0.05 ) .OR. & + ( MAPSTA(IYR(4),IXR(4)).GT.0 .AND. & + RD(4).GT.0.05 ) ) THEN ! ! ... Check storage and store coordinates ! - NBOTOT = NBOTOT + 1 - IF ( ILOOP .EQ. 1 ) CYCLE + NBOTOT = NBOTOT + 1 + IF ( ILOOP .EQ. 1 ) CYCLE ! - XBPO(NBOTOT) = XO - YBPO(NBOTOT) = YO +!/RTD ! BDYLAT, BDYLON contain Y0, X0, which are remapped to standard lat/lon. +!/RTD ! BDYLAT, BDYLON are stored in the mod_def file. +!/RTD IF ( Polat < 90. ) THEN +!/RTD XO = BDYLON(IP) +!/RTD YO = BDYLAT(IP) +!/RTD END IF + XBPO(NBOTOT) = XO + YBPO(NBOTOT) = YO ! ! ... Interpolation factors ! @@ -5112,9 +5223,9 @@ RDTOT = RDTOT + RDBPO(NBOTOT,J) END DO ! - DO J=1, 4 - RDBPO(NBOTOT,J) = RDBPO(NBOTOT,J) / RDTOT - END DO + DO J=1, 4 + RDBPO(NBOTOT,J) = RDBPO(NBOTOT,J) / RDTOT + END DO ! !/T WRITE (NDST,9092) RDTOT, (RDBPO(NBOTOT,J),J=1,4) ! @@ -5147,11 +5258,19 @@ ! ! ... Error output ! + ELSE + IF ( FLAGLL ) THEN + WRITE (NDSE,2995) FACTOR*XO, FACTOR*YO + ELSE + WRITE (NDSE,995) FACTOR*XO, FACTOR*YO + END IF + END IF + ELSE + IF ( FLAGLL ) THEN + WRITE (NDSE,2994) FACTOR*XO, FACTOR*YO ELSE - WRITE (NDSE,995) FACTOR*XO, FACTOR*YO + WRITE (NDSE,994) FACTOR*XO, FACTOR*YO END IF - ELSE - WRITE (NDSE,994) FACTOR*XO, FACTOR*YO END IF ! END DO @@ -5822,7 +5941,11 @@ ! 2987 FORMAT ( ' &FLD TAIL_ID =',I1,' TAIL_LEV =',F5.4,' TAILT1 =',F5.3,& ' TAILT2 =',F5.3,' /') - +!/RTD +!/RTD 4991 FORMAT ( ' &ROTD PLAT =', F6.2,', PLON =', F7.2,', UNROT =',L3,' /') +!/RTD 4992 FORMAT ( ' &ROTB BPLAT =',9(F6.1,",")/ & +!/RTD ' BPLON =',9(F6.1,","),' /') + 3000 FORMAT (/' The spatial grid: '/ & ' --------------------------------------------------'/ & /' Grid type : ',A) @@ -5945,6 +6068,7 @@ ' --------------------------------------------------') 991 FORMAT ( ' File nest',I1,'.ww3 Number of points :',I6/ & ' Number of spectra :',I6) + 1991 FORMAT ( ' Dest. grid Polat:',F6.2,', Polon:',F8.2) 992 FORMAT (/' Nr.| Long. | Lat. '/ & ' -----|---------|---------') 1992 FORMAT (/' Nr.| Long. | Lat. ', & @@ -5954,8 +6078,8 @@ 993 FORMAT ( ' ',I4,2(' |',F8.2)) 1993 FORMAT ( ' ',I4,2(' |',F8.2), & ' ',I4,2(' |',F8.2)) - 994 FORMAT ( ' *** POINT OUTSIDE GRID (SKIPPED) : X,Y =',2F7.2) - 995 FORMAT ( ' *** POINT ON LAND (SKIPPED) : X,Y =',2F7.2) + 994 FORMAT ( ' *** POINT OUTSIDE GRID (SKIPPED) : X,Y =',2F10.5) + 995 FORMAT ( ' *** POINT ON LAND (SKIPPED) : X,Y =',2F10.5) 2992 FORMAT (/' Nr.| X | Y '/ & ' -----|-----------|-----------') 3992 FORMAT (/' Nr.| X | Y ', & @@ -6074,9 +6198,12 @@ ' ONLY FIRST PROPAGATION SCHEME WILL BE USED: ') 1036 FORMAT (/' *** WAVEWATCH III ERROR IN W3GRID :'/ & ' ILLEGAL NUMBER OF !/ISn SWITCHES :',I3) -!/RTD 1050 FORMAT (/' *** WAVEWATCH III ERROR IN W3GRID :'/ & -!/RTD ' ROTATED POLE SWITCH IS SET (RTD), BUT'/ & -!/RTD ' PLAT/PLON NAMELIST VALUES NOT SET IN ROTD' ) +!/RTD 1052 FORMAT (/' *** WAVEWATCH III ERROR IN W3GRID :'/ & +!/RTD ' WITH NAMELIST VALUE PLAT == 90, PLON MUST BE -180'/ & +!/RTD ' AND UNROT MUST BE .FALSE.' ) +! +!/RTD 1053 FORMAT (/' *** WAVEWATCH III ERROR IN W3GRID :'/ & +!/RTD ' WITH NAMELIST VALUE BPLAT == 90, BPLON MUST BE -180') ! 1040 FORMAT ( ' Space-time extremes DX :',F10.2) 1041 FORMAT ( ' Space-time extremes DX :',F10.2) @@ -6292,7 +6419,9 @@ !/PR3 READ (NDS,NML=PRO3,END=801,ERR=802,IOSTAT=J) !/RTD CASE('ROTD') !/RTD READ (NDS,NML=ROTD,END=801,ERR=802,IOSTAT=J) -!/REF1 CASE('REF1') +!/RTD CASE('ROTB') +!/RTD READ (NDS,NML=ROTB,END=801,ERR=802,IOSTAT=J) +!/REF1 CASE('REF1') !/REF1 READ (NDS,NML=REF1,END=801,ERR=802,IOSTAT=J) !/IG1 CASE('SIG1') !/IG1 READ (NDS,NML=SIG1,END=801,ERR=802,IOSTAT=J) diff --git a/model/ftn/ww3_ounf.ftn b/model/ftn/ww3_ounf.ftn index 66dd41d976..e2ba66682d 100644 --- a/model/ftn/ww3_ounf.ftn +++ b/model/ftn/ww3_ounf.ftn @@ -7,7 +7,7 @@ !/ | F. Ardhuin | !/ | M. Accensi | !/ | FORTRAN 90 | -!/ | Last update : 28-Mar-2019 | +!/ | Last update : 07-Oct-2019 | !/ +-----------------------------------+ !/ !/ 17-Mar-2010 : Creation ( version 3.14_SHOM ) @@ -33,6 +33,8 @@ !/ 25-Sep-2018 : Add WBT parameter ( version 6.06 ) !/ 28-Mar-2019 : Bugfix to NBIPART check. ( version 6.07 ) !/ 18-Jun-2020 : Support for 360-day calendar. ( version 7.08 ) +!/ 07-Oct-2019 : RTD option with standard lat-lon +!/ grid when nesting to rotated grid ( version 7.11 ) !/ !/ Copyright 2009-2013 National Weather Service (NWS), !/ National Oceanic and Atmospheric Administration. All rights @@ -744,6 +746,10 @@ !/RTD USE W3SERVMD, ONLY : W3THRTN, W3XYRTN, W3EQTOLL USE W3ARRYMD, ONLY : OUTA2I, PRTBLK USE W3GDATMD, ONLY : SIG, GTYPE, FLAGLL, MAPSTA, MAPST2 + USE W3GDATMD, ONLY : NK, UNGTYPE, MAPSF, NTRI, CLGTYPE, RLGTYPE, & + XGRD, YGRD, SX, SY, X0, Y0, XYB, TRIGP, USSP_WN +!/RTD ! Rotated pole data from the mod_def file +!/RTD USE W3GDATMD, ONLY : POLAT, POLON, FLAGUNR, AnglD !/T USE W3ODATMD, ONLY : NDST USE NETCDF IMPLICIT NONE @@ -812,13 +818,18 @@ LOGICAL :: FLFRQ, FLDIR, FEXIST, FREMOVE LOGICAL :: CUSTOMFRQ=.FALSE. !/T LOGICAL :: LTEMP(NGRPP) - +!/RTD ! RTDL == False for a standard lat-lon grid. Will be set to True if the +!/RTD ! grid is rotated +!/RTD LOGICAL :: RTDL = .FALSE. !/ !/ ------------------------------------------------------------------- / !/ ! !/S CALL STRACE (IENT, 'W3EXNC') ! +!/RTD ! Is the grid really rotated +!/RTD IF ( Polat < 90. ) RTDL = .True. +!/RTD ! !/T DO IFI=1, NOGRP !/T LTEMP = FLG2D(IFI,:) !/T WRITE (NDST,9000) IFI, LTEMP @@ -1043,7 +1054,7 @@ !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' !/RTD VARND(2) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD VARND(2) = 'Rotated Pole Grid North' !/RTD END IF @@ -1101,7 +1112,7 @@ !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' !/RTD VARND(2) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD VARND(2) = 'Rotated Pole Grid North' !/RTD END IF @@ -1388,7 +1399,7 @@ !/RTD ! Override standard direction comment !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD END IF VMIN = 0 @@ -1441,7 +1452,7 @@ !/RTD ! Override standard direction comment !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD END IF VMIN = 0 @@ -1649,7 +1660,7 @@ !/RTD ! Override standard direction comment !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD END IF UNITS = 'degree' @@ -1709,7 +1720,7 @@ !/RTD ! Override standard direction comment !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD END IF UNITS = 'degree' @@ -1870,7 +1881,7 @@ !/RTD ! Override standard direction comment !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD END IF VMIN = 0 @@ -1947,7 +1958,7 @@ !/RTD ! Override standard direction comment !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD END IF VMIN = 0 @@ -2222,7 +2233,7 @@ !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' !/RTD VARND(2) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD VARND(2) = 'Rotated Pole Grid North' !/RTD END IF @@ -2335,7 +2346,7 @@ !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' !/RTD VARND(2) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD VARND(2) = 'Rotated Pole Grid North' !/RTD END IF @@ -2374,7 +2385,7 @@ !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' !/RTD VARND(2) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD VARND(2) = 'Rotated Pole Grid North' !/RTD END IF @@ -2520,9 +2531,11 @@ VARND(2)='' VARND(3)='' !/RTD ! Override standard direction comment +!/RTD IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD VARND(2) = 'Rotated Pole Grid North' !/RTD VARND(3) = 'Rotated Pole Grid North' +!/RTD END IF VMIN = -3000 VMAX = 3000 ! @@ -2558,7 +2571,7 @@ !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' !/RTD VARND(2) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD VARND(2) = 'Rotated Pole Grid North' !/RTD END IF @@ -2624,23 +2637,27 @@ CALL W3S2XY ( NSEA, NSEA, NX+1, NY, TUSY(1:NSEA) & , MAPSF, XY ) ENDIF ! SMCGRD - DO ISEA=1, NSEA - CABS = SQRT(TUSX(ISEA)**2+TUSY(ISEA)**2) - IF ( CABS .NE. UNDEF ) THEN - TUSY(ISEA) = MOD ( 630. - & - RADE*ATAN2(TUSY(ISEA),TUSX(ISEA)) , 360. ) - ELSE - TUSY(ISEA) = UNDEF - END IF - TUSX(ISEA) = CABS - END DO - IF( SMCGRD ) THEN -!/SMC CALL W3S2XY_SMC( TUSX(:), X1 ) -!/SMC CALL W3S2XY_SMC( TUSY(:), X2 ) ! TODO: CHRISB: TUSY is in degrees....W3S2XY_SMC expects radians... - ELSE - CALL W3S2XY ( NSEA, NSEA, NX+1, NY,TUSX,MAPSF, X1 ) - CALL W3S2XY ( NSEA, NSEA, NX+1, NY,TUSY,MAPSF, X2 ) - ENDIF ! SMCGRD +! X1, X2 will not be output when NFIELD == 2 +! ( Like for .cur, .wnd, .ust, .taw, and .uss ) (CHA at FCOO 2019-06-13): + !! Commented out unnecessary statements below for time being + !! (...) X1,X2 are not actually written out below + !DO ISEA=1, NSEA + ! CABS = SQRT(TUSX(ISEA)**2+TUSY(ISEA)**2) + ! IF ( CABS .NE. UNDEF ) THEN + ! TUSY(ISEA) = MOD ( 630. - & + ! RADE*ATAN2(TUSY(ISEA),TUSX(ISEA)) , 360. ) + ! ELSE + ! TUSY(ISEA) = UNDEF + ! END IF + ! TUSX(ISEA) = CABS + ! END DO + !IF( SMCGRD ) THEN +!/SMC !CALL W3S2XY_SMC( TUSX(:), X1 ) +!/SMC !CALL W3S2XY_SMC( TUSY(:), X2 ) ! TODO: CHRISB: TUSY is in degrees....W3S2XY_SMC expects radians... + !ELSE + ! CALL W3S2XY ( NSEA, NSEA, NX+1, NY,TUSX,MAPSF, X1 ) + ! CALL W3S2XY ( NSEA, NSEA, NX+1, NY,TUSY,MAPSF, X2 ) + !ENDIF ! SMCGRD NFIELD=2 VARNM(1)='utus' VARNM(2)='vtus' @@ -2658,7 +2675,7 @@ !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' !/RTD VARND(2) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD VARND(2) = 'Rotated Pole Grid North' !/RTD END IF @@ -2715,7 +2732,7 @@ !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' !/RTD VARND(2) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD VARND(2) = 'Rotated Pole Grid North' !/RTD END IF @@ -2772,7 +2789,7 @@ !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' !/RTD VARND(2) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD VARND(2) = 'Rotated Pole Grid North' !/RTD END IF @@ -2863,7 +2880,7 @@ !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' !/RTD VARND(2) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD VARND(2) = 'Rotated Pole Grid North' !/RTD END IF @@ -2917,7 +2934,7 @@ !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' !/RTD VARND(2) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD VARND(2) = 'Rotated Pole Grid North' !/RTD END IF @@ -2973,7 +2990,7 @@ !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' !/RTD VARND(2) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD VARND(2) = 'Rotated Pole Grid North' !/RTD END IF @@ -3008,7 +3025,7 @@ !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' !/RTD VARND(2) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD VARND(2) = 'Rotated Pole Grid North' !/RTD END IF @@ -3051,7 +3068,7 @@ !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(2) = 'True North' !/RTD VARND(3) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(2) = 'Rotated Pole Grid North' !/RTD VARND(3) = 'Rotated Pole Grid North' !/RTD END IF @@ -3102,7 +3119,7 @@ !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' !/RTD VARND(2) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD VARND(2) = 'Rotated Pole Grid North' !/RTD END IF @@ -3134,7 +3151,7 @@ !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' !/RTD VARND(2) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD VARND(2) = 'Rotated Pole Grid North' !/RTD END IF @@ -3166,7 +3183,7 @@ !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' !/RTD VARND(2) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD VARND(2) = 'Rotated Pole Grid North' !/RTD END IF @@ -3195,7 +3212,7 @@ !/RTD ! Override standard direction comment !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD END IF VMIN = 0 @@ -3223,7 +3240,7 @@ !/RTD ! Override standard direction comment !/RTD IF ( FLAGUNR ) THEN !/RTD VARND(1) = 'True North' -!/RTD ELSE IF ( .NOT. FLAGUNR ) THEN +!/RTD ELSE IF ( RTDL ) THEN !/RTD VARND(1) = 'Rotated Pole Grid North' !/RTD END IF VMIN = 0 @@ -3571,13 +3588,15 @@ ! instanciates lon with x/lon for regular grid or nodes for unstructured mesh IF (.NOT.ALLOCATED(LON)) ALLOCATE(LON(NX)) !/RTD ! 2d longitude array for standard grid coordinates -!/RTD IF (.NOT.ALLOCATED(LON2D)) ALLOCATE(LON2D(NX,NY),LON2DEQ(NX,NY),ANGLD2D(NX,NY)) +!/RTD IF ( RTDL .AND. .NOT.ALLOCATED(LON2D)) & +!/RTD ALLOCATE(LON2D(NX,NY),LON2DEQ(NX,NY),ANGLD2D(NX,NY)) IF (.NOT.ALLOCATED(LAT)) THEN ! If regular grid, instanciates lat with y/lat IF (GTYPE.EQ.RLGTYPE) THEN ALLOCATE(LAT(NY)) !/RTD ! 2d latitude array for standard grid coordinates -!/RTD IF (.NOT.ALLOCATED(LAT2D)) ALLOCATE(LAT2D(NX,NY),LAT2DEQ(NX,NY)) +!/RTD IF ( RTDL .AND. .NOT.ALLOCATED(LAT2D)) & +!/RTD ALLOCATE(LAT2D(NX,NY),LAT2DEQ(NX,NY)) ! If unstructured mesh, instanciates lat with nodes ELSE ALLOCATE(LAT(NX)) @@ -3640,23 +3659,27 @@ !/RTD ANGLD2D, POLAT, POLON, RTDNY*RTDNX) !/SMC ENDIF ! SMCTYPE ELSE ! SMCGRD - SXD=DBLE(0.000001d0*DNINT(1d6*(DBLE(SX)) )) - SYD=DBLE(0.000001d0*DNINT(1d6*(DBLE(SY)) )) - X0D=DBLE(0.000001d0*DNINT(1d6*(DBLE(X0)) )) - Y0D=DBLE(0.000001d0*DNINT(1d6*(DBLE(Y0)) )) - DO I=1,NX - LON(I)=REAL(X0D+SXD*DBLE(I-1)) -!/RTD LON2DEQ(I,1:NY)=LON(I) - END DO - DO I=1,NY - LAT(I)=REAL(Y0D+SYD*DBLE(I-1)) -!/RTD LAT2DEQ(1:NX,I)=LAT(I) - END DO -!/RTD ! Calculate the standard grid coordinates -!/RTD DO I=1,NX -!/RTD CALL W3EQTOLL(LAT2DEQ(I,1:NY), LON2DEQ(I,1:NY), LAT2D(I,1:NY), & -!/RTD LON2D(I,1:NY), ANGLD2D(I,1:NY), POLAT, POLON, NY) -!/RTD END DO + SXD=DBLE(0.000001d0*DNINT(1d6*(DBLE(SX)) )) + SYD=DBLE(0.000001d0*DNINT(1d6*(DBLE(SY)) )) + X0D=DBLE(0.000001d0*DNINT(1d6*(DBLE(X0)) )) + Y0D=DBLE(0.000001d0*DNINT(1d6*(DBLE(Y0)) )) + DO I=1,NX + LON(I)=REAL(X0D+SXD*DBLE(I-1)) + END DO + DO I=1,NY + LAT(I)=REAL(Y0D+SYD*DBLE(I-1)) + END DO +!/RTD IF ( RTDL ) THEN +!/RTD ! Calculate the standard grid coordinates +!/RTD DO I=1,NX +!/RTD LON2DEQ(I,:)=LON(I) +!/RTD END DO +!/RTD DO I=1,NY +!/RTD LAT2DEQ(:,I)=LAT(I) +!/RTD END DO +!/RTD CALL W3EQTOLL(LAT2DEQ, LON2DEQ, LAT2D, LON2D, & +!/RTD ANGLD2D, POLAT, POLON, NY*NX) +!/RTD END IF ! RTDL WRITE(STR2,'(F12.0)') SY STR2=ADJUSTL(STR2) IRET=NF90_PUT_ATT(NCID,NF90_GLOBAL, & @@ -3737,11 +3760,13 @@ 'altitude_resolution','n/a') CALL CHECK_ERR(IRET) +!/RTD IF ( RTDL ) THEN !/RTD IRET=NF90_PUT_ATT(NCID,NF90_GLOBAL, & !/RTD 'grid_north_pole_latitude',POLAT) !/RTD IRET=NF90_PUT_ATT(NCID,NF90_GLOBAL, & !/RTD 'grid_north_pole_longitude',POLON) - +!/RTD END IF + CALL T2D(TIME,STARTDATE,IERR) WRITE(STRSTARTDATE,'(I4.4,A,4(I2.2,A),I2.2)') STARTDATE(1),'-',STARTDATE(2),'-', & STARTDATE(3),' ',STARTDATE(5),':',STARTDATE(6),':',STARTDATE(7) @@ -3772,13 +3797,15 @@ IRET=NF90_PUT_VAR(NCID,VARID(2),LAT(IY1:IYN)) CALL CHECK_ERR(IRET) ENDIF ! SMCGRD -!/RTD IRET=NF90_PUT_VAR(NCID,VARID(291),LON2D(IX1:IXN,IY1:IYN)) -!/RTD CALL CHECK_ERR(IRET) -!/RTD IRET=NF90_PUT_VAR(NCID,VARID(292),LAT2D(IX1:IXN,IY1:IYN)) -!/RTD CALL CHECK_ERR(IRET) +!/RTD IF ( RTDL ) THEN +!/RTD IRET=NF90_PUT_VAR(NCID,VARID(291),LON2D(IX1:IXN,IY1:IYN)) +!/RTD CALL CHECK_ERR(IRET) +!/RTD IRET=NF90_PUT_VAR(NCID,VARID(292),LAT2D(IX1:IXN,IY1:IYN)) +!/RTD CALL CHECK_ERR(IRET) +!/RTD END IF END IF - ! If spherical grid + ! If curvilinear grid IF (GTYPE.EQ.CLGTYPE) THEN IRET=NF90_PUT_VAR(NCID,VARID(1),LON2D(IX1:IXN,IY1:IYN)) CALL CHECK_ERR(IRET) @@ -3922,10 +3949,12 @@ CALL CHECK_ERR(IRET) END IF !/RTD +!/RTD IF ( RTDL ) THEN !/RTD ! Add grid mapping attribute for rotated pole grids: !/RTD IRET=NF90_PUT_ATT(NCID,VARID(IVAR),'grid_mapping', & !/RTD 'rotated_pole') !/RTD CALL CHECK_ERR(IRET) +!/RTD END IF !/RTD END DO ! @@ -4082,10 +4111,12 @@ CALL CHECK_ERR(IRET) END IF !/RTD -!/RTD ! Add grid mapping attribute for rotated pole grids: -!/RTD IRET=NF90_PUT_ATT(NCID,VARID(IVAR),'grid_mapping', & -!/RTD 'rotated_pole') -!/RTD CALL CHECK_ERR(IRET) +!/RTD IF ( RTDL ) THEN +!/RTD ! Add grid mapping attribute for rotated pole grids: +!/RTD IRET=NF90_PUT_ATT(NCID,VARID(IVAR),'grid_mapping', & +!/RTD 'rotated_pole') +!/RTD CALL CHECK_ERR(IRET) +!/RTD END IF !/RTD END DO IRET = NF90_ENDDEF(NCID) @@ -4715,7 +4746,10 @@ !-------------------------------------------------------------------------- SUBROUTINE W3CRNC (NCFILE, NCID, DIMID, DIMLN, VARID, & EXTRADIM, NCTYPE, MAPSTAOUT ) - USE W3GDATMD +! + USE W3GDATMD, ONLY : GTYPE, FLAGLL, UNGTYPE, CLGTYPE, RLGTYPE +!/RTD ! Rotated pole parameters from the mod_def file +!/RTD USE W3GDATMD, ONLY : POLAT, POLON USE NETCDF USE W3TIMEMD @@ -4741,7 +4775,12 @@ ! CHARACTER :: ATTNAME*120,ATTVAL*120 +!/RTD ! RTDL == False for a standard lat-lon grid. Will be set to True if the +!/RTD ! grid is rotated +!/RTD LOGICAL :: RTDL = .FALSE. +!/RTD ! Is the grid really rotated +!/RTD IF ( Polat < 90. ) RTDL = .True. ! ! Creation in netCDF3 or netCDF4 ! @@ -4851,20 +4890,27 @@ IRET = NF90_DEF_VAR(NCID, 'latitude', NF90_FLOAT, DIMID(2), VARID(2)) END IF IRET=NF90_PUT_ATT(NCID,VARID(1),'units','degree_east') +!/RTD ! Is the grid really rotated +!/RTD IF ( .NOT. RTDL ) THEN IRET=NF90_PUT_ATT(NCID,VARID(1),'long_name','longitude') IRET=NF90_PUT_ATT(NCID,VARID(1),'standard_name','longitude') +!/RTD ELSE !/RTD ! Override the above for RTD pole: -!/RTD IRET=NF90_PUT_ATT(NCID,VARID(1),'long_name','longitude in rotated pole grid') -!/RTD IRET=NF90_PUT_ATT(NCID,VARID(1),'standard_name','grid_longitude') +!/RTD IRET=NF90_PUT_ATT(NCID,VARID(1),'long_name','longitude in rotated pole grid') +!/RTD IRET=NF90_PUT_ATT(NCID,VARID(1),'standard_name','grid_longitude') +!/RTD END IF IRET=NF90_PUT_ATT(NCID,VARID(1),'valid_min',-180.0) IRET=NF90_PUT_ATT(NCID,VARID(1),'valid_max',360.) ! IRET=NF90_PUT_ATT(NCID,VARID(2),'units','degree_north') +!/RTD IF ( .NOT. RTDL ) THEN IRET=NF90_PUT_ATT(NCID,VARID(2),'long_name','latitude') IRET=NF90_PUT_ATT(NCID,VARID(2),'standard_name','latitude') +!/RTD ELSE !/RTD ! Override the above for RTD pole: !/RTD IRET=NF90_PUT_ATT(NCID,VARID(2),'long_name','latitude in rotated pole grid') !/RTD IRET=NF90_PUT_ATT(NCID,VARID(2),'standard_name','grid_latitude') +!/RTD END IF IRET=NF90_PUT_ATT(NCID,VARID(2),'valid_min',-90.0) IRET=NF90_PUT_ATT(NCID,VARID(2),'valid_max',180.) ! @@ -4888,6 +4934,7 @@ !/RTD call CHECK_ERR(IRET) !/SMC ENDIF ELSE +!/RTD IF ( RTDL ) THEN !/RTD !Add secondary coordinate system linking rotated grid back to standard lat-lon !/RTD IRET = NF90_DEF_VAR(NCID, 'standard_longitude', NF90_FLOAT, (/ DIMID(2), DIMID(3)/), & !/RTD VARID(291)) @@ -4896,8 +4943,10 @@ !/RTD IRET = NF90_DEF_VAR(NCID, 'standard_latitude', NF90_FLOAT, (/ DIMID(2), DIMID(3)/), & !/RTD VARID(292)) !/RTD call CHECK_ERR(IRET) +!/RTD END IF ENDIF ! SMCGRD !/RTD +!/RTD IF ( RTDL ) THEN !/RTD ! Attributes for standard_longitude: !/RTD IRET=NF90_PUT_ATT(NCID,VARID(291),'units','degree_east') !/RTD IRET=NF90_PUT_ATT(NCID,VARID(291),'long_name','longitude') @@ -4919,6 +4968,7 @@ !/RTD IRET=NF90_PUT_ATT(NCID, VARID(293), 'grid_north_pole_longitude',POLON) !/RTD IRET=NF90_PUT_ATT(NCID, VARID(293), 'grid_mapping_name', & !/RTD 'rotated_latitude_longitude') +!/RTD END IF ! ELSE IF (GTYPE.EQ.RLGTYPE) THEN diff --git a/model/inp/ww3_grid.inp b/model/inp/ww3_grid.inp index 5074281b05..95c8274591 100644 --- a/model/inp/ww3_grid.inp +++ b/model/inp/ww3_grid.inp @@ -345,20 +345,45 @@ $ SEAWND : Use sea-point only wind input. .FALSE. $ &PSMC DTIME = 39600.0, LATMIN=85.0, RFMAXD = 36.0, LvSMC=3, JEQT=1344 / $ $ Rotated pole ------------------------------------------------------ $ -$ Pole parameters : Namelist ROTD -$ PLAT : Rotated pole latitude -$ PLON : Rotated pole longitude -$ UNROT : Logical, un-rotate directions to true north -$ -$ These will be used to derive rotation angle corrections in the -$ model. The corrections are used for rotation of boundary spectra -$ and for restoring conventional lat/lon orientation of the -$ output spectra, mean direction or any related variables. -$ The PLAT/LON example below is a standard setting for Met -$ Office UK regional models. +$ Pole parameters : Namelist ROTD +$ PLAT : Rotated pole latitude +$ PLON : Rotated pole longitude +$ UNROT : Logical, un-rotate directions to +$ true north +$ +$ Compile switch /RTD required. +$ +$ These will be used to derive rotation angle corrections in the +$ model. The corrections are used for rotation of boundary spectra +$ and for restoring conventional lat/lon orientation of the +$ output spectra, mean direction or any related variables. +$ The PLAT/LON example below is a standard setting for Met +$ Office UK regional models. $ $ &ROTD PLAT = 37.5, PLON = 177.5, UNROT = .TRUE. / $ +$ The default values for ROTD represent a non-rotated lat/lon grid: +$ +$ &ROTD PLAT = 90.0, PLON = -180.0, UNROT = .FALSE. / +$ +$ Output boundary conditions to rotated pole grids ------------------ $ +$ +$ Pole parameters : Namelist ROTB +$ BPLAT(1:9) : Pole latitude of each destination grid +$ BPLON(1:9) : Pole longitude of each destination grid +$ +$ Compile switch /RTD required. +$ +$ In the section 'Output boundary points' later in this file, the points must +$ be given as straight lines in the reference system of each destination grid. +$ The index J of BPLAT(J),BPLON(J) is incremented by one where a new output +$ file is started by specifying a negative value for the number of points. +$ +$ Each destination may be either a rotated grid or a standard (non-rotated) +$ lat/lon grid. The default values for ROTB represent standard lat/lon grids: +$ +$ &ROTB BPLAT(1)=90., BPLON(1)=-180., BPLAT(2)=90. / $ (etc.) +$ $ Output of 3D arrays------------------------------------------------- $ $ In order to limit the use of memory, arrays for 3D output fiels (i.e. $ variables that are a function of both space and frequency, are not diff --git a/model/nml/namelists.nml b/model/nml/namelists.nml index 4d79c30a34..8ce245d25f 100644 --- a/model/nml/namelists.nml +++ b/model/nml/namelists.nml @@ -1,147 +1,489 @@ -! Switch FLD1 -!&FLD1 TAILTYPE = 0, TAILLEV = 0.006, TAILT1 = 1.25, TAILT2 = 3.00 / -! Switch FLD2 -!&FLD2 TAILTYPE = 0, TAILLEV = 0.006, TAILT1 = 1.25, TAILT2 = 3.00 / -! Switch FLX3 -!&FLX3 CDMAX = 2.5E-3, CTYPE = 0 / -! Switch FLX4 -!&FLX4 CDFAC = 1.0 / -! Switch IC2 -!&SIC2 IC2DISPER = .FALSE., IC2TURB = 1., IC2TURBS = 0., IC2ROUGH = 0.01, -!IC2REYNOLDS = 1.5E5, IC2SMOOTH = 2E5, IC2VISC = 1., IC2DMAX = 0. / -! Switch IC3 -!&SIC3 IC3MAXTHK = 100.0, IC3MAXCNC = 100.0, IC2TURB = 2.0, IC2TURBS = 0., -!IC2ROUGH = 0.02, IC2REYNOLDS = 1.5E5, IC2SMOOTH = 7.0E4, IC2VISC = 2.0, -!IC3CHENG = .TRUE., USECGICE = .FALSE., IC3HILIM = 100.0, IC3KILIM = 100.0, -!IC3HICE = -1.0, IC3VISC = -2.0, IC3DENS = -3.0, IC3ELAS = -4.0 / -! Switch IC4 -!&SIC4 IC4METHOD = 1, IC4KI = 0.0, IC4FC = 0.0 / -! Switch IC5 -!&SIC5 IC5MINIG = 1., IC5MINWT = 0., IC5MAXKRATIO = 1E9, IC5MAXKI = 100., -!IC5MINHW = 300., IC5MAXITER = 100., IC5RKICK = 0., IC5KFILTER = 0.0025 / -! Switch IG1 -!&SIG1 IGMETHOD = 2, IGADDOUTP = 0, IGSOURCE = 2, IGSTERMS = 0, -!IGMAXFREQ = 0.03, IGSOURCEATBP = 0, IGBCOVERWRITE = .TRUE., -!IGSWELLMAX = .TRUE., IGKDMIN = 1.1, IGFIXEDDEPTH = 0., -!IGEMPIRICAL = 0.00125 / -! Switch LN1 -!&SLN1 CLIN = 80., RFPM = 1., RFHF = 0.5 / -! Switch ST1 -!&SIN1 CINP = 0.25 / -! Switch ST2 -!&SIN2 ZWND = 10., SWELLF = 0.100, STABSH = 1.38, STABOF = -0.01, -!CNEG = -0.1, CPOS = 0.1, FNEG = 150. / -! Switch ST3 -!&SIN3 ZWND = 10., ALPHA0 = 0.0095, Z0MAX = 0.0, BETAMAX = 1.2, -!SINTHP = 2., SWELLF = 0., ZALP = 0.0110 / -! Switch ST4 -!&SIN4 ZWND = 10., ALPHA0 = 0.0095, Z0MAX = 0.0, Z0RAT = 0.04, BETAMAX = 1.43, -!SINTHP = 2., SWELLF = 0.66, SWELLFPAR = 1, SWELLF2 = -0.018, SWELLF3 = 0.022, -!SWELLF4 = 1.5E5, SWELLF5 = 1.2, SWELLF6 = 0., SWELLF7 = 360000., -!TAUWSHELTER = 0.3, ZALP = 0.006, SINBR = 0. / -! Switch NL1 -!&SNL1 LAMBDA = 0.25, NLPROP = 1.00E7, KDCONV = 0.75, KDMIN = 0.50, -!SNLCS1 = 5.5, SNLCS2 = 0.833, SNLCS3 = -1.25 / -! Switch NL2 -!&SNL2 IQTYPE = 2, TAILNL = -FACHF, NDEPTH = 0 / -! Switch NL2 -!&ANL2 DEPTHS = 100*1000. / -! Switch NL3 -!&SNL3 NQDEF = 0, MSC = 0., NSC = -3.5, KDFD = 0.20, KDFS = 5.00 / -! Switch NL3 -!&ANL3 QPARMS = 100*(0.25 , 0.00, -1., 1.E7, 0.00) / -! Switch NL4 -!&SNL4 INDTSA = 1, ALTLP = 2 / -! Switch NLS -!&SNLS A34 = 0.05, FHFC = 1.E10, DNM = 0.25, FC1 = 1.25, FC2 = 1.50, -!FC3 = 6.00 / -! Switch ST1 -!&SDS1 CDIS = -2.36E-5, APM = 3.02E-3 / -! Switch ST2 -!&SDS2 SDSA0 = 4.8, SDSA1 = 1.7e-4, SDSA2 = 2.0, SDSB0 = 0.3e-3, -!SDSB1 = 0.47, PHIMIN = 0.003, SDSALN = 0.002, FPIMIN = 0.009 / -! Switch ST3 -!&SDS3 SDSC1 = -2.1, WNMEANP = 0.5, FXFM3 = 2.5, FXPM3 = 4., -!WNMEANPTAIL = 0.5, SDSDELTA1 = 0.4, SDSDELTA2 = 0.6 / -! Switch ST4 -!&SDS4 WNMEANP = 0.5, FXFM3 = 2.5, FXFMAGE = 0., FXPM3 = 4., -!WNMEANPTAIL = -0.5, SDSBCHOICE = 1, SDSC2 = -2.2E-5, SDSCUM = -0.40344, -!SDSC4 = 1., SDSC5 = 0., SDSNUW = 0., SDSC6 = 0.3, SDSBR = 0.90E-3, -!SDSBRFDF = 0, SDSBRF1 = 0.5, SDSP = 2., SDSDTH = 80., SDSCOS = 2., -!SDSISO = 2, SDSBM0 = 1., SDSBM1 = 0., SDSBM2 = 0., SDSBM3 = 0., -!SDSBM4 = 0., SDSBCK = 0., SDSABK = 1.5, SDSPBK = 4., SDSBINT = 0.3, -!SDSHCK = 1.5, WHITECAPWIDTH = 0.3, SDSSTRAIN = 0., SDSFACMTF = 400, -!SDSSTRAINA = 15., SDSSTRAIN2 = 0., WHITECAPDUR = 0.56, SDSBT = 1.100E-3, -!SDSL = 3.5000e-05, SPMSS = 0.5, SDSNMTF = 1.5, SDSCUMP = 2., SDSMWD = .9, -!SDSMWPOW = 1. SDKOF = 3. / -! Switch ST6 -!&SIN6 SINA0 = 0.09, SINWS = 32.0, SINFC = 6.0 / -! Switch ST6 -!&SDS6 SDSET = .TRUE., SDSA1 = 4.75E-06, SDSP1 = 4, SDSA2 = 7.00E-05, -!SDSP2 = 4 / -! Switch ST6 -!&SWL6 CSTB1 = .FALSE., SWLB1 = 0.41E-02 / -! Switch BT1 -!&SBT1 GAMMA = -0.067 / -! Switch BT4 -!&SBT4 SEDMAPD50 = .FALSE., SED_D50_UNIFORM = 2.E-4, RIPFAC1 = 0.4, -!RIPFAC2 = -2.5, RIPFAC3 = 1.2, RIPFAC4 = 0.05, SIGDEPTH = 0.05, -!BOTROUGHMIN = 0.01, BOTROUGHFAC = 1.00 / -! Switch DB1 -!&SDB1 BJALFA = 1., BJGAM = 0.73, BJFLAG = .TRUE. / -! Switch UOST -!&UOST UOSTFILELOCAL = 'obstructions_local.name.in', -!UOSTFILESHADOW = 'obstructions_shadow.name.in', UOSTFACTORLOCAL = 1, -!UOSTFACTORSHADOW = 1 / -! Switch PR1 -!&PRO1 CFLTM = 0.7 / -! Switch PR2 -!&PRO2 CFLTM = 0.7, DTIME = 0., LATMIN = 70. / -! Switch SMC -!&PSMC CFLTM = 0.7, LVSMC = 1, ISHFT = 0, JEQT = 0, NBISMC = 0, -!DTIME = 0.0, LATMIN = 86.0, RFMAXD = 80.0, UNO3 = .FALSE., -!AVERG = .FALSE., SEAWND = .FALSE. / -! Switch PR3 -!&PRO3 CFLTM = 0.7, WDTHCG = 1.5, WDTHTH = 1.5 / -&UNST UGOBCAUTO = .TRUE., UGBCCFL = .TRUE., UGOBCDEPTH= -10., -UGOBCFILE = 'unset', EXPFSN = .TRUE., EXPFSPSI = .FALSE., -EXPFSFCT = .FALSE., IMPFSN = .FALSE., IMPTOTAL = .FALSE., -EXPTOTAL = .FALSE., IMPREFRACTION = .FALSE., IMPFREQSHIFT = .FALSE., -IMPSOURCE = .FALSE., SETUP_APPLY_WLV = .FALSE., SOLVERTHR_SETUP = 1E-14, -CRIT_DEP_SETUP = 0.1, JGS_TERMINATE_MAXITER = .TRUE., -JGS_TERMINATE_DIFFERENCE = .TRUE., JGS_TERMINATE_NORM = .FALSE., -JGS_LIMITER = .FALSE., JGS_BLOCK_GAUSS_SEIDEL = .TRUE., -JGS_USE_JACOBI = .TRUE., JGS_MAXITER = 100, JGS_PMIN = 1, -JGS_DIFF_THR = 1.E-10, JGS_NORM_THR = 1.E-20, JGS_NLEVEL = 0, -JGS_SOURCE_NONLINEAR = .FALSE. / -&MISC CICE0 = 0.5, CICEN = 0.5, LICE = 0., ICEHFAC = 1.0, ICEHMIN = 0.2, -ICEHINIT = 0.5, ICESLN = 1.0, ICEWIND = 1.0, ICESNL = 1.0, ICESDS = 1.0, -ICEHDISP = 0.6, ICEDDISP = 80, ICEFDISP = 2, GSHIFT = 0.0D0, PMOVE = 0.5, -XSEED = 1., FLAGTR = 0, XP = 0.15, XR = 0.10, XFILT = 0.05, IHM = 100, -HSPM = 0.05, WSM = 1.7, WSC = 0.333, FLC = .TRUE., TRCKCMPR = .TRUE., -NOSW = 5, PTM = 1, PTFC = 0.1, FMICHE = 1.6, RWNDC = 1., WCOR1 = 99., -WCOR2 = 0., BTBET = 1.2, STDX = -1., STDY = -1., STDT = -1., -ICEDISP = .FALSE., CALTYPE = 'standard', FACBERG=1. / -&OUTS E3D = 0, I1E3D = 1, I2E3D = 32, P2SF = 0, I1P2SF = 1, -I2P2SF = 15, US3D = 0, I1US3D = 1, I2US3D = 32, USSP = 0, -IUSSP = 1, STK_WN(:) = 0.0, STK_WN(1) = 0.00628, TH1MF = 0, -I1TH1M = 1, I2TH1M = 32, STH1MF = 0, I1STH1M = 1, I2STH1M = 32, -TH2MF = 0, I1TH2M = 1, I2TH2M = 32, STH2MF = 0, I1STH2M = 1. -I2STH2M = 32 / -! Switch ISI1 -!&SIS1 ISC1 = 1., ISC2 = 0. / -! Switch ISI2 -!&SIS2 ISC1 = 1., IS2C2 = 0., IS2C3 = 0., IS2CONC = 0., IS2BACKSCAT = 1., -!IS2BREAK = .FALSE., IS2BREAKF = 3.6, IS2FLEXSTR = 6.00E+05, -!IS2ISOSCAT = .TRUE., IS2DISP = .FALSE., IS2DUPDATE = .TRUE., -!IS2FRAGILITY = 0.9, IS2DMIN = 20, IS2DAMP = 0., IS2CREEPB = 0., -!IS2CREEPC = 0.4, IS2CREEPD = 0.5, IS2CREEPN = 3.0, IS2BREAKE = 1., -!IS2WIM1 = 1., IS2ANDISB = .TRUE., IS2ANDISE = 0.55, IS2ANDISD = 2.0E-9, -!IS2ANDISN = 1. / -! Switch REF1 -!&REF1 REFCOAST = 0., REFMAP = 0., REFMAPD = 0., REFRMAX = 1., -!REFFREQPOW = 2., REFFREQ = 0., REFCOSP_STRAIGHT = 4., -!REFSLOPE = 0.22, REFSUBGRID = 0., REFICEBERG = 0., REFUNSTSOURCE = 0. / -! Switch RTD -!&ROTD PLAT = -999.9, PLON = -999.9, UNROT = .TRUE. / +$ -------------------------------------------------------------------- $ +$ WAVEWATCH III - model parameters namelist +$ -------------------------------------------------------------------- $ +$ This file is to be used with ww3_grid.nml where its name is the value +$ of GRID%NML +$ +$ The contents is equal to the namelist input of ww3_grid.inp +$ (traditional form) ending with a mandatory string 'END OF NAMELISTS' +$ +$ Start of namelist input section ------------------------------------ $ +$ +$ Starting with WAVEWATCH III version 2.00, the tunable parameters +$ for source terms, propagation schemes, and numerics are read using +$ namelists. Any namelist found in the folowing sections up to the +$ end-of-section identifier string (see below) is temporarily written +$ to ww3_grid.scratch, and read from there if necessary. Namelists +$ not needed for the given switch settings will be skipped +$ automatically, and the order of the namelists is immaterial. +$ As an example, namelist input to change SWELLF and ZWND in the +$ Tolman and Chalikov input would be +$ +$ &SIN2 SWELLF = 0.1, ZWND = 15. / +$ +$ Define constants in source terms ----------------------------------- $ +$ +$ Stresses - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +$ TC 1996 with cap : Namelist FLX3 +$ CDMAX : Maximum allowed CD (cap) +$ CTYPE : Cap type : +$ 0: Discontinuous (default). +$ 1: Hyperbolic tangent. +$ Hwang 2011 : Namelist FLX4 +$ CDFAC : re-scaling of drag +$ +$ Linear input - - - - - - - - - - - - - - - - - - - - - - - - - - - - +$ Cavaleri and M-R : Namelist SLN1 +$ CLIN : Proportionality constant. +$ RFPM : Factor for fPM in filter. +$ RFHF : Factor for fh in filter. +$ +$ Exponential input - - - - - - - - - - - - - - - - - - - - - - - - - +$ WAM-3 : Namelist SIN1 +$ CINP : Proportionality constant. +$ +$ Tolman and Chalikov : Namelist SIN2 +$ ZWND : Height of wind (m). +$ SWELLF : swell factor in (n.nn). +$ STABSH, STABOF, CNEG, CPOS, FNEG : +$ c0, ST0, c1, c2 and f1 in . (n.nn) +$ through (2.65) for definition of +$ effective wind speed (!/STAB2). +$ WAM4 and variants : Namelist SIN3 +$ ZWND : Height of wind (m). +$ ALPHA0 : minimum value of Charnock coefficient +$ Z0MAX : maximum value of air-side roughness z0 +$ BETAMAX : maximum value of wind-wave coupling +$ SINTHP : power of cosine in wind input +$ ZALP : wave age shift to account for gustiness +$ TAUWSHELTER : sheltering of short waves to reduce u_star +$ SWELLFPAR : choice of swell attenuation formulation +$ (1: TC 1996, 3: ACC 2008) +$ SWELLF : swell attenuation factor +$ Extra parameters for SWELLFPAR=3 only +$ SWELLF2, SWELLF3 : swell attenuation factors +$ SWELLF4 : Threshold Reynolds number for ACC2008 +$ SWELLF5 : Relative viscous decay below threshold +$ Z0RAT : roughness for oscil. flow / mean flow +$ BYDRZ input : Namelist SIN6 +$ SINA0 : factor for negative input +$ SINWS : wind speed scaling option +$ SINFC : high-frequency extent of the +$ prognostic frequency region +$ +$ Nonlinear interactions - - - - - - - - - - - - - - - - - - - - - - - +$ Discrete I.A. : Namelist SNL1 +$ LAMBDA : Lambda in source term. +$ NLPROP : C in sourc term. NOTE : default +$ value depends on other source +$ terms selected. +$ KDCONV : Factor before kd in Eq. (n.nn). +$ KDMIN, SNLCS1, SNLCS2, SNLCS3 : +$ Minimum kd, and constants c1-3 +$ in depth scaling function. +$ Exact interactions : Namelist SNL2 +$ IQTYPE : Type of depth treatment +$ 1 : Deep water +$ 2 : Deep water / WAM scaling +$ 3 : Shallow water +$ TAILNL : Parametric tail power. +$ NDEPTH : Number of depths in for which +$ integration space is established. +$ Used for IQTYPE = 3 only +$ Namelist ANL2 +$ DEPTHS : Array with depths for NDEPTH = 3 +$ Gen. Multiple DIA : Namelist SNL3 +$ NQDEF : Number of quadruplets. +$ MSC : Scaling constant 'm'. +$ NSC : Scaling constant 'N'. +$ KDFD : Deep water relative filter depth, +$ KDFS : Shallow water relative filter depth, +$ Namelist ANL3 +$ QPARMS : 5 x NQDEF paramaters describing the +$ quadruplets, repeating LAMBDA, MU, DT12. +$ Cdeep and Cshal. See examples below. +$ Two Scale Approx. : Namelist SNL4 +$ INDTSA : Index for TSA/FBI computations +$ (0 = FBI ; 1 = TSA) +$ ALTLP : Index for alternate looping +$ (1 = no ; 2 = yes) +$ +$ Traditional DIA setup (default): +$ +$ &SNL3 NQDEF = 1, MSC = 0.00, NSC = -3.50 / +$ &ANL3 QPARMS = 0.250, 0.000, -1.0, 0.1000E+08, 0.0000E+00 / +$ +$ GMD3 from 2010 report (G13d in later paper) : +$ +$ &SNL3 NQDEF = 3, MSC = 0.00, NSC = -3.50 / +$ &ANL3 QPARMS = 0.126, 0.000, -1.0, 0.4790E+08, 0.0000E+00 , +$ 0.237, 0.000, -1.0, 0.2200E+08, 0.0000E+00 , +$ 0.319, 0.000, -1.0, 0.1110E+08, 0.0000E+00 / +$ +$ G35d from 2010 report: +$ +$ &SNL3 NQDEF = 5, MSC = 0.00, NSC = -3.50 / +$ &ANL3 QPARMS = 0.066, 0.018, 21.4, 0.170E+09, 0.000E+00 , +$ 0.127, 0.069, 19.6, 0.127E+09, 0.000E+00 , +$ 0.228, 0.065, 2.0, 0.443E+08, 0.000E+00 , +$ 0.295, 0.196, 40.5, 0.210E+08, 0.000E+00 , +$ 0.369, 0.226, 11.5, 0.118E+08, 0.000E+00 / +$ +$ Nonlinear filter based on DIA - - - - - - - - - - - - - - - - - - - +$ Namelist SNLS +$ A34 : Relative offset in quadruplet +$ FHFC : Proportionality constants. +$ DMN : Maximum relative change. +$ FC1-3 : Constants in frequency filter. +$ +$ Whitecapping dissipation - - - - - - - - - - - - - - - - - - - - - +$ WAM-3 : Namelist SDS1 +$ CDIS, APM : As in source term. +$ +$ Tolman and Chalikov : Namelist SDS2 +$ SDSA0, SDSA1, SDSA2, SDSB0, SDSB1, PHIMIN : +$ Constants a0, a1, a2, b0, b1 and +$ PHImin. +$ +$ WAM4 and variants : Namelist SDS3 +$ SDSC1 : WAM4 Cds coeffient +$ MNMEANP, WNMEANPTAIL : power of wavenumber +$ for mean definitions in Sds and tail +$ SDSDELTA1, SDSDELTA2 : relative weights +$ of k and k^2 parts of WAM4 dissipation +$ SDSLF, SDSHF : coefficient for activation of +$ WAM4 dissipation for unsaturated (SDSLF) and +$ saturated (SDSHF) parts of the spectrum +$ SDSC2 : Saturation dissipation coefficient +$ SDSC4 : Value of B0=B/Br for wich Sds is zero +$ SDSBR : Threshold Br for saturation +$ SDSP : power of (B/Br-B0) in Sds +$ SDSBR2 : Threshold Br2 for the separation of +$ WAM4 dissipation in saturated and non-saturated +$ SDSC5 : coefficient for turbulence dissipation +$ SDSC6 : Weight for the istropic part of Sds_SAT +$ SDSDTH: Angular half-width for integration of B +$ +$ BYDRZ : Namelist SDS6 +$ SDSET : Select threshold normalization spectra +$ SDSA1, SDSA2, SDSP1, SDSP2 : +$ Coefficients for dissipation terms T1 and T2 +$ : Namelist SWL6 +$ SWLB1 : Coefficient for swell dissipation +$ +$ Bottom friction - - - - - - - - - - - - - - - - - - - - - - - - - - +$ JONSWAP : Namelist SBT1 +$ GAMMA : Bottom friction emprical constant +$ +$ +$ Surf breaking - - - - - - - - - - - - - - - - - - - - - - - - - - - +$ Battjes and Janssen : Namelist SDB1 +$ BJALFA : Dissipation constant (default = 1) +$ BJGAM : Breaking threshold (default = 0.73) +$ BJFLAG : TRUE - Use Hmax/d ratio only (default) +$ FALSE - Use Hmax/d in Miche formulation +$ +$ Dissipation in the ice - - - - - - - - - - - - - - - - - - - - - - +$ Generalization of Liu et al. : Namelist SIC2 +$ IC2DISPER : If true uses Liu formulation with eddy viscosity +$ If false, uses the generalization with turbulent +$ to laminar transition +$ IC2TURB : empirical factor for the turbulent part +$ IC2ROUGH : under-ice roughness length +$ IC2REYNOLDS: Re number for laminar to turbulent transition +$ IC2SMOOTH : smoothing of transition reprensenting random waves +$ IC2VISC : empirical factor for viscous part +$ +$ +$ Scattering in the ice & creep dissipations- - - - - - - - - - - - - +$ Generalization of Wiliams et al. : Namelist SIS2 +$ ISC1 : scattering coefficient (default = 1) +$ IS2BACKSCAT : fraction of energy back-scattered (default = 1 ) +$ IS2BREAK : TRUE - changes floe max diameter +$ : FALSE - does not change floe max diameter +$ IS2C1 : scattering in pack ice +$ IS2C2 : frequency dependance of scattering in pack ice +$ IS2C3 : frequency dependance of scattering in pack ice +$ ISBACKSCAT : fraction of scattered energy actualy redistributed +$ IS2DISP : use of ice-specific dispersion relation (T/F) +$ FRAGILITY : parameter between 0 and 1 that gives the shape of FSD +$ IS2DMIN : minimum floe diameter in meters +$ IS2DAMP : multiplicative coefficient for dissipation term from RP +$ IS2UPDATE : TRUE - updates the max floe diameter with forcing only +$ : FALSE - updates the max floe diameter at each time step +$ +$ Dissipation by sea ice +$ Empirical/parametric representations : Namelist SIC4 +$ IC4METHOD : integer 1 to 7 +$ : In most cases, additional input +$ : is required. +$ : See examples in /regtests/ww3_tic1.1/ +$ : See also: 1) description in manual +$ : and 2) inline documentation in +$ w3sic4md.ftn +$ +$ Triad nonlinear interactions - - - - - - - - - - - - - - - - - - - - +$ Lumped Triad Interaction (LTA) : Namelist STR1 (To be implemented) +$ PTRIAD1 : Proportionality coefficient (default 0.05) +$ PTRIAD2 : Multiple of Tm01 up to which interaction +$ is computed (2.5) +$ PTRIAD3 : Ursell upper limit for computing +$ interactions (not used, default 10.) +$ PTRIAD4 : Shape parameter for biphase +$ computation (0.2) +$ PTRIAD5 : Ursell number treshold for computing +$ interactions (0.01) +$ +$ Shoreline reflections - - - - - - - - - - - - - - - - - - - - - - - - +$ ref. parameters : Namelist REF1 +$ REFCOAST : Reflection coefficient at shoreline +$ REFFREQ : Activation of freq-dependent ref. +$ REFMAP : Scale factor for bottom slope map +$ REFRMAX : maximum ref. coeffient (default 0.8) +$ REFFREQPOW: power of frequency +$ REFICEBERG: Reflection coefficient for icebergs +$ REFSUBGRID: Reflection coefficient for islands +$ REFCOSP_STRAIGHT: power of cosine used for +$ straight shoreline +$ +$ Bound 2nd order spectrum and free IG - - - - - - - - - - - - - - - - - +$ IG1 parameters : Namelist SIG1 +$ IGMETHOD : 1: Hasselmann, 2: Krasitskii-Janssen +$ IGADDOUTP : activation of bound wave correction +$ in ww3_outp / ww3_ounp +$ IGSOURCE : 1: uses bound waves, 2: empirical +$ IGSTERMS : > 0 : no source term in IG band +$ IGMAXFREQ : maximum frequency of IG band +$ IGEMPIRICAL: constant in empirical free IG source +$ IGBCOVERWRITE: T: Replaces IG spectrum, does not add +$ IGSWELLMAX: T: activates free IG sources for all freq. +$ +$ +$ Propagation schemes ------------------------------------------------ $ +$ First order : Namelist PRO1 +$ CFLTM : Maximum CFL number for refraction. +$ +$ UQ/UNO with diffusion : Namelist PRO2 +$ CFLTM : Maximum CFL number for refraction. +$ DTIME : Swell age (s) in garden sprinkler +$ correction. If 0., all diffusion +$ switched off. If small non-zero +$ (DEFAULT !!!) only wave growth +$ diffusion. +$ LATMIN : Maximum latitude used in calc. of +$ strength of diffusion for prop. +$ +$ UQ/UNO with averaging : Namelist PRO3 +$ CFLTM : Maximum CFL number for refraction. +$ WDTHCG : Tuning factor propag. direction. +$ WDTHTH : Tuning factor normal direction. +$ +$ Note that UQ and UNO schemes have no tunable parameters. +$ All tuneable parameters are associated with the refraction +$ limitation and the GSE alleviation. +$ +$ Unstructured grids ------------------------------------------------ $ +$ UNST parameters : Namelist UNST +$ UGOBCAUTO : TRUE: OBC points are taken from type 15 elements +$ FALSE: OBC points must be listed in ww3_grid.inp +$ UGOBCDEPTH: Threshold ( < 0) depth for OBC points if UGOBCAUTO is TRUE +$ EXPFSN : Activation of N scheme +$ EXPFSPSI : Activation of PSI scheme +$ EXPFSFCT : Activation of FCT scheme +$ IMPFSN : Activation of N implicit scheme +$ IMPTOTAL : Activation of fully implicit scheme | Non splitting +$ EXPTOTAL : Turn on implicit refraction (only with imptotal) +$ IMPREFRACTION : Turn on implicit freq. shift (only with imptotal) +$ IMPFREQSHIFT : Turn on implicit freq. shift terms (only with imptotal) +$ IMPSOURCE : Turn on implicit source terms (only with imptotal) +$ JGS_TERMINATE_MAXITER : max. Number of iterations +$ JGS_TERMINATE_DIFFERENCE : terminate based on the total change of wave action +$ JGS_TERMINATE_NORM : terminate based on the norm of the solution +$ JGS_USE_JACOBI : Use Jacobi solver for imptotal +$ JGS_BLOCK_GAUSS_SEIDEL : Use Block Gauss Seidel method for imptotal +$ JGS_MAXITER : max. Number of solver iterations +$ JGS_PMIN : % of grid points that do not need to converge during solver iteration. +$ JGS_DIFF_THR : implicit solver threshold for JGS_TERMINATE_DIFFERENCE +$ JGS_NORM_THR : terminate based on the norm of the solution +$ SETUP_APPLY_WLV : Compute wave setup (experimental) +$ SOLVERTHR_SETUP : Solver threshold for setup computations +$ CRIT_DEP_SETUP : Critical depths for setup computations +$ +$ SMC grid propagation : Namelist PSMC and default values +$ CFLTM : Maximum CFL no. for propagation, 0.7 +$ DTIME : Swell age for diffusion term (s), 0.0 +$ LATMIN : Maximum latitude (deg) for GCT, 86.0 +$ RFMAXD : Maximum refraction turning (deg), 80.0 +$ LvSMC : No. of refinement level, default 1 +$ ISHFT : Shift number of i-index, default 0 +$ JEQT : Shift number of j-index, default 0 +$ NBISMC : No. of input boundary points, 0 +$ UNO3 : Use 3rd order advection scheme, .FALSE. +$ AVERG : Add extra spatial averaging, .FALSE. +$ SEAWND : Use sea-point only wind input. .FALSE. +$ &PSMC DTIME = 39600.0, LATMIN=85.0, RFMAXD = 36.0, LvSMC=3, JEQT=1344 / +$ +$ Rotated pole ------------------------------------------------------ $ +$ Pole parameters : Namelist ROTD +$ PLAT : Rotated pole latitude +$ PLON : Rotated pole longitude +$ UNROT : Logical, un-rotate directions to +$ true north +$ +$ Compile switch /RTD required. +$ +$ These will be used to derive rotation angle corrections in the +$ model. The corrections are used for rotation of boundary spectra +$ and for restoring conventional lat/lon orientation of the +$ output spectra, mean direction or any related variables. +$ The PLAT/LON example below is a standard setting for Met +$ Office UK regional models. +$ +$ &ROTD PLAT = 37.5, PLON = 177.5, UNROT = .TRUE. / +$ +$ The default values for ROTD represent a non-rotated lat/lon grid: +$ +$ &ROTD PLAT = 90.0, PLON = -180.0, UNROT = .FALSE. / +$ +$ Output boundary conditions to rotated pole grids ------------------ $ +$ +$ Pole parameters : Namelist ROTB +$ BPLAT(1:9) : Pole latitude of each destination grid +$ BPLON(1:9) : Pole longitude of each destination grid +$ +$ Compile switch /RTD required. +$ +$ In ww3_grid.nml the output boundary points are defined via OUTBND_COUNT_NML +$ and OUTBND_LINE_NML namelist as a number of straight lines in the reference +$ system of each destination grid. The index J of BPLAT(J),BPLON(J) is +$ incremented by one where a new output file is started by specifying a +$ negative value for the number of points OUTBND_LINE(I)%NP. +$ +$ Each destination may be either a rotated grid or a standard (non-rotated) +$ lat/lon grid. The default values for ROTB represent standard lat/lon grids: +$ +$ &ROTB BPLAT(1)=90., BPLON(1)=-180., BPLAT(2)=90. / $ (etc.) +$ +$ Output of 3D arrays------------------------------------------------- $ +$ In order to limit the use of memory, arrays for 3D output fiels (i.e. +$ variables that are a function of both space and frequency, are not +$ declared, and thus cannot be used, unless specified by namelists. +$ NB: Output of 'first 5' moments E, th1m, sth1m, th2, sth2m allows to estimate the full +$ directional spectrum using, e.g. MEM (Lygre&Krogstad 1986). +$ +$ Parameters (integers) : Namelist OUTS +$ For the frequency spectrum E(f) +$ E3D : <=0: not declared, > 0: declared +$ I1E3D : First frequency index of output (default is 1) +$ I2E3D : Last frequency index of output (default is NK) +$ For the mean direction th1m(f), and spread sth1m(f) +$ TH1MF, STH1MF : <=0: not declared, > 0: declared +$ I1TH1MF, I1STH1MF: First frequency index of output (default is 1) +$ I2TH1MF, I2STH1MF: First frequency index of output (default is 1) +$ For the mean direction th2m(f), and spread sth2m(f) +$ TH2MF, STH2MF : <=0: not declared, > 0: declared +$ I1TH2MF, I1STH2MF: First frequency index of output (default is 1) +$ I2TH2MF, I2STH2MF: First frequency index of output (default is 1) +$ For 2nd order pressure at K=0 (source of microseisms & microbaroms) +$ P2SF : <=0: not declared, > 0: declared +$ I1P2SF : First frequency index of output (default is 1) +$ I2P2SF : Last frequency index of output (default is NK) +$ For the surface Stokes drift partitions (USP) +$ USSP : First index (default is 1, should always be 1) +$ IUSSP : Last index (must be <= than NK and should be +$ between 3 and ~10 with the tradeoff +$ between accuracy and resources) +$ STK_WN : List of wavenumbers (size of IUSSP) +$ e.g.: USSP = 1, IUSSP=3, STK_WN = 0.04, 0.11, 0.33 +$ provides 3 partitions of both x & y component, +$ with a reasonable accuracy for using in +$ a climate model. +$ +$ Miscellaneous ------------------------------------------------------ $ +$ Misc. parameters : Namelist MISC +$ CICE0 : Ice concentration cut-off. +$ CICEN : Ice concentration cut-off. +$ PMOVE : Power p in GSE aleviation for +$ moving grids in Eq. (D.4). +$ XSEED : Xseed in seeding alg. (!/SEED). +$ FLAGTR : Indicating presence and type of +$ subgrid information : +$ 0 : No subgrid information. +$ 1 : Transparancies at cell boun- +$ daries between grid points. +$ 2 : Transp. at cell centers. +$ 3 : Like 1 with cont. ice. +$ 4 : Like 2 with cont. ice. +$ TRCKCMPR : Logical variable (T/F). Set to F to +$ disable "compression" of track output. +$ This simplifies post-processing. +$ Default is T and will create track +$ output in the traditional manner +$ (WW3 v3, v4, v5). +$ XP, XR, XFILT +$ Xp, Xr and Xf for the dynamic +$ integration scheme. +$ IHMAX : Number of discrete levels in part. +$ HSPMIN : Minimum Hs in partitioning. +$ WSM : Wind speed multiplier in part. +$ WSC : Cut of wind sea fraction for +$ identifying wind sea in part. +$ FLC : Flag for combining wind seas in +$ partitioning. +$ NOSW : Number of partitioned swell fields +$ in field output. +$ PTM : Partioning method: +$ 1 : Default WW3 +$ 2 : Watershedding + wind cutoff +$ 3 : Watershedding only +$ 4 : Wind speed cutoff only +$ 5 : High/Low band cutoff (see PTFC) +$ PTFC : Cutouf frequency for High/Low band +$ partioning (PTM=5). Default = 0.1Hz +$ FMICHE : Constant in Miche limiter. +$ STDX : Space-Time Extremes X-Length +$ STDY : Space-Time Extremes Y-Length +$ STDT : Space-Time Extremes Duration +$ P2SF : ...... +$ CALTYPE: Calendar type. The only accepted +$ values are 'standard' (default), +$ '365_day', or '360_day'. +$ +$ Diagnostic Sea-state Dependent Stress- - - - - - - - - - - - - - - - - +$ Reichl et al. 2014 : Namelist FLD1 +$ TAILTYPE : High Frequency Tail Method +$ 0: Constant value (prescribed) +$ 1: Wind speed dependent +$ (Based on GFDL Hurricane +$ Model Z0 relationship) +$ TAILLEV : Level of high frequency tail +$ (if TAILTYPE==0) +$ Valid choices: +$ Capped min: 0.001, max: 0.02 +$ TAILT1 : Tail transition ratio 1 +$ TAILT1*peak input frequency +$ is the first transition point of +$ the saturation specturm +$ Default is 1.25 +$ TAILT1 : Tail transition ratio 2 +$ TAILT2*peak input frequency +$ is the second transition point of +$ the saturation specturm +$ Default is 3.00 +$ Donelan et al. 2012 : Namelist FLD2 +$ TAILTYPE : See above (FLD1) +$ TAILLEV : See above (FLD1) +$ TAILT1 : See above (FLD1) +$ TAILT2 : See above (FLD1) +$ +$ In the 'Out of the box' test setup we run with sub-grid obstacles +$ and with continuous ice treatment. +$ +&MISC CICE0 = 0.25, CICEN = 0.75, FLAGTR = 4 / +&FLX3 CDMAX = 3.5E-3 , CTYPE = 0 / +$ END OF NAMELISTS +$ +$ -------------------------------------------------------------------- $ +$ End of model parameters namelist file +$ -------------------------------------------------------------------- $ diff --git a/regtests/bin/matrix.base b/regtests/bin/matrix.base index 045fba6882..133165df76 100755 --- a/regtests/bin/matrix.base +++ b/regtests/bin/matrix.base @@ -30,7 +30,7 @@ for par in mpi np nr nth rtst ww3 shrd dist omp \ prop1D prop2D time fetch hur1mg \ multi01 multi02 multi03 multi04 multi05 \ - hybd shwtr unstr pdlib smcgr mudice infgrv \ + hybd shwtr unstr pdlib smcgr rtd mudice infgrv \ uost assim calendar oasis multi06 multi07 multi08 do eval " value=\$$par" @@ -72,7 +72,8 @@ 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 ' SMC / Rotated grid tests : $smcgr'" >> 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 echo " echo ' Mud/Ice and wave interaction tests : $mudice'" >> matrix.head echo " echo ' Second harmonic generation tests : $infgrv'" >> matrix.head @@ -1843,13 +1844,12 @@ echo "$rtst $ww3 -w work_IG1 -o netcdf ww3_tig1.1" >> matrix.body fi -# SMC and rotated grid cases, MPI only if requested +# SMC grid cases, MPI only if requested if [ "$smcgr" = 'y' ] && [ "$shrd" = 'y' ] && [ "$dist" != 'y' ] then echo ' ' >> matrix.body echo "$rtst $ww3 -w work_SHRD_SMC -o both ww3_tp2.10" >> matrix.body - echo "$rtst $ww3 -w work_SHRD_RTD -o both ww3_tp2.11" >> matrix.body echo "$rtst -w work_SHRD $ww3 -o both ww3_tp2.16" >> matrix.body fi @@ -1857,7 +1857,6 @@ then echo ' ' >> matrix.body echo "$rtst -s MPI -w work_MPI -f -p $mpi -n $np $ww3 -o both ww3_tp2.10" >> matrix.body - echo "$rtst -s MPI -w work_MPI -f -p $mpi -n $np $ww3 -o both ww3_tp2.11" >> matrix.body echo "$rtst -s MPI -w work_MPI -f -p $mpi -n $np $ww3 -o both ww3_tp2.16" >> matrix.body fi @@ -1866,6 +1865,28 @@ echo "$rtst -s MPI_OMPH -w work_MPI_OMPH -f -p $mpi -n $nr -t $nth $ww3 -o both ww3_tp2.16" >> matrix.body fi +# Rotated pole grid cases, (ww3_tp2.11 MPI only if requested) + + if [ "$rtd" = 'y' ] && [ "$shrd" = 'y' ] + then + echo ' ' >> matrix.body + echo "$rtst $ww3 ww3_tr1" >> matrix.body + echo "$rtst -i input_std -w work_std $ww3 ww3_tr1" >> matrix.body + echo "$rtst -i input_bndin -w work_bndin $ww3 ww3_tr1" >> matrix.body + fi + + if [ "$rtd" = 'y' ] && [ "$shrd" = 'y' ] && [ "$dist" != 'y' ] + then + echo ' ' >> matrix.body + echo "$rtst $ww3 -w work_SHRD_RTD -o both ww3_tp2.11" >> matrix.body + fi + + if [ "$rtd" = 'y' ] && [ "$dist" = 'y' ] + then + echo ' ' >> matrix.body + echo "$rtst -s MPI -w work_MPI -f -p $mpi -n $np $ww3 -o both ww3_tp2.11" >> matrix.body + fi + # mud/ice cases if [ "$mudice" = 'y' ] && [ "$shrd" = 'y' ] diff --git a/regtests/bin/matrix.comp b/regtests/bin/matrix.comp index 67eb75c6da..3d6604a81e 100755 --- a/regtests/bin/matrix.comp +++ b/regtests/bin/matrix.comp @@ -71,7 +71,7 @@ if [ "$ctest" = 'all' ] ; then - ctest=`ls -d ww3_tp1.? ww3_tp2.? ww3_ts? ww3_tbt1.? ww3_tbt2.? ww3_tic1.? ww3_tic2.? ww3_tig1.? ww3_tp2.1? ww3_ta? mww3_test_0?` ; fi + ctest=`ls -d ww3_tp1.? ww3_tp2.? ww3_ts? ww3_tbt1.? ww3_tbt2.? ww3_tic1.? ww3_tic2.? ww3_tig1.? ww3_tp2.1? ww3_ta? ww3_tr? mww3_test_0?` ; fi echo "base directory : $base_dir" >> $home_dir/header.tmp echo "comp directory : $comp_dir" >> $home_dir/header.tmp echo "test(s) : " >> $home_dir/header.tmp diff --git a/regtests/bin/matrix_datarmor b/regtests/bin/matrix_datarmor index a789dbdcf3..3fcbbf0103 100755 --- a/regtests/bin/matrix_datarmor +++ b/regtests/bin/matrix_datarmor @@ -133,7 +133,8 @@ 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 smcgr='y' # SMC/Rotated grid test + export smcgr='y' # SMC grid test + export rtd='y' # Rotated pole test 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) diff --git a/regtests/bin/matrix_ncep b/regtests/bin/matrix_ncep index 6c7880090e..8f63de3358 100755 --- a/regtests/bin/matrix_ncep +++ b/regtests/bin/matrix_ncep @@ -149,7 +149,8 @@ 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 smcgr='y' # SMC/Rotated grid test + export smcgr='y' # SMC grid test + export rtd='y' # Rotated pole test 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) diff --git a/regtests/bin/matrix_ukmo_cray b/regtests/bin/matrix_ukmo_cray index 33639e5cb9..2448edfe71 100755 --- a/regtests/bin/matrix_ukmo_cray +++ b/regtests/bin/matrix_ukmo_cray @@ -37,8 +37,8 @@ # Set Cray compiler variant; CCE (Cray Compiler Environment) or GNU. # Use GNU for programs compiled with PDLIB, CCE for all others. - comp="CCE" - #comp = "GNU" + #comp="CCE" + comp="GNU" # 1. Set up for compilation environemnt on Cray XC (broadwell processors) @@ -118,7 +118,8 @@ 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 smcgr='y' # SMC/Rotated grid test + export smcgr='y' # SMC grid test + export rtd='y' # Rotated pole test 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) diff --git a/regtests/bin/matrix_zeus_HLT b/regtests/bin/matrix_zeus_HLT index b8da49cd34..5a7328db4a 100755 --- a/regtests/bin/matrix_zeus_HLT +++ b/regtests/bin/matrix_zeus_HLT @@ -94,7 +94,8 @@ 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 smcgr='y' # SMC/Rotated grid test + export smcgr='y' # SMC grid test + export rtd='y' # Rotated pole test 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) diff --git a/regtests/ww3_tr1/info b/regtests/ww3_tr1/info new file mode 100644 index 0000000000..9c8cf857ae --- /dev/null +++ b/regtests/ww3_tr1/info @@ -0,0 +1,45 @@ +############################################################################# +# # +# ww3_tr1: Test script for nest file input/output with rotated pole grids. # +# # +# Model should be compiled with the switches : # +# # +# !/PR1 First order propagation # +# !/RTD Rotated pole support # +# !/O1 Output boundary locations from WW3_GRID program # +# # +# Remarks : # +# # +# 3 tests are provided in seperate input directories: # +# - [input] : A rotated pole grid forced with homogeneous wind that # +# outputs boundary conditions on 3 grids with different poles. # +# # +# - [input_std] : As above, but formulated on a standard pole grid. # +# # +# - [input_bndin] : A rotated pole grid with input boundary conditions # +# on the western edge of the domain. Used to check the correct # +# ingestion of nest files (always formulated on a standard pole) # +# in to a rotated pole grid. # +# # +# For the first two tests, the rotated and standard pole grids have been # +# setup in such a way that the cells on their eastern (sea point) edges # +# align at 2.5W (grid north points in the same direction for all grids # +# along this longitude). This faciliates the selection of nest output # +# points for each output grid as the longitudes are invariant and the # +# latitudes vary by the same amount (1 deg). # +# # +# Example run_test commands: # +# (some details will vary by local system and configuration) # +# ./bin/run_test ../model ww3_tr1 # +# ./bin/run_test -i input_std -w work_std ../model ww3_tr1 # +# ./bin/run_test -i input_bndin -w work_bndin ../model ww3_tr1 # +# # +# Chris Bunney, Jul 2020 # +# Last Mod : Jul 2020 # +# # +# 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_tr1/input/switch b/regtests/ww3_tr1/input/switch new file mode 100644 index 0000000000..be8e68fb7e --- /dev/null +++ b/regtests/ww3_tr1/input/switch @@ -0,0 +1 @@ +F90 SHRD RTD PR1 FLX1 LN1 ST1 NL1 BT0 IC0 IS0 REF0 DB0 TR0 BS0 XX0 WNT1 WNX1 CRT1 CRX1 NOGRB O1 diff --git a/regtests/ww3_tr1/input/ww3_grid.inp b/regtests/ww3_tr1/input/ww3_grid.inp new file mode 100644 index 0000000000..dde54802b3 --- /dev/null +++ b/regtests/ww3_tr1/input/ww3_grid.inp @@ -0,0 +1,58 @@ +$ + 'RTD pole BCs test (RTD grid)' +$ +$ Grid formulated on rotated pole located at 37.5N, 177.5E. +$ This means that the rotated grid north is algined with the +$ standard pole grid north at longitudes of 2.5W. +$ +$ This test produces boundaries conditions on three different +$ grids: +$ - a rotated pole grid with the same pole +$ - a rotated pole grid with a different pole (30.5N, 177.5E) +$ - a standand pole grid +$ The boundary points for the 3 grid are collocated with the +$ eastern seapoint edge of the model grid. +$ +$ 1.1 0.067 20 24 0. + 1.1 0.11 13 24 0. +$ + F T T F F T +$ + 3600 1800 1800 60 +$ + &ROTD PLAT = 37.5, PLON = 177.5, UNROT = .TRUE. / + &ROTB BPLAT(1) = 37.5, BPLON(1) = 177.5, + BPLAT(2) = 30.5, BPLON(2) = 177.5, + BPLAT(3) = 90.0, BPLON(3) = -180.0 / +END OF NAMELISTS +$ + 'RECT' T 'NONE' + 10 10 + 1.0 1.0 1.0 + -8.0 0.0 1.0 + -0.1 10.0 10 -100. 4 1 '(...)' 'NAME' 'dummy' +$ + 100*2 +$ + 10 3 1 '(...)' 'NAME' 'dummy' +$ + 3 3 3 3 3 3 3 3 3 3 + 3 1 1 1 1 1 1 1 1 3 + 3 1 1 1 1 1 1 1 1 3 + 3 1 1 1 1 1 1 1 1 3 + 3 1 1 1 1 1 1 1 1 3 + 3 1 1 1 1 1 1 1 1 3 + 3 1 1 1 1 1 1 1 1 3 + 3 1 1 1 1 1 1 1 1 3 + 3 1 1 1 1 1 1 1 1 3 + 3 3 3 3 3 3 3 3 3 3 +$ +$ +$ Output boundaries (both along eastern edge of domain, but +$ formulated on different poles): +$ + 0.0 1.0 0.0 1.0 8 + 0.0 -6.0 0.0 1.0 -8 + -2.5 53.5 0.0 1.0 -8 + 0. 0. 0. 0. 0 +$ diff --git a/regtests/ww3_tr1/input/ww3_outp.inp b/regtests/ww3_tr1/input/ww3_outp.inp new file mode 100644 index 0000000000..04cb50ef2d --- /dev/null +++ b/regtests/ww3_tr1/input/ww3_outp.inp @@ -0,0 +1,10 @@ +$ + 20010101 060000 3600. 1 +$ + 1 + 2 + -1 +$ + 2 + 2 66 +$ diff --git a/regtests/ww3_tr1/input/ww3_shel.inp b/regtests/ww3_tr1/input/ww3_shel.inp new file mode 100644 index 0000000000..a98f2b49c6 --- /dev/null +++ b/regtests/ww3_tr1/input/ww3_shel.inp @@ -0,0 +1,34 @@ +$ + F F Water levels + F F Currents + T T Winds + F Ice concentrations + F Assimilation data : Mean parameters + F Assimilation data : 1-D spectra + F Assimilation data : 2-D spectra +$ + 20010101 000000 + 20010101 060000 +$ + 2 +$ + 20010101 000000 3600 20010101 060000 + N + HS WND DIR +$ + 20010101 000000 3600 20010101 060000 + -16.4 59.8 'NorthWest ' + -2.5 60.5 'NorthEast ' + 0.0 0.0 'STOPSTRING' +$ + 20010101 000000 0 20010101 000000 +$ + 20010101 000000 0 20010101 000000 +$ + 20010101 000000 3600 20010101 060000 +$ + 20010101 000000 0 20010101 000000 +$ + 'WND' 20010101 000000 10. 180. 0.0 + 'STP' +$ diff --git a/regtests/ww3_tr1/input_bndin/bnd1.spc b/regtests/ww3_tr1/input_bndin/bnd1.spc new file mode 100644 index 0000000000..bb9e702cc2 --- /dev/null +++ b/regtests/ww3_tr1/input_bndin/bnd1.spc @@ -0,0 +1,101 @@ +'WAVEWATCH III SPECTRA' 13 24 1 ' Unknown' + 6.670E-02 7.337E-02 8.071E-02 8.878E-02 9.766E-02 1.074E-01 1.182E-01 1.300E-01 + 1.430E-01 1.573E-01 1.730E-01 1.903E-01 2.093E-01 + 1.571E+00 1.309E+00 1.047E+00 7.854E-01 5.236E-01 2.618E-01 0.000E+00 + 6.021E+00 5.760E+00 5.498E+00 5.236E+00 4.974E+00 4.712E+00 4.451E+00 + 4.189E+00 3.927E+00 3.665E+00 3.403E+00 3.142E+00 2.880E+00 2.618E+00 + 2.356E+00 2.094E+00 1.833E+00 +20010101 000000 +'spec1 ' 51.80 -15.50 0.0 0.00 0.0 0.00 270.0 + 8.736E-02 3.718E-01 8.852E-01 1.840E+00 4.062E+00 2.712E+00 1.293E+00 + 8.843E-01 6.259E-01 4.257E-01 2.813E-01 1.823E-01 1.165E-01 2.876E-02 + 1.224E-01 2.914E-01 6.057E-01 1.337E+00 8.927E-01 4.256E-01 2.911E-01 + 2.061E-01 1.402E-01 9.261E-02 6.000E-02 3.835E-02 9.871E-04 4.201E-03 + 1.000E-02 2.079E-02 4.590E-02 3.064E-02 1.461E-02 9.992E-03 7.072E-03 + 4.810E-03 3.179E-03 2.059E-03 1.316E-03 3.126E-06 1.330E-05 3.167E-05 + 6.583E-05 1.453E-04 9.702E-05 4.625E-05 3.164E-05 2.240E-05 1.523E-05 + 1.007E-05 6.521E-06 4.168E-06 7.299E-10 3.106E-09 7.396E-09 1.537E-08 + 3.394E-08 2.266E-08 1.080E-08 7.388E-09 5.230E-09 3.557E-09 2.350E-09 + 1.523E-09 9.734E-10 8.732E-15 3.716E-14 8.848E-14 1.839E-13 4.060E-13 + 2.710E-13 1.292E-13 8.839E-14 6.256E-14 4.255E-14 2.812E-14 1.822E-14 + 1.164E-14 3.005E-21 1.279E-20 3.045E-20 6.329E-20 1.397E-19 9.328E-20 + 4.447E-20 3.042E-20 2.153E-20 1.465E-20 9.677E-21 6.270E-21 4.008E-21 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 3.005E-21 1.279E-20 3.045E-20 6.329E-20 + 1.397E-19 9.328E-20 4.447E-20 3.042E-20 2.153E-20 1.465E-20 9.677E-21 + 6.270E-21 4.008E-21 8.732E-15 3.716E-14 8.848E-14 1.839E-13 4.060E-13 + 2.710E-13 1.292E-13 8.839E-14 6.256E-14 4.255E-14 2.812E-14 1.822E-14 + 1.164E-14 7.299E-10 3.106E-09 7.396E-09 1.537E-08 3.394E-08 2.266E-08 + 1.080E-08 7.388E-09 5.230E-09 3.557E-09 2.350E-09 1.523E-09 9.734E-10 + 3.126E-06 1.330E-05 3.167E-05 6.583E-05 1.453E-04 9.702E-05 4.625E-05 + 3.164E-05 2.240E-05 1.523E-05 1.007E-05 6.521E-06 4.168E-06 9.871E-04 + 4.201E-03 1.000E-02 2.079E-02 4.590E-02 3.064E-02 1.461E-02 9.992E-03 + 7.072E-03 4.810E-03 3.179E-03 2.059E-03 1.316E-03 2.876E-02 1.224E-01 + 2.914E-01 6.057E-01 1.337E+00 8.927E-01 4.256E-01 2.911E-01 2.061E-01 + 1.402E-01 9.261E-02 6.000E-02 3.835E-02 +20010102 000000 +'spec1 ' 51.80 -15.50 0.0 0.00 0.0 0.00 270.0 + 8.736E-02 3.718E-01 8.852E-01 1.840E+00 4.062E+00 2.712E+00 1.293E+00 + 8.843E-01 6.259E-01 4.257E-01 2.813E-01 1.823E-01 1.165E-01 2.876E-02 + 1.224E-01 2.914E-01 6.057E-01 1.337E+00 8.927E-01 4.256E-01 2.911E-01 + 2.061E-01 1.402E-01 9.261E-02 6.000E-02 3.835E-02 9.871E-04 4.201E-03 + 1.000E-02 2.079E-02 4.590E-02 3.064E-02 1.461E-02 9.992E-03 7.072E-03 + 4.810E-03 3.179E-03 2.059E-03 1.316E-03 3.126E-06 1.330E-05 3.167E-05 + 6.583E-05 1.453E-04 9.702E-05 4.625E-05 3.164E-05 2.240E-05 1.523E-05 + 1.007E-05 6.521E-06 4.168E-06 7.299E-10 3.106E-09 7.396E-09 1.537E-08 + 3.394E-08 2.266E-08 1.080E-08 7.388E-09 5.230E-09 3.557E-09 2.350E-09 + 1.523E-09 9.734E-10 8.732E-15 3.716E-14 8.848E-14 1.839E-13 4.060E-13 + 2.710E-13 1.292E-13 8.839E-14 6.256E-14 4.255E-14 2.812E-14 1.822E-14 + 1.164E-14 3.005E-21 1.279E-20 3.045E-20 6.329E-20 1.397E-19 9.328E-20 + 4.447E-20 3.042E-20 2.153E-20 1.465E-20 9.677E-21 6.270E-21 4.008E-21 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 3.005E-21 1.279E-20 3.045E-20 6.329E-20 + 1.397E-19 9.328E-20 4.447E-20 3.042E-20 2.153E-20 1.465E-20 9.677E-21 + 6.270E-21 4.008E-21 8.732E-15 3.716E-14 8.848E-14 1.839E-13 4.060E-13 + 2.710E-13 1.292E-13 8.839E-14 6.256E-14 4.255E-14 2.812E-14 1.822E-14 + 1.164E-14 7.299E-10 3.106E-09 7.396E-09 1.537E-08 3.394E-08 2.266E-08 + 1.080E-08 7.388E-09 5.230E-09 3.557E-09 2.350E-09 1.523E-09 9.734E-10 + 3.126E-06 1.330E-05 3.167E-05 6.583E-05 1.453E-04 9.702E-05 4.625E-05 + 3.164E-05 2.240E-05 1.523E-05 1.007E-05 6.521E-06 4.168E-06 9.871E-04 + 4.201E-03 1.000E-02 2.079E-02 4.590E-02 3.064E-02 1.461E-02 9.992E-03 + 7.072E-03 4.810E-03 3.179E-03 2.059E-03 1.316E-03 2.876E-02 1.224E-01 + 2.914E-01 6.057E-01 1.337E+00 8.927E-01 4.256E-01 2.911E-01 2.061E-01 + 1.402E-01 9.261E-02 6.000E-02 3.835E-02 diff --git a/regtests/ww3_tr1/input_bndin/bnd2.spc b/regtests/ww3_tr1/input_bndin/bnd2.spc new file mode 100644 index 0000000000..c71b2ed55e --- /dev/null +++ b/regtests/ww3_tr1/input_bndin/bnd2.spc @@ -0,0 +1,101 @@ +'WAVEWATCH III SPECTRA' 13 24 1 ' Unknown' + 6.670E-02 7.337E-02 8.071E-02 8.878E-02 9.766E-02 1.074E-01 1.182E-01 1.300E-01 + 1.430E-01 1.573E-01 1.730E-01 1.903E-01 2.093E-01 + 1.571E+00 1.309E+00 1.047E+00 7.854E-01 5.236E-01 2.618E-01 0.000E+00 + 6.021E+00 5.760E+00 5.498E+00 5.236E+00 4.974E+00 4.712E+00 4.451E+00 + 4.189E+00 3.927E+00 3.665E+00 3.403E+00 3.142E+00 2.880E+00 2.618E+00 + 2.356E+00 2.094E+00 1.833E+00 +20010101 000000 +'spec2 ' 56.70 -17.10 0.0 0.00 0.0 0.00 270.0 + 8.736E-02 3.718E-01 8.852E-01 1.840E+00 4.062E+00 2.712E+00 1.293E+00 + 8.843E-01 6.259E-01 4.257E-01 2.813E-01 1.823E-01 1.165E-01 2.876E-02 + 1.224E-01 2.914E-01 6.057E-01 1.337E+00 8.927E-01 4.256E-01 2.911E-01 + 2.061E-01 1.402E-01 9.261E-02 6.000E-02 3.835E-02 9.871E-04 4.201E-03 + 1.000E-02 2.079E-02 4.590E-02 3.064E-02 1.461E-02 9.992E-03 7.072E-03 + 4.810E-03 3.179E-03 2.059E-03 1.316E-03 3.126E-06 1.330E-05 3.167E-05 + 6.583E-05 1.453E-04 9.702E-05 4.625E-05 3.164E-05 2.240E-05 1.523E-05 + 1.007E-05 6.521E-06 4.168E-06 7.299E-10 3.106E-09 7.396E-09 1.537E-08 + 3.394E-08 2.266E-08 1.080E-08 7.388E-09 5.230E-09 3.557E-09 2.350E-09 + 1.523E-09 9.734E-10 8.732E-15 3.716E-14 8.848E-14 1.839E-13 4.060E-13 + 2.710E-13 1.292E-13 8.839E-14 6.256E-14 4.255E-14 2.812E-14 1.822E-14 + 1.164E-14 3.005E-21 1.279E-20 3.045E-20 6.329E-20 1.397E-19 9.328E-20 + 4.447E-20 3.042E-20 2.153E-20 1.465E-20 9.677E-21 6.270E-21 4.008E-21 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 3.005E-21 1.279E-20 3.045E-20 6.329E-20 + 1.397E-19 9.328E-20 4.447E-20 3.042E-20 2.153E-20 1.465E-20 9.677E-21 + 6.270E-21 4.008E-21 8.732E-15 3.716E-14 8.848E-14 1.839E-13 4.060E-13 + 2.710E-13 1.292E-13 8.839E-14 6.256E-14 4.255E-14 2.812E-14 1.822E-14 + 1.164E-14 7.299E-10 3.106E-09 7.396E-09 1.537E-08 3.394E-08 2.266E-08 + 1.080E-08 7.388E-09 5.230E-09 3.557E-09 2.350E-09 1.523E-09 9.734E-10 + 3.126E-06 1.330E-05 3.167E-05 6.583E-05 1.453E-04 9.702E-05 4.625E-05 + 3.164E-05 2.240E-05 1.523E-05 1.007E-05 6.521E-06 4.168E-06 9.871E-04 + 4.201E-03 1.000E-02 2.079E-02 4.590E-02 3.064E-02 1.461E-02 9.992E-03 + 7.072E-03 4.810E-03 3.179E-03 2.059E-03 1.316E-03 2.876E-02 1.224E-01 + 2.914E-01 6.057E-01 1.337E+00 8.927E-01 4.256E-01 2.911E-01 2.061E-01 + 1.402E-01 9.261E-02 6.000E-02 3.835E-02 +20010102 000000 +'spec2 ' 56.70 -17.10 0.0 0.00 0.0 0.00 270.0 + 8.736E-02 3.718E-01 8.852E-01 1.840E+00 4.062E+00 2.712E+00 1.293E+00 + 8.843E-01 6.259E-01 4.257E-01 2.813E-01 1.823E-01 1.165E-01 2.876E-02 + 1.224E-01 2.914E-01 6.057E-01 1.337E+00 8.927E-01 4.256E-01 2.911E-01 + 2.061E-01 1.402E-01 9.261E-02 6.000E-02 3.835E-02 9.871E-04 4.201E-03 + 1.000E-02 2.079E-02 4.590E-02 3.064E-02 1.461E-02 9.992E-03 7.072E-03 + 4.810E-03 3.179E-03 2.059E-03 1.316E-03 3.126E-06 1.330E-05 3.167E-05 + 6.583E-05 1.453E-04 9.702E-05 4.625E-05 3.164E-05 2.240E-05 1.523E-05 + 1.007E-05 6.521E-06 4.168E-06 7.299E-10 3.106E-09 7.396E-09 1.537E-08 + 3.394E-08 2.266E-08 1.080E-08 7.388E-09 5.230E-09 3.557E-09 2.350E-09 + 1.523E-09 9.734E-10 8.732E-15 3.716E-14 8.848E-14 1.839E-13 4.060E-13 + 2.710E-13 1.292E-13 8.839E-14 6.256E-14 4.255E-14 2.812E-14 1.822E-14 + 1.164E-14 3.005E-21 1.279E-20 3.045E-20 6.329E-20 1.397E-19 9.328E-20 + 4.447E-20 3.042E-20 2.153E-20 1.465E-20 9.677E-21 6.270E-21 4.008E-21 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 3.005E-21 1.279E-20 3.045E-20 6.329E-20 + 1.397E-19 9.328E-20 4.447E-20 3.042E-20 2.153E-20 1.465E-20 9.677E-21 + 6.270E-21 4.008E-21 8.732E-15 3.716E-14 8.848E-14 1.839E-13 4.060E-13 + 2.710E-13 1.292E-13 8.839E-14 6.256E-14 4.255E-14 2.812E-14 1.822E-14 + 1.164E-14 7.299E-10 3.106E-09 7.396E-09 1.537E-08 3.394E-08 2.266E-08 + 1.080E-08 7.388E-09 5.230E-09 3.557E-09 2.350E-09 1.523E-09 9.734E-10 + 3.126E-06 1.330E-05 3.167E-05 6.583E-05 1.453E-04 9.702E-05 4.625E-05 + 3.164E-05 2.240E-05 1.523E-05 1.007E-05 6.521E-06 4.168E-06 9.871E-04 + 4.201E-03 1.000E-02 2.079E-02 4.590E-02 3.064E-02 1.461E-02 9.992E-03 + 7.072E-03 4.810E-03 3.179E-03 2.059E-03 1.316E-03 2.876E-02 1.224E-01 + 2.914E-01 6.057E-01 1.337E+00 8.927E-01 4.256E-01 2.911E-01 2.061E-01 + 1.402E-01 9.261E-02 6.000E-02 3.835E-02 diff --git a/regtests/ww3_tr1/input_bndin/bnd3.spc b/regtests/ww3_tr1/input_bndin/bnd3.spc new file mode 100644 index 0000000000..cc783b4bb1 --- /dev/null +++ b/regtests/ww3_tr1/input_bndin/bnd3.spc @@ -0,0 +1,101 @@ +'WAVEWATCH III SPECTRA' 13 24 1 ' Unknown' + 6.670E-02 7.337E-02 8.071E-02 8.878E-02 9.766E-02 1.074E-01 1.182E-01 1.300E-01 + 1.430E-01 1.573E-01 1.730E-01 1.903E-01 2.093E-01 + 1.571E+00 1.309E+00 1.047E+00 7.854E-01 5.236E-01 2.618E-01 0.000E+00 + 6.021E+00 5.760E+00 5.498E+00 5.236E+00 4.974E+00 4.712E+00 4.451E+00 + 4.189E+00 3.927E+00 3.665E+00 3.403E+00 3.142E+00 2.880E+00 2.618E+00 + 2.356E+00 2.094E+00 1.833E+00 +20010101 000000 +'spec3 ' 60.60 -18.80 0.0 0.00 0.0 0.00 270.0 + 8.736E-02 3.718E-01 8.852E-01 1.840E+00 4.062E+00 2.712E+00 1.293E+00 + 8.843E-01 6.259E-01 4.257E-01 2.813E-01 1.823E-01 1.165E-01 2.876E-02 + 1.224E-01 2.914E-01 6.057E-01 1.337E+00 8.927E-01 4.256E-01 2.911E-01 + 2.061E-01 1.402E-01 9.261E-02 6.000E-02 3.835E-02 9.871E-04 4.201E-03 + 1.000E-02 2.079E-02 4.590E-02 3.064E-02 1.461E-02 9.992E-03 7.072E-03 + 4.810E-03 3.179E-03 2.059E-03 1.316E-03 3.126E-06 1.330E-05 3.167E-05 + 6.583E-05 1.453E-04 9.702E-05 4.625E-05 3.164E-05 2.240E-05 1.523E-05 + 1.007E-05 6.521E-06 4.168E-06 7.299E-10 3.106E-09 7.396E-09 1.537E-08 + 3.394E-08 2.266E-08 1.080E-08 7.388E-09 5.230E-09 3.557E-09 2.350E-09 + 1.523E-09 9.734E-10 8.732E-15 3.716E-14 8.848E-14 1.839E-13 4.060E-13 + 2.710E-13 1.292E-13 8.839E-14 6.256E-14 4.255E-14 2.812E-14 1.822E-14 + 1.164E-14 3.005E-21 1.279E-20 3.045E-20 6.329E-20 1.397E-19 9.328E-20 + 4.447E-20 3.042E-20 2.153E-20 1.465E-20 9.677E-21 6.270E-21 4.008E-21 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 3.005E-21 1.279E-20 3.045E-20 6.329E-20 + 1.397E-19 9.328E-20 4.447E-20 3.042E-20 2.153E-20 1.465E-20 9.677E-21 + 6.270E-21 4.008E-21 8.732E-15 3.716E-14 8.848E-14 1.839E-13 4.060E-13 + 2.710E-13 1.292E-13 8.839E-14 6.256E-14 4.255E-14 2.812E-14 1.822E-14 + 1.164E-14 7.299E-10 3.106E-09 7.396E-09 1.537E-08 3.394E-08 2.266E-08 + 1.080E-08 7.388E-09 5.230E-09 3.557E-09 2.350E-09 1.523E-09 9.734E-10 + 3.126E-06 1.330E-05 3.167E-05 6.583E-05 1.453E-04 9.702E-05 4.625E-05 + 3.164E-05 2.240E-05 1.523E-05 1.007E-05 6.521E-06 4.168E-06 9.871E-04 + 4.201E-03 1.000E-02 2.079E-02 4.590E-02 3.064E-02 1.461E-02 9.992E-03 + 7.072E-03 4.810E-03 3.179E-03 2.059E-03 1.316E-03 2.876E-02 1.224E-01 + 2.914E-01 6.057E-01 1.337E+00 8.927E-01 4.256E-01 2.911E-01 2.061E-01 + 1.402E-01 9.261E-02 6.000E-02 3.835E-02 +20010102 000000 +'spec3 ' 60.60 -18.80 0.0 0.00 0.0 0.00 270.0 + 8.736E-02 3.718E-01 8.852E-01 1.840E+00 4.062E+00 2.712E+00 1.293E+00 + 8.843E-01 6.259E-01 4.257E-01 2.813E-01 1.823E-01 1.165E-01 2.876E-02 + 1.224E-01 2.914E-01 6.057E-01 1.337E+00 8.927E-01 4.256E-01 2.911E-01 + 2.061E-01 1.402E-01 9.261E-02 6.000E-02 3.835E-02 9.871E-04 4.201E-03 + 1.000E-02 2.079E-02 4.590E-02 3.064E-02 1.461E-02 9.992E-03 7.072E-03 + 4.810E-03 3.179E-03 2.059E-03 1.316E-03 3.126E-06 1.330E-05 3.167E-05 + 6.583E-05 1.453E-04 9.702E-05 4.625E-05 3.164E-05 2.240E-05 1.523E-05 + 1.007E-05 6.521E-06 4.168E-06 7.299E-10 3.106E-09 7.396E-09 1.537E-08 + 3.394E-08 2.266E-08 1.080E-08 7.388E-09 5.230E-09 3.557E-09 2.350E-09 + 1.523E-09 9.734E-10 8.732E-15 3.716E-14 8.848E-14 1.839E-13 4.060E-13 + 2.710E-13 1.292E-13 8.839E-14 6.256E-14 4.255E-14 2.812E-14 1.822E-14 + 1.164E-14 3.005E-21 1.279E-20 3.045E-20 6.329E-20 1.397E-19 9.328E-20 + 4.447E-20 3.042E-20 2.153E-20 1.465E-20 9.677E-21 6.270E-21 4.008E-21 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + 0.000E+00 0.000E+00 0.000E+00 3.005E-21 1.279E-20 3.045E-20 6.329E-20 + 1.397E-19 9.328E-20 4.447E-20 3.042E-20 2.153E-20 1.465E-20 9.677E-21 + 6.270E-21 4.008E-21 8.732E-15 3.716E-14 8.848E-14 1.839E-13 4.060E-13 + 2.710E-13 1.292E-13 8.839E-14 6.256E-14 4.255E-14 2.812E-14 1.822E-14 + 1.164E-14 7.299E-10 3.106E-09 7.396E-09 1.537E-08 3.394E-08 2.266E-08 + 1.080E-08 7.388E-09 5.230E-09 3.557E-09 2.350E-09 1.523E-09 9.734E-10 + 3.126E-06 1.330E-05 3.167E-05 6.583E-05 1.453E-04 9.702E-05 4.625E-05 + 3.164E-05 2.240E-05 1.523E-05 1.007E-05 6.521E-06 4.168E-06 9.871E-04 + 4.201E-03 1.000E-02 2.079E-02 4.590E-02 3.064E-02 1.461E-02 9.992E-03 + 7.072E-03 4.810E-03 3.179E-03 2.059E-03 1.316E-03 2.876E-02 1.224E-01 + 2.914E-01 6.057E-01 1.337E+00 8.927E-01 4.256E-01 2.911E-01 2.061E-01 + 1.402E-01 9.261E-02 6.000E-02 3.835E-02 diff --git a/regtests/ww3_tr1/input_bndin/switch b/regtests/ww3_tr1/input_bndin/switch new file mode 100644 index 0000000000..be8e68fb7e --- /dev/null +++ b/regtests/ww3_tr1/input_bndin/switch @@ -0,0 +1 @@ +F90 SHRD RTD PR1 FLX1 LN1 ST1 NL1 BT0 IC0 IS0 REF0 DB0 TR0 BS0 XX0 WNT1 WNX1 CRT1 CRX1 NOGRB O1 diff --git a/regtests/ww3_tr1/input_bndin/ww3_bound.inp b/regtests/ww3_tr1/input_bndin/ww3_bound.inp new file mode 100644 index 0000000000..51dd9af57b --- /dev/null +++ b/regtests/ww3_tr1/input_bndin/ww3_bound.inp @@ -0,0 +1,12 @@ +$ + WRITE +$ READ +$ + 2 +$ + 1 +$ +../input_bndin/bnd1.spc +../input_bndin/bnd2.spc +../input_bndin/bnd3.spc +'STOPSTRING' diff --git a/regtests/ww3_tr1/input_bndin/ww3_grid.inp b/regtests/ww3_tr1/input_bndin/ww3_grid.inp new file mode 100644 index 0000000000..72bfbf899e --- /dev/null +++ b/regtests/ww3_tr1/input_bndin/ww3_grid.inp @@ -0,0 +1,39 @@ +$ + 'RTD grid input BC test' +$ Tests ingestion of BCs from nest.ww3 file for a rotated +$ pole grid. Spectra in nest.ww3 are always formulated on +$ a standard pole, so this tests correct rotation of +$ BC coordinates to model rotated pole grid. +$ + 1.1 0.067 13 24 0. +$ + F T T F F T +$ + 3600 1800 1800 60 +$ + &ROTD PLAT = 37.5, PLON = 177.5, UNROT = .FALSE. / +END OF NAMELISTS +$ + 'RECT' T 'NONE' + 10 10 + 1.0 1.0 1.0 + -8.0 0.0 1.0 + -0.1 10.0 10 -100. 4 1 '(...)' 'NAME' 'dummy' +$ + 100*2 +$ + 10 3 1 '(...)' 'NAME' 'dummy' +$ + 3 3 3 3 3 3 3 3 3 3 + 2 1 1 1 1 1 1 1 1 3 + 2 1 1 1 1 1 1 1 1 3 + 2 1 1 1 1 1 1 1 1 3 + 2 1 1 1 1 1 1 1 1 3 + 2 1 1 1 1 1 1 1 1 3 + 2 1 1 1 1 1 1 1 1 3 + 2 1 1 1 1 1 1 1 1 3 + 2 1 1 1 1 1 1 1 1 3 + 3 3 3 3 3 3 3 3 3 3 +$ + 0. 0. 0. 0. 0 +$ diff --git a/regtests/ww3_tr1/input_bndin/ww3_outp.inp b/regtests/ww3_tr1/input_bndin/ww3_outp.inp new file mode 100644 index 0000000000..4a7f009c5e --- /dev/null +++ b/regtests/ww3_tr1/input_bndin/ww3_outp.inp @@ -0,0 +1,10 @@ +$ + 20010102 000000 3600. 1 +$ + 1 + 2 + -1 +$ + 2 + 2 66 +$ diff --git a/regtests/ww3_tr1/input_bndin/ww3_shel.inp b/regtests/ww3_tr1/input_bndin/ww3_shel.inp new file mode 100644 index 0000000000..422ea7f88a --- /dev/null +++ b/regtests/ww3_tr1/input_bndin/ww3_shel.inp @@ -0,0 +1,31 @@ +$ + F F Water levels + F F Currents + F F Winds + F Ice concentrations + F Assimilation data : Mean parameters + F Assimilation data : 1-D spectra + F Assimilation data : 2-D spectra +$ + 20010101 000000 + 20010102 000000 +$ + 2 +$ + 20010101 000000 3600 20010102 000000 + N + HS WND DIR +$ + 20010101 000000 3600 20010102 000000 + -16.4 59.8 'NorthWest ' + -14.1 52.8 'SouthWest ' + 0.0 0.0 'STOPSTRING' +$ + 20010101 000000 0 20010101 000000 +$ + 20010101 000000 0 20010101 060000 +$ + 20010101 000000 0 20010101 000000 +$ + 20010101 000000 0 20010101 060000 +$ diff --git a/regtests/ww3_tr1/input_std/switch b/regtests/ww3_tr1/input_std/switch new file mode 100644 index 0000000000..be8e68fb7e --- /dev/null +++ b/regtests/ww3_tr1/input_std/switch @@ -0,0 +1 @@ +F90 SHRD RTD PR1 FLX1 LN1 ST1 NL1 BT0 IC0 IS0 REF0 DB0 TR0 BS0 XX0 WNT1 WNX1 CRT1 CRX1 NOGRB O1 diff --git a/regtests/ww3_tr1/input_std/ww3_grid.inp b/regtests/ww3_tr1/input_std/ww3_grid.inp new file mode 100644 index 0000000000..cbf6c99374 --- /dev/null +++ b/regtests/ww3_tr1/input_std/ww3_grid.inp @@ -0,0 +1,56 @@ +$ + 'RTD pole BCs test (STD grid)' +$ +$ This grid is formulated on a standard pole, but produces +$ nest files formulated on rotated pole grids. +$ +$ This test produces boundaries conditions on three different +$ grids: +$ - a rotated pole grid with a pole at 37.5N, 177.5E +$ - a rotated pole grid with a pole at 30.5N, 177.5E +$ - a standand pole grid +$ The boundary points for the 3 grid are collocated with the +$ eastern seapoint edge of the model grid. +$ +$ 1.1 0.067 20 24 0. + 1.1 0.11 13 24 0. +$ + F T T F F T +$ + 3600 1800 1800 60 +$ + &ROTB BPLAT(1) = 37.5, BPLON(1) = 177.5, + BPLAT(2) = 30.5, BPLON(2) = 177.5, + BPLAT(3) = 90.0, BPLON(3) = -180.0 / +END OF NAMELISTS +$ + 'RECT' T 'NONE' + 10 10 + 1.0 1.0 1.0 + -10.5 52.5 1.0 + -0.1 10.0 10 -100. 4 1 '(...)' 'UNIT' 'dummy' +$ + 100*2 +$ + 10 3 1 '(...)' 'UNIT' 'dummy' +$ + 3 3 3 3 3 3 3 3 3 3 + 3 1 1 1 1 1 1 1 1 3 + 3 1 1 1 1 1 1 1 1 3 + 3 1 1 1 1 1 1 1 1 3 + 3 1 1 1 1 1 1 1 1 3 + 3 1 1 1 1 1 1 1 1 3 + 3 1 1 1 1 1 1 1 1 3 + 3 1 1 1 1 1 1 1 1 3 + 3 1 1 1 1 1 1 1 1 3 + 3 3 3 3 3 3 3 3 3 3 +$ +$ +$ Output boundaries (both along eastern edge of domain, but +$ formulated on different poles): +$ + 0.0 1.0 0.0 1.0 8 + 0.0 -6.0 0.0 1.0 -8 + -2.5 53.5 0.0 1.0 -8 + 0. 0. 0. 0. 0 +$ diff --git a/regtests/ww3_tr1/input_std/ww3_outp.inp b/regtests/ww3_tr1/input_std/ww3_outp.inp new file mode 100644 index 0000000000..04cb50ef2d --- /dev/null +++ b/regtests/ww3_tr1/input_std/ww3_outp.inp @@ -0,0 +1,10 @@ +$ + 20010101 060000 3600. 1 +$ + 1 + 2 + -1 +$ + 2 + 2 66 +$ diff --git a/regtests/ww3_tr1/input_std/ww3_shel.inp b/regtests/ww3_tr1/input_std/ww3_shel.inp new file mode 100644 index 0000000000..d44be30119 --- /dev/null +++ b/regtests/ww3_tr1/input_std/ww3_shel.inp @@ -0,0 +1,34 @@ +$ + F F Water levels + F F Currents + T T Winds + F Ice concentrations + F Assimilation data : Mean parameters + F Assimilation data : 1-D spectra + F Assimilation data : 2-D spectra +$ + 20010101 000000 + 20010101 060000 +$ + 2 +$ + 20010101 000000 3600 20010101 060000 + N + HS WND DIR +$ + 20010101 000000 3600 20010101 060000 + -9.5 60.5 'NorthWest ' + -2.5 60.5 'NorthEast ' + 0.0 0.0 'STOPSTRING' +$ + 20010101 000000 0 20010101 000000 +$ + 20010101 000000 0 20010101 000000 +$ + 20010101 000000 3600 20010101 060000 +$ + 20010101 000000 0 20010101 000000 +$ + 'WND' 20010101 000000 10. 180. 0.0 + 'STP' +$ From 49c3c120c038b0145ec87c02aac42dc9558e86c8 Mon Sep 17 00:00:00 2001 From: Chris Bunney <48915820+ukmo-ccbunney@users.noreply.github.com> Date: Mon, 21 Sep 2020 15:57:51 +0100 Subject: [PATCH 2/3] Double allocation error of FIELD variable [w3wavemd] (#14) * Fixed allocation of FIELD variable. * Removed defunct OMPX switches and FLOMP variable --- model/ftn/w3wavemd.ftn | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/model/ftn/w3wavemd.ftn b/model/ftn/w3wavemd.ftn index fc9cfc242c..f12cbc05b3 100644 --- a/model/ftn/w3wavemd.ftn +++ b/model/ftn/w3wavemd.ftn @@ -80,6 +80,8 @@ !/ (M. Accensi & F. Ardhuin, IFREMER) !/ 27-Aug-2015 : Update for ICEH, ICEF ( version 5.08 ) !/ 14-Sep-2018 : Remove PALM implementation ( version 6.06 ) +!/ 15-Sep-2020 : Bugfix FIELD allocation. Remove ( version 7.11 ) +!/ defunct OMPX switches. !/ !/ Copyright 2009-2014 National Weather Service (NWS), !/ National Oceanic and Atmospheric Administration. All rights @@ -154,7 +156,6 @@ ! !/DIST Id. ! !/MPI Id. ! !/OMPG Id. -! !/OMPX Id. ! ! !/PR1 First order propagation schemes. ! !/PR2 ULTIMATE QUICKEST scheme. @@ -456,8 +457,7 @@ LOGICAL :: FLACT, FLZERO, FLFRST, FLMAP, TSTAMP,& SKIP_O, FLAG_O, FLDDIR, READBC, & FLAG0 = .FALSE., FLOUTG, FLPFLD, & - FLPART, LOCAL, FLOUTG2, & - FLOMP = .FALSE. + FLPART, LOCAL, FLOUTG2 ! !Li Logical variable to control regular gird lines in conflict with SMC option. !AR SMC option is in conflict with lofical variables for regular grid ... chicken ... egg ... stuff @@ -497,8 +497,6 @@ ! ! 0.a Set pointers to data structure ! -!/OMPX FLOMP = .TRUE. -! !/COU SCREEN = 333 ! !/DEBUGINIT WRITE(740+IAPROC,*) 'W3WAVE, step 1' @@ -576,8 +574,7 @@ FCUT = SIG(NK) * TPIINV END IF ! -!!Li ALLOCATE ( FIELD(1-NY:NY*(NX+2)) ) - IF( RGLGRD .AND. .NOT. FLOMP ) ALLOCATE ( FIELD(1-NY:NY*(NX+2)) ) + IF( RGLGRD ) ALLOCATE ( FIELD(1-NY:NY*(NX+2)) ) ! !/SMC !!Li Otherwise use sea point only field !/SMC ALLOCATE ( FIELD(NCel) ) @@ -1728,17 +1725,11 @@ !/MPI CALL MPI_STARTALL (NRQSG1, IRQSG1(1,2), IERR_MPI) !/MPI END IF ! -!!/OMPX/!$OMP PARALLEL PRIVATE (ISPEC,FIELD) -! !/DEBUGRUN WRITE(740+IAPROC,*) 'W3WAVE, step 6.14' !/DEBUGRUN FLUSH(740+IAPROC) - - IF ( FLOMP ) ALLOCATE ( FIELD(1-NY:NY*(NX+2)) ) ! ! Initialize FIELD variable FIELD = 0. -! -!!/OMPX/!$OMP DO SCHEDULE (DYNAMIC,1) ! DO ISPEC=1, NSPEC IF ( IAPPRO(ISPEC) .EQ. IAPROC ) THEN @@ -1785,14 +1776,7 @@ !/MEMCHECK write(740+IAPROC,*) 'memcheck_____:', 'WW3_WAVE TIME LOOP 17' !/MEMCHECK call getMallocInfo(mallinfos) !/MEMCHECK call printMallInfo(IAPROC,mallInfos) - - -!!/OMPX/!$OMP END DO - - IF ( FLOMP ) DEALLOCATE ( FIELD ) - -!!/OMPX/!$OMP END PARALLEL - +! !Li Initialise IK IX IY in case ARC option is not used to avoid warnings. IK=1 IX=1 @@ -2609,8 +2593,7 @@ IF ( IAPROC .EQ. NAPLOG ) WRITE (NDSO,902) ! - IF ( .NOT. FLOMP ) DEALLOCATE ( FIELD ) -! + DEALLOCATE(FIELD) DEALLOCATE(TAUWX, TAUWY) ! !/MEMCHECK write(740+IAPROC,*) 'memcheck_____:', 'WW3_WAVE END W3WAVE' From 6d7298f60af7c3842ef8b0fc33ab64092ba799f2 Mon Sep 17 00:00:00 2001 From: Juan Manuel Castillo Sanchez <48921434+ukmo-juan-castillo@users.noreply.github.com> Date: Mon, 21 Sep 2020 15:59:56 +0100 Subject: [PATCH 3/3] Change coupling condition so that it works with all compilers (#12) --- model/ftn/w3wavemd.ftn | 2 +- model/ftn/ww3_shel.ftn | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/model/ftn/w3wavemd.ftn b/model/ftn/w3wavemd.ftn index f12cbc05b3..3c573f800e 100644 --- a/model/ftn/w3wavemd.ftn +++ b/model/ftn/w3wavemd.ftn @@ -2384,7 +2384,7 @@ !/OASIS ! Send variables to atmospheric or ocean circulation or ice model !/OASIS ! !/OASIS IF (DTOUT(7).NE.0) THEN -!/OASIS IF ( (MOD(ID_OASIS_TIME/DTOUT(7),1.0) .LT. 1.E-7 ) .AND. & +!/OASIS IF ( (MOD(ID_OASIS_TIME,NINT(DTOUT(7))) .EQ. 0 ) .AND. & !/OASIS (DSEC21 (TIME00, TIME) .GT. 0.0) ) THEN !/OASACM CALL SND_FIELDS_TO_ATMOS() !/OASOCM CALL SND_FIELDS_TO_OCEAN() diff --git a/model/ftn/ww3_shel.ftn b/model/ftn/ww3_shel.ftn index 9d65a0e4aa..2ea322a40a 100644 --- a/model/ftn/ww3_shel.ftn +++ b/model/ftn/ww3_shel.ftn @@ -1912,7 +1912,7 @@ !/OASIS ELSE !/OASIS ID_OASIS_TIME = DSEC21 ( TIME00 , TIME ) !/OASIS IF ( (DTOUT(7).NE.0) .AND. & -!/OASIS (MOD(ID_OASIS_TIME/DTOUT(7),1.0) .LT. 1.E-7 ) .AND. & +!/OASIS (MOD(ID_OASIS_TIME, NINT(DTOUT(7))) .EQ. 0 ) .AND. & !/OASIS (DSEC21 (TIME, TIMEEND) .GT. 0.0)) DTTST=0. END IF !