Skip to content

+Clarify the use of grid types#1537

Merged
marshallward merged 4 commits into
mom-ocean:dev/gfdlfrom
Hallberg-NOAA:grid_type_clarification
Nov 11, 2021
Merged

+Clarify the use of grid types#1537
marshallward merged 4 commits into
mom-ocean:dev/gfdlfrom
Hallberg-NOAA:grid_type_clarification

Conversation

@Hallberg-NOAA
Copy link
Copy Markdown
Collaborator

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:

  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
Copy link
Copy Markdown

codecov Bot commented Oct 27, 2021

Codecov Report

Merging #1537 (2629a50) into dev/gfdl (f2e9983) will decrease coverage by 0.05%.
The diff coverage is 14.49%.

❗ Current head 2629a50 differs from pull request most recent head 01ee96a. Consider uploading reports for the commit 01ee96a to get more accurate results
Impacted file tree graph

@@             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     
Impacted Files Coverage Δ
src/core/MOM_transcribe_grid.F90 32.27% <ø> (+7.64%) ⬆️
src/framework/MOM_dyn_horgrid.F90 35.65% <0.00%> (-27.04%) ⬇️
src/core/MOM.F90 58.89% <50.00%> (-0.12%) ⬇️
...c/parameterizations/vertical/MOM_vert_friction.F90 41.96% <0.00%> (-2.31%) ⬇️
src/framework/MOM_file_parser.F90 59.85% <0.00%> (-1.23%) ⬇️
src/parameterizations/lateral/MOM_hor_visc.F90 43.42% <0.00%> (-0.64%) ⬇️
src/core/MOM_forcing_type.F90 47.22% <0.00%> (-0.22%) ⬇️
src/parameterizations/vertical/MOM_CVMix_conv.F90 9.70% <0.00%> (-0.20%) ⬇️
...rc/parameterizations/vertical/MOM_diabatic_aux.F90 34.57% <0.00%> (-0.10%) ⬇️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f2e9983...01ee96a. Read the comment docs.

@marshallward
Copy link
Copy Markdown
Collaborator

Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/14068 ✔️ 🟡

Confirmed reordering of REFERENCE_HEIGHT parameter.

@marshallward marshallward merged commit 688bff9 into mom-ocean:dev/gfdl Nov 11, 2021
@Hallberg-NOAA Hallberg-NOAA deleted the grid_type_clarification branch November 27, 2021 11:20
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