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

year 0 exists #38

Open
doutriaux1 opened this issue Mar 13, 2019 · 6 comments
Open

year 0 exists #38

doutriaux1 opened this issue Mar 13, 2019 · 6 comments
Labels

Comments

@doutriaux1
Copy link
Contributor

python -c "import cdtime ; print(cdtime.reltime(-1,'days since 1').tocomp())"

0-12-31 0:0:0.0

BUT

python -c "import cdtime ; print(cdtime.reltime(-1,'days since 0')"

Traceback (most recent call last):
File "", line 1, in
File "/1Tb/miniconda3/envs/jupyter-vcdat/lib/python3.6/site-packages/cdtime/compreltime.py", line 254, in reltime
return _cdtime.reltime(value, units)
ValueError: Invalid relative time units

@durack1
Copy link
Member

durack1 commented Mar 13, 2019

@doutriaux1 thanks for raising this, I believe I have hit the same problem before..

@github-actions
Copy link

Marking issue as stale, since there has been no activity in 30 days.

Unless the issue is updated or the 'stale' tag is removed, this issue will be closed in 7 days.

@github-actions github-actions bot added the stale label Aug 21, 2020
@durack1
Copy link
Member

durack1 commented Aug 21, 2020

@jasonb5 this is similar in some ways to #46, and I know that @pochedls has suggested a work around for the issue (so rather than a traceback as above, it works) in CDAT/cdms#334

@github-actions github-actions bot removed the stale label Aug 21, 2020
@jasonb5
Copy link
Contributor

jasonb5 commented Aug 28, 2020

I need to look at the code to get an idea of what changes are required.

I see two viable options going forward:

  1. Modify libcdms to support year 0 and display a warning message.
  2. Add a flag to cdtime conversion methods to handle this case.

@github-actions
Copy link

Marking issue as stale, since there has been no activity in 30 days.

Unless the issue is updated or the 'stale' tag is removed, this issue will be closed in 7 days.

@github-actions
Copy link

Marking issue as stale, since there has been no activity in 30 days.

Unless the issue is updated or the 'stale' tag is removed, this issue will be closed in 7 days.

@github-actions github-actions bot added the stale label Oct 28, 2020
@github-actions github-actions bot closed this as completed Nov 4, 2020
@jasonb5 jasonb5 reopened this Nov 5, 2020
@jasonb5 jasonb5 removed the stale label Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants