Project

General

Profile

ifthen or ifthenelse?

Added by sari mechal almost 8 years ago

Hi All,

I have two netcdf files fil1 and fil2.

Is there a way with cdo to assign any value in fil1 to NA if the corresponding value in fil2 < 400?

Thanks


Replies (3)

RE: ifthen or ifthenelse? - Added by Jonghun Jin almost 8 years ago

Hi,

Try this and check the result.

cdo -ifthen -ltc,400 fil2 fil1 output.nc

Jonghun

RE: ifthen or ifthenelse? - Added by Jonghun Jin almost 8 years ago

And then, check this result.

cdo -ifthen -gec,400 fil2 fil1 output.nc

Jonghun

Jonghun Jin wrote:

Hi,

Try this and check the result.

cdo -ifthen -ltc,400 fil2 fil1 output.nc

Jonghun

RE: ifthen or ifthenelse? - Added by sari mechal almost 8 years ago

Thanks.I will check that I forgot to say the variables names are different in fil2 and fil1
in fil1 it is named "ps" while in fil2 "tem". is it possible to select the name of the variable in fil1 and fil2?

    (1-3/3)