MLE: Use default answer date outside of block#570
Conversation
|
Thanks to @jkrasting for discovering and reporting this behavior. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev/gfdl #570 +/- ##
=========================================
Coverage 37.20% 37.20%
=========================================
Files 271 271
Lines 80475 80475
Branches 15008 15008
=========================================
Hits 29943 29943
Misses 44961 44961
Partials 5571 5571 ☔ View full report in Codecov by Sentry. |
92cd113 to
d8bef8b
Compare
|
I modified the PR to include Was it actually intended to be local to the block? If so, then I am not sure that is a good decision. But perhaps it was also just unintended. |
|
The |
Hallberg-NOAA
left a comment
There was a problem hiding this comment.
I agree that this change corrects an actual bug, arising from the way that the module-specific parameter namespace is handled.
Inside the `MLE%` ... `%MLE` parameter block, the default answer date was being read while inside the block. Since the namespaces inside blocks are not shared or inherited, this was creating a new parameter, `MLE%DEFAULT_ANSWER_DATE`, whose value differed from the global `DEFAULT_ANSWER_DATE`. This was causing unintuitive behavior of `MLE%ML_RESTRAT_ANSWER_DATE`, which ignored this global answer date. This patch reads `DEFAULT_ANSWER_DATE` outside of the block, so that `ML_RESTRAT_ANSWER_DATE` now defaults to the global value.
d8bef8b to
e75da93
Compare
|
This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/22478. |
Inside the
MLE%...%MLEparameter block, the default answer date was being read while inside the block. Since the namespaces inside blocks are not shared or inherited, this was creating a new parameter,MLE%DEFAULT_ANSWER_DATE, whose value differed from the globalDEFAULT_ANSWER_DATE. This was causing unintuitive behavior ofMLE%ML_RESTRAT_ANSWER_DATE, which ignored this global answer date.This patch reads
DEFAULT_ANSWER_DATEoutside of the block, so thatML_RESTRAT_ANSWER_DATEnow defaults to the global value.