-
Notifications
You must be signed in to change notification settings - Fork 13
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
Restore original datetime metadata upon saving output #94
Comments
This is addressed in #97. But otherwise yes this would be good to implement and I doubt too difficult. Although since it's not urgent, maybe it's better to do as part of the Calc refactor, whenever we get to that portion of Calc. |
@spencerkclark is this in place yet or no? Please close if yes. |
@spencerkclark where do we currently stand on this? (I'm in the process of culling obsolete Issues as part of #206) |
@spencerahill it has not been resolved; it's something that would be nice to do, given our current workaround for dates pre-1678, but not necessarily super high priority. (It might be a low-hanging fruit though). |
Cool, thanks. |
Currently, if we encounter time dimensions referenced to a date prior to 1678-01-01, we automatically offset things internally such that the dates aospy sees all begin at 1900-01-01 (this is to account for restrictions in
pandas
). When we save computational results to netCDF files, however, we do not currently restore datetime metadata to match the way things were in the initial run (so output netCDF files look as though things started in 1900 as well). This may amount to simply saving the initial units attribute of the time variable when reading in the file, and resetting it to the initial value when we save data.In addressing this issue I think we should also consider changing the offset reference date to 1678-01-01 to allow the maximum available
pandas
/np.datetime64
compatible time range.The text was updated successfully, but these errors were encountered: