Bug fix for the mean_climate and varibility_mode drivers #1132
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.
Hi Jiwoo,
I submit this pull request to propose some solutions for the recent bug found in my run cases:
the first small bug fix is related to the issue as I mentioned in [Bug]: wrong unit conversion in mean climate diagnostics #1128, i.e. the unit conversion for pressure level data and its related calculation in mean climate driver
the second small bug fix is to address the issue I mentioned in your e-mail, i.e. the analysis for the model simulations that started from year 0 such as piControl simulations. From my tests, the piControl simulation can be processed without issues by fixing the following two places:
add an explicit conversion of year to 4-digts in pcmdi_metrics/variability_mode/lib/lib_variability_mode.py, which is included in this pull request for the PCMDI package.
meanwhile, adjustments in the external library, i.e. XCDAT are also needed, you can see the bug report I submitted at [Bug]: Potential bug in temporal.py module xCDAT/xcdat#695
Please take a look and see if they provide useful hints for you to develop a better solution in the PCMDI package.