Project

General

Profile

can *pctl functions return multiple percentiles from a single call?

Added by Tomas Remenyi almost 6 years ago

Dear CDO developers,

I regularly need to calculate multiple percentile values (e.g. 1st, 5th, 10th... 90th, 95th, 99th) over the same variable and time period.
Since the computationally expensive component of this process is sorting the values, I was wondering if there is a way to get CDO to return multiple percentiles from a single call (so it only has to sort the value once - and return all the required percentiles in a 'single step'), the documentation seems to indicate it can only be done 1 percentile at a time.

If it is not possible at present, it seems like a fairly easy modification of the function to be able to return an outfile.nc with multiple new variables, all labelled as the user-defined percentiles of interest.

Please advise if there is a solution to this problem.

Regards,
Tom


Replies (1)

RE: can *pctl functions return multiple percentiles from a single call? - Added by Ralf Mueller almost 6 years ago

Hi Tomas!

Since you can make pct operators write into different output files, you can parallelize the whole computation with GNU parallel. With that tool, you can run each line of a script in parallel. IMO that should serve your needs.

hth
ralf

    (1-1/1)