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

Calculate R95P for the specified threshold #1570

Closed
1 task done
CGL5230 opened this issue Dec 24, 2023 · 2 comments
Closed
1 task done

Calculate R95P for the specified threshold #1570

CGL5230 opened this issue Dec 24, 2023 · 2 comments
Labels
support Questions and help for users/developers

Comments

@CGL5230
Copy link

CGL5230 commented Dec 24, 2023

Setup Information

  • Xclim version:0.47
  • Python version:3.11
  • Operating System:Linux

Context

Hi,all!

I downloaded the daily average precipitation dataset from 2015-2100Cmip6. the R95P in Xclim is to calculate the 95% quantile for a given time period (if I understand correctly).

I want to know if the R95P for 2085-2100 has increased compared to the R95P for 2015-2030. This means to set the 95% quantile for 2015-2030 to a fixed threshold,to calculate the R95P for the period 2015-2030, 2085-2100. Because the threshold for heavy rain may be easier at 30mm, but reaching 60mm is difficult.

Now, I calculate R95P is like below:

TaiESM1_ssp126_p95 = xclim.core.calendar.percentile_doy(pr_TaiESM1_ssp126.pr,per=95,window=5)
TaiESM1_ssp126_R95P = xclim.indicators.icclim.R95p(pr='pr',pr_per=TaiESM1_ssp126_p95,freq='YS',ds=pr_TaiESM1_ssp126)

I think this is equivalent to calculating the 95% quartile over the course of a year.This means that the values of the 95% quantile will be inconsistent in both 2015-2030 and 2085-2100.
Can I calculate it like this? In order to achieve my goal above.Maybe there is an easier way?

TaiESM1_ssp126_2015-2030_P95 = xclim.core.calendar.percentile_doy(pr_TaiESM1_ssp126_2015-2030.pr,per=95,window=5)
TaiESM1_ssp126__2015-2030_R95P =xclim.indicators.icclim.R95p(pr='pr',pr_per=TaiESM1_ssp126_2015-2030_p95,freq='YS',ds=pr_TaiESM1_ssp126_2015-2030)
TaiESM1_ssp126__2085-2100_R95P =xclim.indicators.icclim.R95p(pr='pr',pr_per=TaiESM1_ssp126_2015-2030_p95,freq='YS',ds=pr_TaiESM1_ssp126_2085-2100)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@CGL5230 CGL5230 added the support Questions and help for users/developers label Dec 24, 2023
@coxipi
Copy link
Contributor

coxipi commented Jan 9, 2024

Hi!

I think that stating "R95P for 2085-2100 has increased compared to the R95P for 2015-2030" is an ambiguous precisely because they are defined with reference to a p95. I think both of your suggestions can give some information on this, it just gives different measures.

  1. Your first suggestion, you have
`p95_2015-2030, pr_2015-2030` -> `r95p_2015-2030`
`p95_2085-2100, pr_2085-2100` -> `r95p_2085-2100`

In both cases r95p_2015-2030 and r95p_2085-2100, values should over around 5% * 365 days ~ 18.25. But, by comparing both periods, you would see perhaps more variability in one period or the other, i.e. from year to year, are there bigger gaps with respect to the 95th quantile in each respective period.

  1. You second suggestion, you fix p95_2015-2030
`p95_2015-2030, pr_2015-2030` -> `r95p_2015-2030`
`p95_2015-2030, pr_2085-2100` -> `r95p_2085-2100`

Then, you can compute the difference r95p_2085-2100 - r95p_2015-2030. If for example it is skewed towards positive values, then, you find out that larger precipitations are more frequent in the future. This is probably what you want?

Note this is not necessarily super informative. An increase in the mean precipitation will produce this skewing towards positive values, but that could be checked without using r95p. However, a more complicated change in the distribution of precipitations can also affect this, e.g. in the future, you have more extreme values (a lot of dry days and a lot of very wet days with the mean precipitation not changed that much), so that could be interesting.

I'm not too familiar with this kind of computation, so I'm not sure what possibility you're interested in: case 1?, case2? unexplored case3? Do you have an article in mind that does this kind of comparison you could share? It seems case2 is the most straightforward as it can sometimes give a notion of how the distribution of extreme values evolves.

As for the actual implementation, I think what you do it OK and simple, I see no problem there.

@CGL5230
Copy link
Author

CGL5230 commented Jan 9, 2024

Yes! I try to use case2 to explore the change of R95p for SSP paths. I see the improtance to keep an unchange reference date that let the R95p right.

@CGL5230 CGL5230 closed this as completed Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Questions and help for users/developers
Projects
None yet
Development

No branches or pull requests

2 participants