Skip to content
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

Full support for UDUNIT years units #5

Closed
kmpaul opened this issue Nov 30, 2016 · 7 comments
Closed

Full support for UDUNIT years units #5

kmpaul opened this issue Nov 30, 2016 · 7 comments

Comments

@kmpaul
Copy link

kmpaul commented Nov 30, 2016

@jhamman Hope all is well with you since the AOSPy Workshop! I'm putting an issue in here to address some missing capabilities that are CF compliant, but not fully supported by the netcdftime module.

This issue can be immediately seen by trying to initialize a utime instance with the 'common_year' or 'year' units (which are UDUNITS supported):

utime('common_years since 1-1-1 0:0:0, calendar='noleap')

which immediately errors with the error:

ValueError: units must be one of 'seconds', 'minutes', 'hours' or 'days' (or singular version of these), got 'years'

My understanding is that this should work, since 'common_year' is a fixed multiple of 'day' (i.e., 365 days, regardless of calendar). However, netcdftime does not support any year-like units.

I'm interested in implementing this ASAP, so I might fork the repo and put in a PR soon-ish.

@jhamman
Copy link
Collaborator

jhamman commented Dec 1, 2016

@kmpaul, I don't have any objection to that change but I'll let others (@jswhit) weigh in as well.

As far as where netcdftime is at in terms of being ready for other contributions, it should be ready. The travis tests are passing although there are still a few issues to work through before we can swap the module out for the one in netCDF4.

@jswhit
Copy link
Collaborator

jswhit commented Dec 29, 2016

Sounds like common_years since 1-1-1 0:0:0, calendar='noleap' should be the same as years since 1-1-1 0:0:0, calendar='365_day' or years since 1-1-1 0:0:0, calendar='noleap'. Sounds reasonable to make common_years since a synonym for either of those two. An error should be raised if an inconsistent calendar is specified though.

@kmpaul
Copy link
Author

kmpaul commented Dec 29, 2016 via email

@jswhit
Copy link
Collaborator

jswhit commented Aug 18, 2018

@kmpaul - is a pull request coming for this?

@kmpaul
Copy link
Author

kmpaul commented Aug 18, 2018

Time and schedule as they are, I can’t do this. Sorry.

@jswhit
Copy link
Collaborator

jswhit commented Aug 18, 2018

OK, I'll leave this open in case someone wants to tackle it.

@jswhit
Copy link
Collaborator

jswhit commented Jun 1, 2021

Closed by PR #246

@jswhit jswhit closed this as completed Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants