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

Maximum consecutive dry days (CDD): cannot index run length with the last element in the run. #321

Open
mer1993 opened this issue Aug 23, 2024 · 0 comments

Comments

@mer1993
Copy link

mer1993 commented Aug 23, 2024

Description

Hello,

I'm calculating CDD with icclim, and I was looking at the "max_consecutive_occurrence" function in "icclim/src/icclim/_core/generic/functions.py". As far as I understand, icclim uses xclim's "rle" function to calculate the run length, which defaults to the parameter index="first". With this argument, the largest value of the cumulative sum is indexed at the first element in the run (at the beginning of the dry period). However, I would like to use "last" instead, so that the largest value of CDD is reported at the end of the dry spell (the last element in the run), similar to what is done in other packages like Climdex.

However, I can't find a way to pass index="last" as an option in icclim, and it seems that kwargs are ignored in "max_consecutive_occurrence".

Could you please provide guidance on this?

Best regards,

@mer1993 mer1993 changed the title Maximum consecutive dry days (CDD): connot index run length with the last element in the run. Maximum consecutive dry days (CDD): cannot index run length with the last element in the run. Aug 23, 2024
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

1 participant