Skip to content

Implement support for moving mountain gravity wave scheme in MPAS dycore #1297

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

Open
wants to merge 5 commits into
base: cam_development
Choose a base branch
from

Conversation

kuanchihwang
Copy link

This PR implements support for moving mountain gravity wave scheme in MPAS dycore.

The use_gw_movmtn_pbl namelist option will now default to .true. when MPAS dycore and CAM7 physics are both selected, which matches the behavior as in SE dycore.

The moving mountain gravity wave scheme needs relative vorticities at cell points as input. However, because MPAS uses staggered C-grid for spatial discretization, where wind vectors are located at edge points, it calculates relative vorticities at vertex points instead. As a result, this PR introduces a new functionality in MPAS subdriver to regrid vertex values to cell values. The regridding functionality is also generalized so that it will work with all variables at vertex points.

Subsequently, relative vorticities are passed to physics buffer during dynamics-physics coupling, after which the moving mountain gravity wave scheme can query and use them as input.

Closes #1253
Closes #1277

Additional notes about tests:

  • This PR is expected to be answer-changing for MPAS dycore with CAM7 physics, but all relevant regression tests still pass because they do not test this particular configuration.
  • I manually ran the "F2000dev" compset with MPAS dycore. I inspected and plotted the "VORT4GW" variable in physics buffer. I can confirm that relative vorticities are correctly passed to physics by visual inspection.
  • MPAS dycore has variables that are located at both cell and vertex points (e.g., absolute vorticities). I used the regridding functionality in this PR to calculate absolute vorticities at cell points, and compared the results with the values calculated internally by MPAS. The global maximum absolute error is in the order of $10^{-19}$, which shows that the implementation is provably correct.

@kuanchihwang
Copy link
Author

I do not have the permission to either assign myself or request reviews. Tagging @PeterHjortLauritzen and @mgduda to take a look at this PR to ensure scientific correctness.

@mgduda
Copy link
Collaborator

mgduda commented Apr 21, 2025

I do not have the permission to either assign myself or request reviews. Tagging @PeterHjortLauritzen and @mgduda to take a look at this PR to ensure scientific correctness.

Thanks for the tag! I've just added myself and @PeterHjortLauritzen as reviewers.

@cacraigucar cacraigucar requested a review from nusbaume April 22, 2025 18:26
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

Successfully merging this pull request may close these issues.

2 participants