+Clarify the use of grid types#1537
Merged
marshallward merged 4 commits intoNov 11, 2021
Merged
Conversation
Moved the routine rotate_dyngrid() from the MOM_transcribe_grid module to rotate_dyn_horgrid() in the MOM_dyn_horgrid module so that this routine can also be used at some point by SIS2 to implement rotational consistency testing, and also to reflect that this routine only works with types from its new module. The two routines are the same apart from some added comments, and the old name of rotate_dyngrid() is still available from MOM_transcribe_grid via a module use statement. All answers are bitwise identical.
Minimized the dependence on dyn_horgrid in initialize_MOM by working directly with the horizontal index type whereever possible and by moving the calls that create the MOM_grid_type earlier in the routine, to limit the duration of the dyn_horgrid_type, and to better co-locate grid-related parameters in the parameter_doc files. Also uses the new interface to rotate_dyn_horgrid from the MOM_dyn_horgrid module in place of the rotate_dyngrid interface from the MOM_transcribe_grid module. All answers are bitwise identical, but the order of some entries in the MOM_parameter_doc files has changed.
Modified drivers/unit_drivers/MOM_sum_driver.F90 to compile with the latest version of the rest of the MOM6 code by using the proper types in the various initialization calls, and verified that it runs as intended.
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #1537 +/- ##
============================================
- Coverage 29.15% 29.10% -0.06%
============================================
Files 239 239
Lines 71467 71521 +54
============================================
- Hits 20837 20815 -22
- Misses 50630 50706 +76
Continue to review full report at Codecov.
|
Collaborator
|
Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/14068 ✔️ 🟡 Confirmed reordering of |
marshallward
approved these changes
Nov 11, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR simplifies the use of the dynamic and ocean-model specific grid types,
moving the routine to rotate a dynamic grid into the MOM_dyn_horgrid module
where it belongs and where it can be shared with SIS2, and reducing the
unnecessary use of elements of the grid type in initialize_MOM and the space in
code where the two grids coexist. It also correct compile-time inconsistencies
in the use of grid types between unit_drivers/MOM_sum_driver.F90 and the rest
of the MOM6 code, so that it once again compiles and works. All answers that
worked before are bitwise identical with this change, although there is some
reordering of one entry in the MOM_parameter_doc files. The commits in this PR
include: