Fb rtd2#7
Conversation
|
Hi @CarstenHansen. It looks like your branch has some merge conflicts with our develop branch. Is your branch up-to-date with the latest development from the NOAA develop branch? Looking at the commit history in this branch, I cannot see the latest commits that are present in the NOAA/UKMO develop branches... |
|
Hi @ukmo-ccbunney. When I press the '+- Compare' link on the github webpage and choose 'base repository: ukmo-waves/WW3, base: develop', it says: I see that I added the latest commit 8e7e264 to my branch on May 28, which was a small, trivial update. This commit has 2 parents 239b75f + 3085d9f. 3085d9f is the present NOAA-EMC develop, and 239b75f was my previous merge of NOAA-EMC develop. Would it help to revert this commit 8e7e264 to 3085d9f ? I wonder why I cannot view change to fb_rtd2 in commit 8e7e264 on the github web page. I think it may be because every time I do a merge of NOAA-EMC develop, it automatically creates a new commit. |
This feature requires the switch RTD. It allows the user to specify
the pole of each nested grid for output of boundary conditions ('b.c.')
directly to files nestI.ww3. The pole is specified as the I'th element
of arrays BPLAT(1:9)/BPLON(1:9) in a namelist &ROTB. For e.g. I=2, a
nested grid may be rotated with pole specified as
'&ROTB BPLAT(2) = 20., BPLON(2) = -130., / ! b.c. to nest2.ww3'
The default of &ROTB is output to standard spherical grids,
BPLAT(1:9)=90, BPLON(1:9)=-180. With a value of BPLAT(I)==90, it is
required that BPLON(I)=-180.
In the forecast production at FCOO we run ww3_shel for a sequence of
nested models where some (Arctic and Greenland) have rotated lat/lon
coordinates, and others (Atlantic, European North-West Shelf and
the Baltic) have standard lat/lon coordinates.
Output b.c. to standard lat/lon is fairly simple even from a rotated
model. Without the present feature you may output point spectra at
the precise boundary points and post-process the output using
ww3_bounc or ww3_bound to generate nest.ww3 for the nested model. But
if output b.c. are to a rotated grid you would have to remap each point
to standard lat/lon values before writing the ww3_grid.{inp,nml} file.
Using the present feature a remapping of boundary conditions from
rotated lat/lon coordinates to standard lat/lon values is performed
internally in the ww3_grid program. These standard lat/lon values are
stored in the mod_def file and will be written to nestI.ww3 during
model runs.
Effects of this feature:
- 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.
- The default grid pole is the geographic north of a standard lat/lon
grid. This corresponds to a &ROTD namelist with values
'&ROTD PLAT==90., PLON=-180., UNROT=.FALSE. /' (these are the only
allowed values with PLAT==90). This default alleviates output b.c. to
a rotated grid from a standard lat/lon grid.
- Modified program ww3_grid and subroutine W3IOBC: The output b.c.
coordinates are remapped to standard lat/lon and stored in the
mod_def file. This remapping is not performed during runtime when
writing to nestI.ww3. When PLAT==90, the array AnglD in the mod_def
file is zero-valued.
- Modified subroutine W3UBPT: Rotation of spectra is performed only if
PLAT<90.
- Modified program ww3_ounf: With PLAT==90 (if the grid is not
remapped from an SMC grid), the NetCDF field output has no attributes
related to a rotated pole grid mapping and does not contain the 2D
variables standard_latitude and standard_longitude.
- Modified input examples inp/ww3_grid.inp, nml/ww3_grid.nml, and added
nml/namelists_GULF.nml.
|
Hi @CarstenHansen |
|
Hi @aliabdolali. I forgot to link to the issue NOAA-EMC#68 in which I originally described this enhancement. I understood very little about regtests at that time, and @ukmo-ccbunney and @ukmo-ansaulter offered to help performing the regtests - maybe incorporate it in the regtest for RTD. |
|
Hi @CarstenHansen |
|
Hi @aliabdolali |
ukmo-ansaulter
left a comment
There was a problem hiding this comment.
Thanks for doing such a great job @CarstenHansen
I've tested these changes with our standard grid global model -> rotated grid regional model set-up and everything works OK.
In addition to the comments I've added here one further suggested change would be to up the precision of the error outputs associated with BCs; one issue I did have was in diagnosing where I'd set the BCs up incorrectly onto a high resolution grid. The suggested change is for lines 6051-52
994 FORMAT ( ' *** POINT OUTSIDE GRID (SKIPPED) : X,Y =',2F10.5)
995 FORMAT ( ' *** POINT ON LAND (SKIPPED) : X,Y =',2F10.5)
Regarding the regtest, @ukmo-ccbunney need to have a look at what to do and whether the existing tp2.11 is fit for purpose. So, if you are happy with the proposed changes, suggest you mgiht deal with these now whilst we come up with a plan for the regtest.
|
Great to see that your tests were OK @ukmo-ansaulter. |
…tion of error message, full template text in namelists.nml, clearify the manual
ukmo-ansaulter
left a comment
There was a problem hiding this comment.
Thanks for adopting these changes @CarstenHansen
In terms of the code, I approve this review. Will finalise an approval once @ukmo-ccbunney has revised and tested the new RTD regtests
|
@CarstenHansen I have some regression tests ready for this change; we need to get them added to your branch. You can either: |
@ukmo-ccbunney I have invited you as a collaborator, which is the way i seems you will have write (push) access. |
Thanks @CarstenHansen - I've pushed a commit to your branch containing the regtests (see ww3_tr1). There are 3 tests in seperate input directories (see the The third test under the |
|
Thank you. Your explanation (and the file regtests/ww3_tr1/info) makes good sense to me. |
ukmo-ansaulter
left a comment
There was a problem hiding this comment.
Approving this request - the new regtests are appropriate for covering RTD functionality
Also updated version numbers for 7.11 RTDB milestone.
|
@CarstenHansen : I've just pushed up commit 9e24969 which contains a merge of the develop branch. There were a few changes required to fix some merge conflicts. I have also updated the version numbers inline with the milestone for this change. Can you just check you are happy with the modifications? |
|
Hi @ukmo-ccbunney. Commit 9e24969 looks fine, I just found one typo in model/ftn/w3_bound.ftn: 'version 7.06' should be 'version 7.11' ? |
Hi @CarstenHansen - I originally did not consider the ww3_bound/ww3_bounc changes to be part of the 7.11 milestone as they were more bugfixes to the original RTD functionality. However, it seems that the ww3_bounc.ftn module has been updated to 7.11, so let's keep the ww3_bound.ftn module the same and make it 7.11 too. I'll push up a modification. Thanks. |
Also, split the SMC/RTD regtests into their own seperate switches.
|
Regtest for I am going to run the full regression test suite now. |
|
Results of full regression test matrix: matrixComp.zip Summary of differences:
I'm happy for this change to be merged. @aliabdolali - are you happy with the changes? |
ukmo-ccbunney
left a comment
There was a problem hiding this comment.
All looks good to me now.
|
Just one final small commit - I forgot to add the |
aliabdolali
left a comment
There was a problem hiding this comment.
It looks ok to me. Thanks for doing this clean work.
|
I wanted to press approve bottom but pressed the comment bottom instead :) Please consider it approved. |
* 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 <christopher.bunney@metoffice.gov.uk> * Double allocation error of FIELD variable [w3wavemd] (#14) * Fixed allocation of FIELD variable. * Removed defunct OMPX switches and FLOMP variable * Change coupling condition so that it works with all compilers (#12) Co-authored-by: Carsten Hansen <cha@fcoo.dk> Co-authored-by: Juan Manuel Castillo Sanchez <48921434+ukmo-juan-castillo@users.noreply.github.com>
This feature allows the user to specify output boundary conditions to rotated grids under switch /RTD.
Explanations are added to the manual Sect. "3.4.9 Rotated grids".
The pole of each destination grid is specified as the I'th element
of arrays BPLAT(1:9) and BPLON(1:9) in a namelist &ROTB, e.g. as
'&ROTB BPLAT(2) = 20., BPLON(2) = -130., / ! boundary conditions to nest2.ww3'
The default of the namelist &ROTB is output to standard spherical grids,
BPLAT(1:9)=90, BPLON(1:9)=-180.