Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 29 additions & 13 deletions manual/num/rotagrid.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -15,22 +15,38 @@ \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 the boundary
Comment thread
ukmo-ansaulter marked this conversation as resolved.
Outdated
conditions are applied to a model on a standard lat-lon grid, the {\code RTD}
switch is not required in compiling the executables for that model.

Output of spectra at boundary points to one-way nested inner grids are transferred
as described in Appendix~\ref{app:nest}. Output b.c.\ may be 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}. 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}.
Expand Down
52 changes: 22 additions & 30 deletions model/ftn/w3iobcmd.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?.?? )
Comment thread
ukmo-ansaulter marked this conversation as resolved.
Outdated
!/
! 1. Purpose :
!
Expand Down Expand Up @@ -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(:,:)
Expand Down Expand Up @@ -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)
!
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
!
Expand Down
16 changes: 11 additions & 5 deletions model/ftn/w3updtmd.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?.?? )
Comment thread
ukmo-ansaulter marked this conversation as resolved.
Outdated
!/
!/ Copyright 2009-2014 National Weather Service (NWS),
!/ National Oceanic and Atmospheric Administration. All rights
Expand Down Expand Up @@ -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 6.?? )
Comment thread
ukmo-ansaulter marked this conversation as resolved.
Outdated
!/
! 1. Purpose :
!
Expand Down Expand Up @@ -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, &
Expand Down Expand Up @@ -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
Expand Down
Loading