-
Notifications
You must be signed in to change notification settings - Fork 0
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
Handle more second subdivisions #18
Comments
So far, the smallest time units is milliseconds as internally that is the precision of the time stamp. We follow the approach of the I am wondering if in your use-case, sub-millisecond precision is important? As far as I can see, we could:
|
Hi, Thanks for your thoughts.
At least for my use case it is not important, but it may be important for others. Netcdf files are produced that way by at least one package and maybe other tools. It would just be nice to be able to read them into Julia without too much fiddling.
Fine for me, and probably the easiest way until someone complains about missing time resolution. 🤷
I guess that may be where it comes from, quite often the times in numpy are listed as
Python's
That would mean:
|
Hi there, Anyway, regardless of the internal representation, it would be nice if
The prefixes can be found in https://docs.unidata.ucar.edu/udunits/current/udunits2-prefixes.xml. The easiest way would be to round to the nearest millisecond then. |
Here are some experiments that I did a while ago: The idea is to just wrap the time as-is in a struct and use units and time origin as type parameters. Time units and origin would be flexible and we can use the type specialization of the julia compiler. |
Describe the bug
Some netcdf files produced by python's
xarray
have time unitsnanoseconds since <datetime>
.Those are not yet handled by NCDataset via CFTime (Alexander-Barth/NCDatasets.jl#192).
Supporting additional second subdivisions in
timedecode()
would be appreciated, such asmicrosecond
andnanosecond
. This would also be consistent with python's handling, see Alexander-Barth/NCDatasets.jl#181 (comment).To Reproduce
Expected behavior
Same result as with
seconds
:Environment
The text was updated successfully, but these errors were encountered: