Project

General

Profile

input data for eca percentile based indices

Added by Barbara Tencer about 11 years ago

Hi,

I'm trying to use eca_r75p to calculate annual precipitation extremes, but I'm not sure how the input files should look like. According to eca_r75p help:

"eca_r75p ifile1 ifile2 ofile
Let ifile1 be a time series RR of the daily precipitation amount at wet days (precipitation >= 1 mm) and ifile2 be the 75th percentile RRn75 of the daily precipitation amount at wet days for any period used as reference. Then the percentage of wet days with RR > RRn75 is calculated. RRn75 is calculated as the 75th percentile of all wet days of a given climate reference period. Usually ifile2 is generated by the operator ydaypctl,75. The date information of a timestep in ofile is the date of the last contributing timestep in ifile1."

I have time series of daily precipitation for a long period, which of course includes both wet and dry days. How can I create the ifile1 to have only wet days in my series? I guess this same file (after selecting the reference period) should be used as input for ydaypctl (I'm actually using ydrunpctl ), so that percentiles are calculated only on wet days.

I've tried changing all values less than 1mm in the original file to missing values (with setrtomiss). I applied ydaypctl to this new file and obtained my percentiles. Then I used these two files as ifile1 and ifile2 for the eca_r75p function, but I got lots of 1e20 values in the ofile that coincide with grid points that have lots of "missing data". Here is exactly what I did:

cdo setrtomiss,0,0.9999 pr_1850-2005.nc pr_1850-2005_wetdays.nc
cdo seldate,1960-12-18,1991-1-14 pr_1850-2005_wetdays.nc pr_1961-1990_wetdays.nc
cdo ydrunmin,29 pr_1961-1990_wetdays.nc minfile.nc
cdo ydrunmax,29 pr_1961-1990_wetdays.nc maxfile.nc
cdo ydrunpctl,75,29 pr_1961-1990_wetdays.nc minfile.nc maxfile.nc pr_p75.nc
cdo selyear,1850 pr_1850-2005_wetdays.nc pr_1850.nc
cdo eca_r75p pr_1850.nc r75p_1850.nc

Output file r75p_1850.nc has lots of 1e20 values.

So, is this the correct way of creating the ifile1 for the eca_r75p or any other precipitation index based on percentiles as thresholds?

Thanks for your help,
Bárbara