Project

General

Profile

calculate the 90th percentile

Added by Alioune MBAYE almost 7 years ago

Please, I have a netcdf file whose years vary from 1950 to 2005 and I wanted to calculate the 90th percentile for each year. Help me please


Replies (3)

RE: calculate the 90th percentile - Added by Karin Meier-Fleischer almost 7 years ago

Hi Alioune,

you can do

cdo yearpctl,90 infile -yearmin infile -yearmax infile outfile

In the CDO documentation you can search after 'yearly percentile' and it gives you the example which you are looking for 'YEARPCTL - Yearly percentile values' (e.g. page 115 in cdo-v1.8.0.pdf).

Bye,
Karin

RE: calculate the 90th percentile - Added by Alioune MBAYE almost 7 years ago

Thank you for your help I tried but it returns me the following error:

mbayealioune@mbayealioune-VPCCW2S1E:~/Bureau/DATA CMIP5/PRECIP/0.5x0.5/MPI-ESM-LR/rcp85$ cdo yearpctl,90 JJAS.nc -yearmin JJAS.nc -yearmax JJAS.nc 90prctlJJAS.nc
cdo yearpctl: Started child process "yearmin JJAS.nc (pipe1.1)".
cdo yearpctl: Started child process "yearmax JJAS.nc (pipe1.2)".
cdf_get_vara_float : ncid = 131072 varid = 4
Erreur de segmentation (core dumped)

Can you help me to resolve it please!

RE: calculate the 90th percentile - Added by Karin Meier-Fleischer almost 7 years ago

You forgot to mention that you use seasonal data which means that you have to use the seaspctl operator instead of yearpctl.

[[https://code.zmaw.de/projects/cdo/embedded/index.html#x1-4730002.8.27]]

-Karin

    (1-3/3)