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
Hi,all
I got a error when I try to use the xclim.core.calendar.percentile_doy to calculate the R95P.
Here is the information for the dataset. It's daily precipitation of the CMIP6.
I used the following command to calculate the R95P, but the frist line got error as I mentioned. ssp126_p95 = xclim.core.calendar.percentile_doy(pr_AWI_CM_ssp126,per=95) AWI_CM_ssp126_R95P = xclim.indicators.icclim.R95p(pr='pr',pr_per=ssp126_p95,freq='YS',ds=pr_AWI_CM_ssp126)
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Indeed, the initial issue might simply be that you are passing the dataset instead of the variable directly. Usually in xclim functions, when a variable is expected, the DataArray should be passed. I suggest you do the same for the second line, simply for clarity.
As for the performance, the percentile_doy process is indeed a bit heavy and your dataset is large. I see you are not using dask to parallelize the compuation, that's the first step I would recommend to accelerate the process. The data preparation happens at the xarray-level, but xclim is meant to be fully compatible with dask array. Xarray has a page to explain how it works : https://docs.xarray.dev/en/stable/user-guide/dask.html
Generic Issue
Hi,all
I got a error when I try to use the
xclim.core.calendar.percentile_doy
to calculate the R95P.Here is the information for the dataset. It's daily precipitation of the CMIP6.
I used the following command to calculate the R95P, but the frist line got error as I mentioned.
ssp126_p95 = xclim.core.calendar.percentile_doy(pr_AWI_CM_ssp126,per=95)
AWI_CM_ssp126_R95P = xclim.indicators.icclim.R95p(pr='pr',pr_per=ssp126_p95,freq='YS',ds=pr_AWI_CM_ssp126)
Code of Conduct
The text was updated successfully, but these errors were encountered: