Project

General

Profile

The daily precipitation above 95th percentile!

Added by Harun Aslan 8 months ago

Hi all!

I have 30 years (1993-2022) ERA-5 Land daily total precipitation (tp) dataset for only Februarys. I have to calculate which days are above the 95th percentile and below it. I mean, if the tp is above the 95th percentile writes 1, and if below it then writes 0. Therefore, I can see which days have extreme precipitation. I attached daily tp for 2022 also.

I new at CDO so probably this question may be easy. I looked at the CDO User Guides and interested asked question in this platform before. But ı couldn't handle this problem. I'll appreciate for all, suggests and helps. Thank you!**


Replies (4)

RE: The daily precipitation above 95th percentile! - Added by Karin Meier-Fleischer 7 months ago

Hi Harun,

e.g.

cdo -timpctl,95 infile.nc -timmin infile.nc -timmax infile.nc pctl_95.nc

cdo -setmisstoc,0 -expr,'tp_95mask = (tp != missval(tp)) ? 1 : 0' pctl_95.nc outfile.nc

RE: The daily precipitation above 95th percentile! - Added by Harun Aslan 7 months ago

Hi Karin,

Thank you for your response. I already used this command to calculate field.nc

"cdo -timpctl,95 infile.nc -timmin infile.nc -timmax infile.nc pctl_95.nc" and then I used following command to calculate which days are above (1) or below (0) 95th percentile.

"cdo -gtc,0 -sub infile.nc pctl_95.nc outfile.nc".

I also used the following command to get the differences (mm) between daily precipitation and 95th percentile.

"cdo sub infile.nc pctl_95.nc outfile.nc"

Are these codes also right to see which days and how much (mm) these days have extreme precipitation? If these commands are'nt correct, why? Based on your response, I will have an informed opinion on whether I need to edit my data or not. Thank you very much in advance.

RE: The daily precipitation above 95th percentile! - Added by Karin Meier-Fleischer 7 months ago

You can loop over each month and extract the maximum value which then can be used to extract the date of it. Recently there was a similar question but I'm not able to find it and where I stored my answer. 🤦‍♀️

    (1-4/4)