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

fix for 'day out of range error' (issue #49) #65

Merged
merged 5 commits into from
Aug 17, 2018
Merged

fix for 'day out of range error' (issue #49) #65

merged 5 commits into from
Aug 17, 2018

Conversation

jswhit
Copy link
Collaborator

@jswhit jswhit commented Aug 16, 2018

Fix was to restore the fix added in Unidata/netcdf4-python#75, which was removed at some point because we thought it was no longer needed. Apparently it is.

Also removed import of python math module, used numpy instead.

@jswhit
Copy link
Collaborator Author

jswhit commented Aug 16, 2018

Turns out the error is associated with numpy's 'even rounding' which causes 0.5 to be rounded to 0.0. Using 'round half up' fixes this without having to add a small offset to the julian day.

@jswhit jswhit mentioned this pull request Aug 16, 2018
@jswhit jswhit requested a review from jhamman August 16, 2018 21:00
@jswhit jswhit merged commit 031c92c into master Aug 17, 2018
@jswhit jswhit deleted the issue49 branch August 21, 2018 13:39
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

Successfully merging this pull request may close these issues.

None yet

1 participant