Repository navigation
Conversation
This branch has not been deployed
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.
Problem
ISMIP7 ocean and atmosphere forcing processing fails for 2015-2300
experiments (ssp126, ssp585, ctrl) with:
With default decoding, xarray uses datetime64[ns] for dates up to about
2262 and cftime objects beyond that. When the raw files for one
experiment straddle 2262, open_mfdataset mixes both types, so
ds.time.dt.yearanddate.dt.yearbreak. Experiments ending in 2100(e.g. ssp370) are not affected.
Fix
Pass
use_cftime=Truetoxr.open_mfdatasetin:process_temperature.py, process_temperature_gradient.py,
process_runoff.py
Testing
Ran ocean thermal forcing for an MRI-ESM2-0 ssp126 case (2015-2300) and
an ssp370 case (2015-2100). Compared the output files: same variables,
dtypes and dimension order,
xtimeis the same text format, and the2300 case's xtime runs from 2015-01-01 to 2300-01-01 with no Time
coordinate, as in the 2100 case.
It is unclear if the Atmosphere test case also needs the same fix. However, since it doesn't hurt, the fix has been incorporated in the test cases, and processing the 285-run projection files C005-C010 all succeeded.