Skip to content
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

Let ww3_grid specify output boundary conditions to rotated grids #68

Closed
CarstenHansen opened this issue Jul 2, 2019 · 13 comments
Closed

Comments

@CarstenHansen
Copy link
Contributor

CarstenHansen commented Jul 2, 2019

I am working on a feature branch fb_rtd2 which is an extension to the /RTD switch. It provides a method to output boundary conditions to a rotated lat/lon grid. This fulfills our need to create one-way nesting to a 9-nmi grid around Greenland. I will await Chris Bunney and colleagues at UKMO to give it a critical look and expect to send a pull request before end of august.
https://github.com/CarstenHansen/WW3/tree/fb_rtd2

@ajhenrique
Copy link
Collaborator

Hi @CarstenHansen do you have any progress to report on this issue? Thanks.

@CarstenHansen
Copy link
Contributor Author

Hi @ajhenrique. I am waiting, with patience, for hopefully critical feed-back from @ukmo-ccbunney and @ukmo-ansaulter.
The feedback is needed because 1) it is possible at run an SMC model with the /RTD switch, 2) they made the 2018 enhancements that makes my enhancement possible, and 3) ww3_ounf.ftn becomes more complex because the suggested enhancement allows a standard lat-lon model to be set up with the /RTD switch.
Maybe also I should learn to run run relevant regtests?

@ukmo-ccbunney
Copy link
Collaborator

Hello @CarstenHansen ,
I'm sorry I have not had a chance to have a proper look at this yet - I've been a bit snowed under since returning from 5 weeks parental leave! I'm working on a PR at the moment to fix some bugs that are stopping the Met Office from achieving our Trusted Institutional Fork status. Once this is sorted, @ukmo-ansaulter or myself will review of your feature branch ASAP!
Regards,
Chris.

@ukmo-ansaulter
Copy link
Collaborator

Hi @CarstenHansen . @ukmo-ccbunney and I have looked through the changes you've proposed. The concept and code changes seem fine, although I have added one comment regarding the logic in ww3_ounf.ftn for you to look at.
There is probably a requirement for some further testing (maybe we need to run your code with our rotated grid models for a comparison) and an update to the manual (as this option means we need to compile a standard grid model with /RTD if any of the nested models are rotated).

@CarstenHansen
Copy link
Contributor Author

Thank you @ukmo-ansaulter and @ukmo-ccbunney for looking this through. I agree with your comment that there should be no special logical conditions in ww3_ounf.ftn in case you are running an SMC grid. I will appreciate if you try to run my code in a rotated grid model of yours. Especially if you run an SMC grid model for which I have no experience.

@CarstenHansen
Copy link
Contributor Author

@ukmo-ansaulter and @ukmo-ccbunney: I agree there should be additional three or four sentences in the manual stating three additional points:

  1. With RTD in the switch file, output b. c. to one or more nested grids, being either rotated or standard lat-lon, can be written to files nestI.ww3 by specifying in the namelists the latitude and longitude of each nested file.
  2. When applying the boundary conditions from such a file to a model on a standard lat-lon grid, the RTD switch is not required in compiling the executables for that model.
  3. Without the compile switch RTD it is still possible (I think) to output to out_pnt.ww3 the wave spectra in the individual nesting grid points and pre-process these data for the nested run using the programs ww3_ounp and ww3_bounc or ww3_bound (this must be more precise - I havn't tried this procedure).

@ukmo-ccbunney
Copy link
Collaborator

Hello @CarstenHansen ,

I have run a test using your fb_rtd2 branch on our Global configuration and nested Atlantic Margin Model (AMM; formulated on a rotated pole). I have also run the same configurations using the develop branch as a control.

The results confirm that the nest files are the same between the develop and fb_rtd2 branches (using WW3_BOUND to check the indices and interpolation coefficients of the boundary spectra).

The only difference is in the output netCDF file for the non-rotated SMC global model: this contains attributes and variables relating to the rotated pole that should not be there; this was expected and discussed in the comments above.

When you have made the changes discussed in previous comments, I will rerun the test again. However, it all looks pretty good from our end! Nice work.

One small related comment (and not an action on you): I notice that when running the WW3_GRID program with the !/O2 switch (to produce a list of input boundary locaitons), the output is missing for grids using the SMC scheme. This is due to the way that the boundary points are dealt with internally by the SMC code. We have SMC grid generation tools here at the Met Ofice (which we intend to share with the wider community) that do provide a list of boundary points as part of the output, but it is worth noting that the method described in the manual will not work for SMC grids.

@CarstenHansen
Copy link
Contributor Author

Thank you @ukmo-ccbunney, I am very happy to see this.

I have removed the condition ' .OR. SMCGRD' in the two paces in ww3_ounf.ftn that cause the wrong NetCDF attributes related to a rotated pole (noticed by @ukmo-ansaulter) and I have push'ed a new commit ddbaa87 also including simplifications to a few comments.

@CarstenHansen
Copy link
Contributor Author

I will dig into the manual and suggest the few necessary updates to sections 4.4.9 Rotated grids, G1.1 ww3 grid.inp, and G.1.2 ww3 grid.nml. Also check for consistency with Sect. B1, step (4) in the instructions for setting output boundary conditions.

@CarstenHansen
Copy link
Contributor Author

Hi @ukmo-ccbunney and @ukmo-ansaulter. I have modified the manual (file manual/num/rotagrid.tex and pushed to commit CarstenHansen@6a0ffac.
I think Jian-Guo Li should be consulted to see if the text reads OK.
I have kept the reference to the traditional format of input file ww3_grid.inp, not mentioning the 'new' format ww3_grid.nml. This is because the example in manual Sect. G.1.2 does not show how to define the namelists ROTD and ROTB, but only how to define the containing filename GRID%NML= ’namelists.nml’. This seems to be a separate issue with the manual, since that file also contains the example of an ’Out of the box’ test setup.

@CarstenHansen
Copy link
Contributor Author

Here is a print of the two pages modified: manual_pp151-152.pdf

@ukmo-ccbunney
Copy link
Collaborator

@CarstenHansen - that all looks very sensible to me.
Cheers, Chris.

@CarstenHansen
Copy link
Contributor Author

Incorporated in Pull request "UKMO Staging [fb_rtd2, bf_coupling condition, bf_smc_omp]" #254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants