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

Fixing issue #539 #540

Closed
wants to merge 2 commits into from
Closed

Fixing issue #539 #540

wants to merge 2 commits into from

Conversation

kshedstrom
Copy link

There are two places in the code where USE_BODNER23 is checked. They have to be consistent. This fixes the inconsistency I had mentioned in #539 , but does introduce an extra

MLE%
%MLE

into the output doc files.

@marshallward
Copy link
Member

I don't think this patch is quite doing what we want. From my reading, it's implicitly creating MLE%MLE%USE_BODNER23, which is equivalent to

MLE%
MLE%USE_BODNER23
%MLE

I think the only real fix here is to get the parser to properly read the contents of MLE% ... %MLE.

Copy link

codecov bot commented Jan 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a03bb95) 37.20% compared to head (b272fc1) 37.20%.

Additional details and impacted files
@@            Coverage Diff            @@
##           dev/gfdl     #540   +/-   ##
=========================================
  Coverage     37.20%   37.20%           
=========================================
  Files           271      271           
  Lines         80355    80357    +2     
  Branches      14985    14985           
=========================================
+ Hits          29894    29897    +3     
  Misses        44903    44903           
+ Partials       5558     5557    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kshedstrom
Copy link
Author

No, this properly parses

MLE%
USE_BODNER23
%MLE

@marshallward
Copy link
Member

marshallward commented Jan 10, 2024

Ah sorry.... I think I confused myself. Maybe that's why cs%use_bodner was never set.

@adcroft Does this look ok?

(Ed: I see why I was confused now: I thought you had wrapped MLE%USE_BODNER23 in the MLE block; missed that you had removed MLE% from the parameter name.)

@marshallward
Copy link
Member

I've checked this in tc2.a and both forms work and give the same answer with this patch.

@marshallward
Copy link
Member

I spoke with @adcroft and he agreed that this is the preferred method of accessing parameter block contents.

There was a thought that get_param(..., "MLE%USE_BODNER23", ...) still ought to work, despite some potential ambiguity of the "top" parameter block (e.g. what if we were inside KPP%?). But it's clearly broken as-is and also not the preferred method, so we will just leave it for another time.

Our test machine Gaea is being turned upside down today, but I'll try to get this tested and merged ASAP.

@marshallward
Copy link
Member

We think there still may be a minor issue with the new open/closeParameterBlock function calls. This new solution appears to be printing an empty MLE%/%MLE block in the MOM_parameter_doc.all files.

At the least, we might need to add support for do_not_log= to openParameterBlock. We might also want to consider further restructuring of the parameter blocks.

@marshallward
Copy link
Member

#558 should eliminate the redundant MLE% %MLE block records.

@marshallward
Copy link
Member

I've run a modified version of this PR which appears to fix the problem and does not produce a redundant MLE%/ %MLE. It is now passing our tests with no parameter regression.

I will merge this directly to MOM6 and close this issue once it's been finalized.


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

@marshallward
Copy link
Member

Matching commit: 5ca70ba

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