Project

General

Profile

CDO bindings chaining question

Added by Jayantha Obeysekera 4 months ago

I am trying to compute deviation from mean over a some years using operator chaining.
Here is what I have so far.
cdo.ymonavg(input='-selyear,1950/2005 '+ncfiles[i],output='./tmp/monavg.nc')
cdo.ymonsub(input=ncfiles1+' ./tmp/monavg.nc', output='./tmp/anom.nc')

Can I combine these two into one statement using operator chaining?
Thanks


Replies (2)

RE: CDO bindings chaining question - Added by Karin Meier-Fleischer 3 months ago

cdo.ymonsub(input=ncfiles[i]+' -ymonavg -selyear,1950/2005 '+ncfiles[i], output='./tmp/anom.nc')

You can use the diff operator to check if it is the same as in two steps (it is ;) ).

RE: CDO bindings chaining question - Added by Jayantha Obeysekera 3 months ago

Thank you, Karin. This is what I needed!

    (1-2/2)