Skip to contents

This module selects field elements from infile2 with respect to infile1 and writes them to outfile. The fields in infile1 are handled as a mask. A value not equal to zero is treated as \"true\ zero is treated as \"false\". The number of fields in infile1 has either to be the same as in infile2 or the same as in one timestep of infile2 or only one. The fields in outfile inherit the meta data from infile2.

Usage

cdo_ifnotthen(ifile1, ifile2, ofile = NULL)

cdo_ifthen(ifile1, ifile2, ofile = NULL)

Arguments

ifile1, ifile2

Strings with the path to the input files.

ofile

String with the path to the output file.

Details

ifthen     If then
                    / i_2(t,x) if i_1(t,x) NE 0  AND  i_1(t,x) NE miss
           o(t,x) =
                    \\ miss     if i_1(t,x) EQ 0  OR   i_1(t,x) EQ miss
ifnotthen  If not then
                    / i_2(t,x) if i_1(t,x) EQ 0  AND  i_1(t,x) NE miss
           o(t,x) =
                    \\ miss     if i_1(t,x) NE 0  OR   i_1(t,x) EQ miss