-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTD support for ww3_boun[dc] #10
Changes from 4 commits
b7b67cc
501bf96
cc0a204
ba67451
32f31e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,12 @@ \subsubsection{~Rotated grids} \label{sub:num_space_rotagrid} | |
has been used. Gridded netCDF files generated by {\bf ww3\_ounf} also include | ||
\emph{standard\_latitude} and \emph{standard\_longitude} two-dimensional arrays | ||
that describe location of the rotated model cell centres in the standard lat-lon | ||
reference frame. | ||
reference frame. | ||
|
||
If the user wishes to generate boundary conditions for a rotated pole grid using | ||
the {\bf ww3\_bound} or {\bf ww3\_bounc} boundary processing programs, then it | ||
should be noted that the input spectra for these programs are always expected | ||
to be formulated on a \emph{standard pole}. | ||
|
||
Six subroutines are provided in module {\bf w3servmd.ftn} for rotated grid | ||
conversion: | ||
|
@@ -59,3 +64,5 @@ \subsubsection{~Rotated grids} \label{sub:num_space_rotagrid} | |
of a rotated grid model (NAEW). Users may find more information in | ||
\emph{smc\_docs/Rotated\_Grid.pdf} or contact Jian-Guo Li for help | ||
(\url{Jian-Guo.Li@metoffice.gov.uk}). | ||
|
||
Note | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra lines left here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops. Yes - good spot! Fixed in latest commit. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
!/ | F. Ardhuin | | ||
!/ | M. Accensi | | ||
!/ | FORTRAN 90 | | ||
!/ | Last update : 04-May-2020 | | ||
!/ | Last update : 21-Jul-2020 | | ||
!/ +-----------------------------------+ | ||
!/ | ||
!/ 24-May-2013 : Adaptation from ww3_bound.ftn ( version 4.08 ) | ||
|
@@ -18,6 +18,8 @@ | |
!/ 20-Mar-2018 : Improve netcdf file reading ( version 6.02 ) | ||
!/ 15-May-2018 : Add namelist feature ( version 6.05 ) | ||
!/ 04-May-2020 : Update spectral conversion ( version 7.XX ) | ||
!/ 21-Jul-2020 : Support rotated pole grid ( version 7.XX ) | ||
!/ | ||
!/ | ||
!/ Copyright 2012-2013 National Weather Service (NWS), | ||
!/ National Oceanic and Atmospheric Administration. All rights | ||
|
@@ -53,6 +55,7 @@ | |
! EXTCDE Subr. Id. Abort program as graceful as possible. | ||
! WAVNU1 Subr. W3DISPMD Solve dispersion relation. | ||
! W3IOGR Subr. W3IOGRMD Reading/writing model definition file. | ||
! W3EQTOLL Subr W3SERVMD Convert coordinates from rotated pole. | ||
! ---------------------------------------------------------------- | ||
! | ||
! 5. Called by : | ||
|
@@ -66,6 +69,9 @@ | |
! - Can be used also to diagnose contents of nest.ww3 file | ||
! in read mode | ||
! | ||
! - Input spectra are assumed to be formulated on a standard | ||
! pole. However, the model grid can be on a rotated pole. | ||
! | ||
Comment on lines
+72
to
+74
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an important note. A user might do mistakes if not aware of this. May be mentioned in the Manual Sect. 3.4.9 Rotated grids in a separate, short paragraph like: "If the user wants to apply boundary condition from spectral files using one of the programs ww3_bounc or ww3_bound as described in Appendix B.2, the input spectra are assumed to be formulated on a standard pole." There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the review @CarstenHansen . I will make a small addition the to manual to ensure the user is aware that input spectra should be on a standard pole. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have also added some comments in the relevant There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you are happy with the manual/documentation changes, @CarstenHansen , then I will merge and close this PR. Thanks. |
||
! 8. Structure : | ||
! | ||
! ---------------------------------------------------- | ||
|
@@ -106,11 +112,13 @@ | |
GNAME, W3NMOD, W3SETG,& | ||
NSEA, MAPSTA, XYB, GTYPE, XGRD, YGRD, X0, Y0, & | ||
SX, SY, MAPSF, UNGTYPE, CLGTYPE, RLGTYPE, FLAGLL | ||
!/RTD USE W3GDATMD, ONLY : POLAT, POLON | ||
USE W3ODATMD, ONLY: NDSO, NDSE | ||
USE W3IOBCMD, ONLY: VERBPTBC, IDSTRBC | ||
USE W3IOGRMD, ONLY: W3IOGR | ||
USE W3TIMEMD | ||
USE W3SERVMD, ONLY: ITRACE, NEXTLN, EXTCDE, DIST_SPHERE | ||
!/RTD USE W3SERVMD, ONLY: W3EQTOLL | ||
USE W3NMLBOUNCMD | ||
USE NETCDF | ||
!/S USE W3SERVMD, ONLY : STRACE | ||
|
@@ -147,6 +155,8 @@ | |
XBPI(:), YBPI(:), RDBPI(:,:), & | ||
XBPO(:), YBPO(:), RDBPO(:,:), & | ||
ABPIN(:,:), ABPIN2(:,:,:) | ||
!/RTD REAL, ALLOCATABLE :: XTMP(:), YTMP(:), ANGTMP(:) | ||
!/RTD LOGICAL :: ISRTD | ||
! | ||
REAL, ALLOCATABLE :: TMPSPCI(:,:),TMPSPCO(:,:) | ||
|
||
|
@@ -204,6 +214,9 @@ | |
! | ||
CALL W3IOGR ( 'READ', NDSM ) | ||
WRITE (NDSO,920) GNAME | ||
!/RTD! | ||
!/RTD ISRTD = POLAT .LT. 90.0 | ||
!/RTD! | ||
! | ||
!--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
! 3. Read requests from input file. | ||
|
@@ -359,6 +372,7 @@ | |
END IF | ||
END DO | ||
ALLOCATE(XBPO(NBO),YBPO(NBO)) | ||
!/RTD IF (ISRTD) ALLOCATE(XTMP(NBO), YTMP(NBO), ANGTMP(NBO)) | ||
ALLOCATE (IPBPO(NBO,4),RDBPO(NBO,4)) | ||
IBO=0 | ||
DO ISEA=1,NSEA | ||
|
@@ -379,7 +393,16 @@ | |
END SELECT !GTYPE | ||
END IF | ||
END DO | ||
|
||
!/RTD! | ||
!/RTD IF (ISRTD) THEN | ||
!/RTD ! Convert grid boundary cell locations to standard pole | ||
!/RTD XTMP = XBPO | ||
!/RTD YTMP = YBPO | ||
!/RTD CALL W3EQTOLL(YTMP, XTMP, YBPO, XBPO, ANGTMP, POLAT, POLON, NBO) | ||
!/RTD DEALLOCATE(XTMP, YTMP, ANGTMP) | ||
!/RTD ENDIF | ||
!/RTD! | ||
! | ||
OPEN(NDSB,FILE='nest.ww3',FORM='UNFORMATTED',status='unknown') | ||
ALLOCATE(DIMID(NBO2,3),DIMLN(NBO2,3),NCID(NBO2)) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A perfect formulation.