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

+More MOM6 framework code restructuring #1289

Merged
merged 10 commits into from
Jan 19, 2021

Conversation

Hallberg-NOAA
Copy link
Collaborator

This PR includes three more steps in restructuring the MOM6 framework code to
accommodate the FMS2 related changes, specifically the creation of the new
MOM_coms_wrapper, MOM_interpolate and MOM_diag_manager modules. These changes
include new interfaces that are slightly changed from their predecessors by
adding new optional arguments or changing previously mandatory arguments into
optional arguments. Code outside of the framework directory is not required to
change but in this PR it is changed to exercise the new variants. With this PR
the changes to the framework code that would be required to rearrange the files
into different directories to support FMS2 are nearly complete. All answers and
output files are bitwise identical.

To complete the separation of the framework files into a MOM-specific
directory and an FMS wrapper directory, the files MOM_array_transform.F90,
MOM_coms_wrapper.F90, MOM_constants.F90, MOM_cpu_clock.F90,
MOM_diag_manager.F90, MOM_domains.F90, MOM_error_handler.F90, MOM_io_wrapper.F90
and MOM_time_manager.F90 would be moved to the new infrastructure directory,
with one routine (MOM_domains_init) removed from MOM_domains.F90.

The commits in this PR include:

  Added the new module MOM_coms_wrapper, along with explicit interfaces for the
broadcast routine for the cases that might actually be used by MOM6.  With these
new interfaces, the source PE has been made into an optional argument, and there
is a new optional argument to indicate whether the broadcast is blocking.  Also
the MOM_horizontal_regridding module has been updated to reflect these changes.
All answers are bitwise identical, but an existing required argument to
broadcast has been made optional and there is a new optional argument.
  Added the new module MOM_interpolate to wrap the time_interp_external and
horiz_interp modules.  The overloaded interface time_interp_external had to be
renamed to time_interp_extern in the version offered by MOM_interpolate because
of a weird compile time problem with the PGI 19.10.0 compiler.  Some large
blocks of unused code in MOM_horizontal_regridding were commented out.  Also
modified 6 files outside of the framework directory to use these new interfaces,
but they will all work without these changes.  All answers are bitwise
identical.
  Partially cleaned up MOM_horizontal_regridding.F90, including the elimination
of several unused routines, the addition of comments describing variables, and
some white space corrections.  All answers are bitwise identical.
  Moved MOM_diag_manager_wrapper.F90 to MOM_diag_manager.F90 (mostly for
brevity) and added use statements and provided interfaces for all of the
diag_manager_mod, diag_data_mod and diag_axis_mod routines that are used within
the MOM6 code, with some renaming of interfaces to reflect their use within the
MOM6 code.  All answers are bitwise identical.
  Made netcdf module use dependencies explicit in MOM_horizontal_regridding.F90.
All answers are bitwise identical.
@codecov-io
Copy link

Codecov Report

Merging #1289 (76b3ccc) into dev/gfdl (0bd16f4) will increase coverage by 0.00%.
The diff coverage is 56.73%.

Impacted file tree graph

@@            Coverage Diff            @@
##           dev/gfdl    #1289   +/-   ##
=========================================
  Coverage     45.82%   45.83%           
=========================================
  Files           227      229    +2     
  Lines         71552    71592   +40     
=========================================
+ Hits          32791    32813   +22     
- Misses        38761    38779   +18     
Impacted Files Coverage Δ
src/core/MOM_open_boundary.F90 30.76% <0.00%> (ø)
src/diagnostics/MOM_obsolete_diagnostics.F90 85.71% <ø> (ø)
src/framework/MOM_coms.F90 68.05% <ø> (-0.33%) ⬇️
src/framework/MOM_diag_manager.F90 42.85% <ø> (ø)
src/framework/MOM_diag_mediator.F90 66.35% <ø> (ø)
src/framework/MOM_diag_remap.F90 92.89% <ø> (ø)
src/ice_shelf/MOM_ice_shelf.F90 0.00% <0.00%> (ø)
src/ice_shelf/MOM_ice_shelf_diag_mediator.F90 0.00% <ø> (ø)
...rc/parameterizations/vertical/MOM_diabatic_aux.F90 70.99% <0.00%> (ø)
config_src/solo_driver/MOM_driver.F90 68.69% <25.00%> (ø)
... and 7 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 0bd16f4...76b3ccc. Read the comment docs.

@adcroft
Copy link
Collaborator

adcroft commented Jan 14, 2021

@adcroft adcroft merged commit b90ad5c into mom-ocean:dev/gfdl Jan 19, 2021
@Hallberg-NOAA Hallberg-NOAA deleted the revise_framework_more branch July 30, 2021 18:06
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.

3 participants