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 CPP macro _USE_OCEAN_BGC_PR20 to avoid bug #279

Conversation

Hallberg-NOAA
Copy link
Member

Added the new CPP macro _USE_OCEAN_BGC_PR20 to deal with the fact that the recently added element runoff_added_to_stf does not yet exist within the ocean_BGC version of the g_tracer_type, although it was added to the version in confic_src/external/GFDL_ocean_BGC/generic_tracer_utils.F90 as a part of PR#246. This caused the latest version of MOM6 to be unable to compile with the ocean_BGC code. With this new CPP macro, the code will once again compile, and these bits of code can be enabled once the ocean_BGC code has this new element in its version of the g_tracer_type. Once there is sufficiently widespread adoption of newer versions of the ocean_BGC code, these newly added macros can be eliminated altogether. This commit should address the issued documented under github.com//issues/278. Note that the use of CPP macros in this way is generally strongly discouraged in MOM6, but it does seem like a viable solution for addressing an interface change across two separately managed code repositories.

  Added the new CPP macro _USE_OCEAN_BGC_PR20 to deal with the fact that the
recently added element runoff_added_to_stf does not yet exist within the
ocean_BGC version of the g_tracer_type, although it was added to the version in
confic_src/external/GFDL_ocean_BGC/generic_tracer_utils.F90 as a part of
PR#246.  This caused the latest version of MOM6 to be unable to compile with the
ocean_BGC code.  With this new CPP macro, the code will once again compile, and
these bits of code can be enabled once the ocean_BGC code has this new element
in its version of the g_tracer_type.  Once there is sufficiently widespread
adoption of newer versions of the ocean_BGC code, these newly added macros can
be eliminated altogether.  This commit should address the issued documented
under github.com/NOAA-GFDL/issues/278.  Note that the use of CPP macros in
this way is generally strongly discouraged in MOM6, but it does seem like a
viable solution for addressing an interface change across two separately managed
code repositories.
@codecov
Copy link

codecov bot commented Dec 16, 2022

Codecov Report

Merging #279 (0984207) into dev/gfdl (5ef380c) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff            @@
##           dev/gfdl     #279   +/-   ##
=========================================
  Coverage     37.13%   37.13%           
=========================================
  Files           263      263           
  Lines         73444    73443    -1     
  Branches      13674    13674           
=========================================
+ Hits          27272    27274    +2     
+ Misses        41147    41145    -2     
+ Partials       5025     5024    -1     
Impacted Files Coverage Δ
src/tracer/MOM_generic_tracer.F90 0.00% <0.00%> (ø)
src/framework/MOM_document.F90 74.77% <0.00%> (+0.44%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Hallberg-NOAA Hallberg-NOAA added bug Something isn't working invalid This doesn't seem right labels Dec 18, 2022
@adcroft
Copy link
Member

adcroft commented Dec 20, 2022

I'm not comfortable adding a CPP macro to solve this. We know it will cause trouble to remove if it ever gets in the code. And to use it you have to change your build scripts, which is no less disruptive than commenting out the offending line of code. Alternatively, we could comment out the line of code now and line up another PR to uncomment it once the BGC code is updated.

@Hallberg-NOAA
Copy link
Member Author

I agree with the arguments that these CPP macros are not the right solution for the long-term, and I am withdrawing this PR.

@Hallberg-NOAA Hallberg-NOAA deleted the runoff_added_to_stf_fix branch February 2, 2023 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants