Fix tasmax all-1e20 path in monthly formula workflow#459
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #459 +/- ##
=======================================
+ Coverage 76.7% 76.9% +0.2%
=======================================
Files 31 31
Lines 5927 5974 +47
Branches 1094 1107 +13
=======================================
+ Hits 4546 4594 +48
Misses 1131 1131
+ Partials 250 249 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves the handling of time coordinate alignment and missing value markers in the data processing pipeline, ensuring more robust and accurate calculations when working with temporal data and reductions. The main changes add logic to detect and handle shifted time labels, introduce masking for missing value sentinels during reductions, and expand test coverage for these scenarios.
Time coordinate alignment improvements:
select_and_process_variablesmethod inatmosphere.pyto detect when time labels have changed (even if the length is unchanged), ensuring that datasets are rebuilt rather than misaligned, which prevents data from being replaced with NaNs when time coordinates shift.test_formula_same_time_length_but_shifted_labels_rebuilds) to verify that shifted time labels trigger a proper dataset rebuild and maintain data integrity.Handling of missing value sentinels in reductions:
_mask_missing_values_for_reductionhelper incalc_utils.pyto mask out missing value markers (like1e20or NaN) before performing reductions, ensuring that these sentinels do not affect the results of monthly minimum and maximum calculations.calculate_monthly_minimumandcalculate_monthly_maximumfunctions to apply this masking step before reduction, preventing missing value markers from dominating reduction results [1] [2].test_ignores_fill_value_marker_in_maximum) to confirm that fill value markers are properly ignored in monthly maximum calculations.