Project

General

Profile

broadcasting behaviour with logical functions

Added by Adrian Tompkins about 1 year ago

I'm not sure why but broadcasting seems to work differently with logicals such as ge, lt, it is not generalized like other functions (sub, mul etc).

If I want to compare a multi-step input to a single timestep threshold, broadcasting works fine:

cdo -b f32 ge runsum.nc onestep.nc out1.nc

then everything works as desired:

cdo    ge: Filling up stream2 >onestep.nc< by copying the first timestep.
cdo    ge: Processed 2 variables over 995 timesteps [11.29s 87MB].

However, if the second is a file which is multistep but shorter than the input (e.g. a result of ymonpctl or ymonmean)

cdo -b f32 ge runsum.nc twelve_steps.nc out2.nc

it fails!

cdo    ge (Abort): Input streams have different number of timesteps!

I was wondering if I could ask for two upgrades to cdo ?

1) More generalized broadcasting behaviour on logicals as already implemented for sub, div etc, i.e. that the shorter second file cycles to fill up stream 2
2) Maybe more formal seasonal comparison functions can be implemented, i.e. ymonge, ymonlt, ydaygt, ydayeq etc etc... ?

Many thanks!
Adrian


Replies (1)

RE: broadcasting behaviour with logical functions - Added by Uwe Schulzweida about 1 year ago

The new operators ymonge, ymonlt, ydaygt, ydayeq etc etc... are available in CDO release 2.2.0.

    (1-1/1)