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

Move Grid Generation and Remapping Out of step_MOM_thermo #761

Draft
wants to merge 1 commit into
base: dev/gfdl
Choose a base branch
from

Conversation

theresa-morrison
Copy link

DRAFT FOR DISCUSSION

This PR will move the grid generation (regridding) and remapping routines out of the step_MOM_thermo. This is for two reasons: (1) these routines are not related to stepping the thermodynamics and (2) this change will allow a separate timestep for grid generation and remapping.

These changes were mostly straightforward but some routines in step_MOM_thermo after the ALE block were rearranged and moved into another new routine. I am creating this draft to discuss those changes.

These code changes did not change answers in the Baltic 0.25 degree example case. They should be tested in layer mode and with particles before these changes are accepted. It also did not change the diagnostics saved in my Baltic 0.25 degree example, but diagnostics should also be checked carefully.

Commit:
Move grid generation, remapping, and subsequent processes into a new routine ALE_gridgen_and_remapping which is called immediately after step_MOM_thermo.

Clean up inputs and local variables in step_MOM_thermo by removing those only used for grid generation and remapping.

Routines that need to be done after step_thermo, grid generation and remapping, regardless of use_ALE or not into another routine since they do not make sense in ALE_gridgen_and_remapping.

Answers and diagnostics have not changed in Baltic case in ALE mode. Testing still needs to be done layer mode and with particles.

Move grid generation, remapping, and subsequent processes into a new
routine ALE_gridgen_and_remapping which is called immediately after
step_MOM_thermo.

Clean up inputs and local variables in step_MOM_thermo by removing
those only used for gid generation and remapping.

Routines that need to be done after step_thermo, grid generation
and remapping, regardless of use_ALE or not into another routine
since they do not make sense in ALE_gridgen_and_remapping.

Answers and diagnostics have not changed in Baltic case in ALE mode.
Testing still needs to be done layer mode and with particles.
@awallcraft
Copy link

The ALE code isn't completely consistent in its terminology, but the process of calculating a new vertical grid, what you are calling gridgen, is always referred to as regrid. This is followed by a remap from the old to the new grid. So I suggest renaming ALE_gridgen_and_remapping as step_ALE_regrid_and_remap or perhaps step_MOM_ALE to be consistent with the rest of the routine names.

I don't think update_tracers_after_ALE should mention ALE, I suggest step_MOM_tracer_cleanup.

The wiki contains a Code Style Guide and it says:

All subroutines, functions, arguments, and elements of public types should be described in with dOxygen comments.

If you look at other subroutines you can see that the comments can be long or short, but they must exist.

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