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

Add Test for Dycore+Topography with Analytic Solution #3072

Open
6 tasks
dennisYatunin opened this issue Jun 6, 2024 · 0 comments · May be fixed by #3182
Open
6 tasks

Add Test for Dycore+Topography with Analytic Solution #3072

dennisYatunin opened this issue Jun 6, 2024 · 0 comments · May be fixed by #3182

Comments

@dennisYatunin
Copy link
Member

dennisYatunin commented Jun 6, 2024

In order to answer some lingering design questions about the dycore (the main two being whether metric terms should be DSSed and how velocity should be reconstructed), we need to add a quantitative test of topography to our CI. This test should compare the velocities generated by our model against a known analytic solution, or at least a close approximation of the true solution, and it should generate plots that allow us to easily distinguish dycores with slightly different numerics.

In the literature, the standard test problem for topography is flow over an isolated mountain in a long periodic channel. (Usually the mountain has either the Schar profile or the Agnesi profile, since both of those have simple Fourier transforms.) A derivation of the approximate solution for this problem is outlined in this documentation for the COSMO model. Ideally, our test should be able to reproduce the contour plots from this paper, with a comparable amount of deviation from the analytic solution. It would also be helpful to reproduce the streamline plots from this general overview of mountain waves, since we don't currently have any visualizations of wind direction.

Lastly, we want to plot the RMSE of each velocity component by elevation, and then check that the overall RMSE is below some chosen threshold. If this does not allow us to easily distinguish between different dycore numerics, we can instead plot the overall RMSE as a function of spatial resolution, and then check that it converges to 0 at the expected rate.

Update on 6/28:

The analytic solution from the COSMO documentation did not have sufficient accuracy to resolve the errors in the Schar mountain test. A solution that is more visually similar to our numerical simulations can be found in Numerical Consistency of Metric Terms in Terrain-Following Coordinates by Klemp and Skamarock. However, this derivation in this paper involves several assumptions that we do not need to make (e.g., the Boussinesq approximation), so I've derived a new approximation that uses the same minimal assumptions as the COSMO documentation, which can be viewed in this Overleaf document.

TODO

Tasks

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

Successfully merging a pull request may close this issue.

2 participants