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

+Add explicit API documentation to MOM6 framework #1297

Merged
merged 8 commits into from
Jan 26, 2021

Conversation

Hallberg-NOAA
Copy link
Collaborator

This PR includes a number of steps to add explicit APIs within the MOM6
framework code, to eliminate the direct use of FMS or mpp routies, and to
simplify the interfaces used by MOM6. This PR includes the new files
MOM_coupler_types.F90 and MOM_couplertype_infra.F90, and some interfaces
are slightly changed.

The commits in this PR include:

  Overloaded get_domain_extent to extract index ranges with domain2D types as
well as MOM_domain_types.  Also made the global extent arguments optional to
get_domain_extent_MD.  All answers are bitwise identical.
  Added MOM_coupler_types.F90 and MOM_couplertype_infra.F90 to provide explicit
interfaces for the routines from coupler_type_mod that MOM6 uses, with some new
interfaces, extract_coupler_type_data and set_coupler_type_data, that are
tailored to their use in MOM6.  All answers are bitwise identical, but there are
some new public interfaces.
  Modified the various MOM6 tracer packages to use the MOM_coupler_types module
along with new and simpler MOM_coupler_types interfaces.  Also modified the
module use statements in some of the core and diagnostics modules to access
the coupler_types routines via MOM_coupler_types module.  All answers are
bitwise identical.
  Channel all infrastructure calls from coupled_driver via the MOM6 framework
code.  This includes changing the type of one of the arguments and eliminating
another argument to initialize_ocean_public_type to pass a MOM_domain_type, and
using clone_MOM_domain to create the domain2D element of the Ocean_sfc type.
All answers are bitwise identical.
  Channel all infrastructure calls from solo_driver via the MOM6 framework code.
This includes adding 2 more interfaces to MOM_ensemble_manager and making the
affinity routines to those that are publicly accessible from MOM_domains.
Several spelling errors in comments were also corrected.  All answers are
bitwise identical, but some subroutines are accessible from new modules.
  Added explicitly documented interfaces to close_file, flux_file,
io_infra_init, io_infra_end, get_file_info, get_file_fields, and get_field_atts
to MOM_io_infra.F90.  Also changed from get_file_atts to get_field_atts for the
routine that is available via MOM_io.F90 and used in MOM_restart, since this
name captures the use of this call and reflects which of the underlying routines
the overloaded interface mpp_get_atts resolves to.  All answers are bitwise
identical, but there is a localized interface name change, and not all of the
optional arguments in the underlying FMS or mpp routines are being made
available for use with MOM6 code.
@codecov-io
Copy link

codecov-io commented Jan 25, 2021

Codecov Report

Merging #1297 (7ce0ce3) into dev/gfdl (b3e33d4) will decrease coverage by 0.05%.
The diff coverage is 16.75%.

Impacted file tree graph

@@             Coverage Diff              @@
##           dev/gfdl    #1297      +/-   ##
============================================
- Coverage     45.90%   45.85%   -0.06%     
============================================
  Files           231      233       +2     
  Lines         71733    71865     +132     
============================================
+ Hits          32929    32952      +23     
- Misses        38804    38913     +109     
Impacted Files Coverage Δ
config_src/solo_driver/MOM_driver.F90 68.69% <ø> (ø)
src/core/MOM.F90 65.63% <ø> (ø)
src/core/MOM_forcing_type.F90 62.35% <ø> (ø)
src/core/MOM_variables.F90 57.77% <0.00%> (ø)
src/diagnostics/MOM_diagnostics.F90 87.86% <ø> (ø)
src/framework/MOM_domains.F90 52.10% <ø> (ø)
src/framework/MOM_io.F90 52.77% <ø> (ø)
src/framework/MOM_restart.F90 37.36% <0.00%> (ø)
src/tracer/DOME_tracer.F90 68.29% <0.00%> (ø)
src/tracer/ISOMIP_tracer.F90 0.00% <0.00%> (ø)
... and 15 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 b3e33d4...7ce0ce3. Read the comment docs.

@adcroft adcroft merged commit ee924f5 into mom-ocean:dev/gfdl Jan 26, 2021
@Hallberg-NOAA Hallberg-NOAA deleted the framework_APIs branch July 30, 2021 16:01
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