Project

General

Profile

Applying CDO operator chaining

Added by Jeisson Javier Leal Rojas over 1 year ago

I have a precipitation `nc` file and I want to apply several CDO commands:

data type DOUBLE

 cdo -b F64 selname,VAR INPUT.nc OUTPUT.nc

Start time set to zero

cdo settime,00:00:00 INPUT.nc OUTPUT.nc

Precipitation was given in kg m-2 s-1 and mm/day are the needed units

cdo -setattribute,VAR@units="mm/day" -mulc,86400 INPUT.nc OUTPUT.nc

Change variable name

cdo chname,OLD-NAME,NEW_NAME INPUT.nc OUTPUT.nc

I tried to do something like this:

cdo -b F64 -selname,pr -settime,00:00:00, -setattribute,VAR@units="mm/day" -mulc,86400, chname,OLD-NAME,NEW_NAME INPUT.nc OUTPUT.nc

How can I do a correct operator chain?

I checked section * 1.2.3. Combining operators* in the CDO User’s Guide, but it seems it is not to clear to me.

Regards,

Jeisson Leal.


Replies (1)

RE: Applying CDO operator chaining - Added by Estanislao Gavilan over 1 year ago

Hi Jeisson,

it is always from right to left

cdo -b F64 -settime,00:00:00, -setattribute,VAR@units="mm/day" -chname,OLD-NAME,NEW_NAME -mulc,86400 -selname,pr INPUT.nc OUTPUT.nc

This should work.

Kind regards,

Estanislao

    (1-1/1)