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

Rounding error in julian_day2date #77

Closed
adamcpovey opened this issue Mar 10, 2017 · 2 comments
Closed

Rounding error in julian_day2date #77

adamcpovey opened this issue Mar 10, 2017 · 2 comments

Comments

@adamcpovey
Copy link

adamcpovey commented Mar 10, 2017

Giving a minimal example,

from cf_units import julian_day2date
julian_day2date(2450022.5, "standard")

gives output,

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/povey/bin/anaconda3/lib/python3.5/site-packages/cf_units/__init__.py", line 593, in julian_day2date
    return netcdftime.DateFromJulianDay(julian_day, calendar)
  File "/home/povey/bin/anaconda3/lib/python3.5/site-packages/netcdftime/netcdftime.py", line 371, in DateFromJulianDay
    minute[0], second[0], microsecond[0])
ValueError: day is out of range for month

I'm using cf_units 1.1.3 for python 3.5 through conda-forge.

@pelson
Copy link
Member

pelson commented May 22, 2018

Raised upstream in Unidata/cftime#49.

@bjlittle
Copy link
Member

Closing this issue as it has been resolved through Unidata/cftime#49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants