-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add a custom date2num
function to deal with changes in cftime
#1373
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1373 +/- ##
==========================================
+ Coverage 88.37% 88.39% +0.01%
==========================================
Files 195 195
Lines 9943 9958 +15
==========================================
+ Hits 8787 8802 +15
Misses 1156 1156
Continue to review full report at Codecov.
|
cheers @zklaus - |
@valeriupredoi, it's not a bad idea per se, but since this is a hotfix and num2date doesn't suffer from the problem, let's defer that. Feel free to open an issue about it. |
date2num
function to deal with changes in cftime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
happy to see cftime
go at least just for date2num
- we still have two instances of importing and using the module in cmor/_fixes/cmip6/fgoals_f3_l.py and cmor/_fixes/cmip5/gfdl_cm2p1.py and one test in tests/unit/preprocessor/_multimodel/test_multimodel.py - I think we can make sure those get replaced too (maybe, not sure about cftime.DatetimeJulian or cftime.DatetimeNoLeap), but anyway that'd be done in a separate PR. Klaus, could you add a docstring to the new helper function (bit of say why we use that), all good by me other than that 🍺
@zklaus yer, will do, given how shifty-mcshiftface |
I'll just add a test and then we're good to go. |
yeah could do, but that's tested via iris so maybe even no need |
Description
Closes #1372
Before you get started
Checklist
It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.
To help with the number pull requests: