-
Notifications
You must be signed in to change notification settings - Fork 300
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
CF Writer Improvements #976
CF Writer Improvements #976
Conversation
time_bnds = [(np.datetime64(start_time) - dtnp64), | ||
(np.datetime64(end_time) - dtnp64)] | ||
data = xr.DataArray(np.array(time_bnds)[None, :] / np.timedelta64(1, 's'), | ||
data = xr.DataArray([[np.datetime64(start_time), np.datetime64(end_time)]], |
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.
I"m not entirely sure, why the current method uses the timestamp. But I guess it"s just for encoding reasons (bounds relative to timestamp). By changing the bounds" datatype to datetime64
xarray will handle the encoding.
20adf55
to
b02bbdb
Compare
Codecov Report
@@ Coverage Diff @@
## master #976 +/- ##
==========================================
+ Coverage 86.86% 86.87% +0.01%
==========================================
Files 181 181
Lines 27461 27491 +30
==========================================
+ Hits 23853 23883 +30
Misses 3608 3608
Continue to review full report at Codecov.
|
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.
LGTM, thanks for simplifying the time bounds handling!
flake8 satpy