You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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,
The text was updated successfully, but these errors were encountered:
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
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,
The text was updated successfully, but these errors were encountered: