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

+Document or eliminate undocumented interfaces #107

Merged

Conversation

Hallberg-NOAA
Copy link
Member

Address undocumented interfaces by adding explicit interfaces to replaces one
level of the pass-throughs or eliminated them. Specifically

  • Eliminated global_field_sum() from MOM_domains, as it is no longer used
    anywhere in the MOM6 code or drivers. At the config_src/infra level, the
    pass-through calls to mpp_global_sum are commented out in case there are
    other versions of the MOM6 code that still use global_field_sum.

  • Added explicit interfaces to horizontal_interp_init() and
    time_interp_extern_init() in the config_src/infra rather that leaving them
    as undocumented pass-throughs to the FMS code.

  • Added the explicit subroutine stdout_if_root() to MOM_io.F90 to replace an undocumented
    pass-through to the FMS stdout function.

  • Added comments describing the publicly visible encoding parameters ind_flux,
    ind_alpha, and ind_csurf that are a part of the coupler_types module.

  • Removed the unnecessary or commented-out public declarations for
    post_data_1d_k, vert_fill_TS, and legacy_diabatic.

All answers are bitwise identical, but there are some minor changes to the
names of subroutines offered at the config_src/infra level to permit the
documentation of these interfaces without running afoul of some bugs with
certain versions of the gnu compiler.

  Address undocumented interfaces by adding explicit interfaces to replaces one
level of the pass-throughs or eliminated them.  Specifically

  - Eliminated global_field_sum() from MOM_domains, as it is no longer used
    anywhere in the MOM6 code or drivers.  At the config_src/infra level, the
    pass-through calls to mpp_global_sum are commented out in case there are
    other versions of the MOM6 code that still use global_field_sum.

  - Added explicit interfaces to horizontal_interp_init() and
    time_interp_extern_init() in the config_src/infra rather that leaving them
    as undocumented pass-throughs to the FMS code.

  - Added the explicit subroutine stdout_if_root() to MOM_io.F90 to replace an undocumented
    pass-through to the FMS stdout function.

  - Added comments describing the publicly visible encoding parameters ind_flux,
    ind_alpha, and ind_csurf that are a part of the coupler_types module.

  - Removed the unnecessary or commented-out public declarations for
    post_data_1d_k, vert_fill_TS, and legacy_diabatic.

All answers are bitwise identical, but there are some minor changes to the
names of subroutines offered at the config_src/infra level to permit the
documentation of these interfaces without running afoul of some bugs with
certain versions of the gnu compiler.
@codecov
Copy link

codecov bot commented Apr 10, 2022

Codecov Report

Merging #107 (6951f61) into dev/gfdl (e9fdf5d) will increase coverage by 0.00%.
The diff coverage is 58.33%.

❗ Current head 6951f61 differs from pull request most recent head 759fba3. Consider uploading reports for the commit 759fba3 to get more accurate results

@@            Coverage Diff            @@
##           dev/gfdl     #107   +/-   ##
=========================================
  Coverage     28.75%   28.76%           
=========================================
  Files           248      248           
  Lines         72974    72984   +10     
=========================================
+ Hits          20985    20991    +6     
- Misses        51989    51993    +4     
Impacted Files Coverage Δ
config_src/infra/FMS1/MOM_domain_infra.F90 37.76% <ø> (ø)
src/framework/MOM_coupler_types.F90 3.22% <ø> (ø)
src/framework/MOM_diag_mediator.F90 54.40% <ø> (ø)
src/framework/MOM_domains.F90 50.84% <ø> (ø)
src/framework/MOM_interpolate.F90 15.62% <ø> (ø)
src/framework/MOM_io.F90 32.97% <0.00%> (-0.13%) ⬇️
...arameterizations/lateral/MOM_thickness_diffuse.F90 30.90% <ø> (ø)
...parameterizations/vertical/MOM_diabatic_driver.F90 38.80% <ø> (ø)
src/framework/MOM_horizontal_regridding.F90 35.11% <50.00%> (ø)
config_src/infra/FMS1/MOM_interp_infra.F90 49.09% <100.00%> (+6.23%) ⬆️

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 e9fdf5d...759fba3. Read the comment docs.

@Hallberg-NOAA Hallberg-NOAA added the documentation Improvements or additions to documentation label Apr 11, 2022
@marshallward
Copy link
Member

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

@marshallward marshallward merged commit 7a147ad into NOAA-GFDL:dev/gfdl Apr 12, 2022
@Hallberg-NOAA Hallberg-NOAA deleted the undocumented_interface_cleanup branch July 16, 2022 10:06
Hallberg-NOAA added a commit to Hallberg-NOAA/MOM6 that referenced this pull request Jul 18, 2022
  Made post_data_1d_k publicly visible once again, rather than requiring calls
to use post_data, to support backward compatibility with older versions of the
ocean_BGC code.  This interface was removed from public visibility as a part of
github.com/NOAA-GFDL/pull/107, but it caused problems with some of GFDL's
Earth System Models, as noted in NOAA-GFDL#168.
All answers are bitwise identical for any cases that compiled before.
marshallward pushed a commit that referenced this pull request Jul 18, 2022
  Made post_data_1d_k publicly visible once again, rather than requiring calls
to use post_data, to support backward compatibility with older versions of the
ocean_BGC code.  This interface was removed from public visibility as a part of
github.com//pull/107, but it caused problems with some of GFDL's
Earth System Models, as noted in #168.
All answers are bitwise identical for any cases that compiled before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Undocumented interfaces in MOM_interpolate.F90 and MOM_interp_infra.F90
2 participants