-
Notifications
You must be signed in to change notification settings - Fork 107
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
manually remove 'z' from datetime string #294
Conversation
Does it need to merge this PR, with the other one ( #281 )? |
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.
Really think we need a unit test for the Read module, do you have time to add one in?
Yes - it turns out this was a standalone issue occurring for other datasets too (due to a deprecation in the most recent versions of numpy, v 1.22), so we gave it its own PR. Once we merge this into development, we can update #281 and fingers crossed that PR will be good to go too. |
Agreed. I won't have time until after the hackweek. : ) |
Codecov Report
@@ Coverage Diff @@
## development #294 +/- ##
===============================================
- Coverage 55.56% 55.47% -0.09%
===============================================
Files 31 31
Lines 2014 2017 +3
Branches 412 413 +1
===============================================
Hits 1119 1119
- Misses 825 828 +3
Partials 70 70
Continue to review full report at Codecov.
|
Co-authored-by: Wei Ji <[email protected]>
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.
Cool, thanks Jessica! I've tested locally on ATL06 and the data loads fine into xarray. Also tried on ATL08 and there's still the IndexError, but at least it doesn't crash. Not sure about the other ICESat-2 products 🙂
Per the segfault issue noted in #281, Xarray/pandas/numpy no longer automatically handle datetimes brought in with a timezone ('Z' at the end of the datetime string). This provides a fix by checking and manually removing the last character of the datetime string if it's a Z.