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

SPEI : can't figure it out #1602

Closed
1 task done
aulemahal opened this issue Jan 17, 2024 Discussed in #1589 · 2 comments
Closed
1 task done

SPEI : can't figure it out #1602

aulemahal opened this issue Jan 17, 2024 Discussed in #1589 · 2 comments
Assignees
Labels
bug Something isn't working support Questions and help for users/developers
Milestone

Comments

@aulemahal
Copy link
Collaborator

Discussed in #1589

See comment : #1589 (comment) for a description of the bug.

Issue comes from this line :

da = da.rename(day="time").reindex(time=da_ref.time.dt.dayofyear)

Having freq='D' (or freq=None with a daily dataset) results in the step previous to the above line grouping the data with time.dayofyear. Thus at the line above, the "temporal" dimension is named dayofyear and not day, which is why this fails.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@aulemahal aulemahal added bug Something isn't working support Questions and help for users/developers labels Jan 17, 2024
@aulemahal aulemahal added this to the v0.48.0 milestone Jan 17, 2024
@coxipi
Copy link
Contributor

coxipi commented Jan 17, 2024

I thought I had a test for daily-SPI, apparently not.

I've made the changes, and wanted to add tests to compare with monocongo, but the results don't match. It's a bit hard to find a 3rd party for a tie-breaker between xclim and monocongo since the daily SPI is not that common. I wanted to try with this one: https://github.com/e-baumer/standard_precip, but it only partially obtain the correct values I've established for monthly SPI where monocongo and xclim do match.

@aulemahal
Copy link
Collaborator Author

I think #1607 fixed that issue? Can you confirm @coxipi ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working support Questions and help for users/developers
Projects
None yet
Development

No branches or pull requests

2 participants