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

percentile_doy does not work on non-standard calendars #137

Closed
tlogan2000 opened this issue Dec 20, 2018 · 13 comments
Closed

percentile_doy does not work on non-standard calendars #137

tlogan2000 opened this issue Dec 20, 2018 · 13 comments
Assignees

Comments

@tlogan2000
Copy link
Collaborator

tlogan2000 commented Dec 20, 2018

CFTIME objects do not seem to support 'dayofyear' adn therefore our percetnile_doy does not work for some files ... there is already a fix in xarray (9 days ago)

see :pydata/xarray#2599

@Zeitsperre @huard Is there a way to pull these changes to Ouranos' xarray branch without losing Low's
resampling changes? I have a short-term need to calculate xclim percentile indices (i.e. instead of waiting for low's resampling work to be integrated directly into xarray)
If not is there a way to rewrite the percentile_doy function which will work for cftime?

@Zeitsperre
Copy link
Collaborator

@tlogan2000 If I understand correctly, you want to merge Low's branch into Ouranosinc/xarray/master as well as merge upstream master? Seeing as we've opened PRs of Ouanosinc/master against upstream master (in both directions) we'll need to open a new branch and try to merge both of them there.

It could get hairy but it's doable. Do you need this ASAP?

@Zeitsperre
Copy link
Collaborator

Actually, I just looked things over and the Ouranosinc/master was merged 2 days ago by Low. The fix should be there along with Low's changes which are already in our master. Can you verify this behaviour when building against the Ouranosinc/master xarray?

@tlogan2000
Copy link
Collaborator Author

No I think low's branch is already merged to the Ouranos master. I was thinking of pulling the changes in official Xarray pull request (concerning only the add of 'dayofyear' changes ) without accepting changes to all the other updates that have occurred in official xarray

@sbiner
Copy link
Contributor

sbiner commented Dec 20, 2018 via email

@tlogan2000
Copy link
Collaborator Author

If it is super complicated maybe not worth it ... Low is pretty active on submitting directly to xarray.

@Zeitsperre
Copy link
Collaborator

I'm just confused because by alla ccounts, the fix should be in our master as they were all merged 2 days ago. Does his branch break other functionalities than the percentile_doyfunctions?

@tlogan2000
Copy link
Collaborator Author

We have Low's updates, but our master is behind the official xarray right? The dayofyear stuff was not added by Low but by the maintainers so I think that our version is missing these adds... In the pull request link it seems as only a few files were changed to add CFTIME dayofyear fucntinality so was thinking it could (maybe) be possible to incorporate those changes wihtout having the major hairiness you mentioned but am not sure...

@Balinus
Copy link
Contributor

Balinus commented Dec 20, 2018

I think you can just rebase, if I understand correctly

@Zeitsperre
Copy link
Collaborator

Just did a quick and dirty merge of upstream to our master. Check out https://github.com/Ouranosinc/xarray/tree/upstream_dec and let me know if this is what you need.

@huard
Copy link
Collaborator

huard commented Jan 22, 2019

Status ?

@Zeitsperre
Copy link
Collaborator

Ouranosinc master is up to date with Low's most recent changes and the xclim dependencies target that specific build. When installing xclim into a fresh environment, ensure that the conda install readout is using the git-installed version.

In terms of whether the percentile_doy function is working, @tlogan2000 @sbiner ?

@tlogan2000
Copy link
Collaborator Author

I think this is taken care of now with the merge of lows resample with xarray master and the doy PR. Can close? @sbiner @huard

@sbiner
Copy link
Contributor

sbiner commented Feb 18, 2019

Je pense mais je n'ai pas vécu le problème initial ...

@huard huard closed this as completed Feb 19, 2019
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

5 participants