maskout / changing values

Arindam Chakraborty arindam at MET.FSU.EDU
Sat Nov 10 17:52:23 EST 2007


Hi Jean,
    the following solution may work (although looks too long!). If
required, it can be broken into pieces.

'd
const(maskout(const(const(maskout(maskout(icecmsl,icecmsl-1.0),1.28-maskout(icecmsl,icecmsl-1.0)),1),0,-u),0.5-const(const(maskout(maskout(icecmsl,icecmsl-1.0),1.28-maskout(icecmsl,icecmsl-1.0)),1),0,-u))+icecmsl,1.28,-u)'

What it will do is, all values between 1.0 and 1.28 will be set to 1.0.
All other values will be kept as it is. If you want to assign all values
above 1.28 to be set as undefined (as those are not valid as you've
mentioned), then possibly you define the above expression to a variable
(say icesat) and use
'd maskout(icesat,1.28-icesat)'

Please let me know if this does not work out they way you wanted.

regards,

arindam


Jean Pierre Arabonis wrote:
> Hi everyone
>    I have an ice coverage dataset that has values from 0-2.28 of which
> values from 0-1.28 are valid ice percentages, however the values from 1
> - 1.28 all correspond to 100% and need to be assigned the value 1.
>    I have tried to use a combination of maskout and const to achieve
> this and tried to adapt an example to achieve this but I'm not getting
> it.
>
> define newice =
> const(const(maskout(icecmsl,(maskout(icecmsl,icecmsl+1)-1.28)),1),0,-u)
>
>    Could someone please poit me in the right direction.
>
>    Many thanks
>       Jean Pierre
>
>
> --
> Jean Pierre Arabonis
> arabonis at egs.uct.ac.za
> Tel 021 780 1021 cell 084 401 1365
> This email is 100% Microsoft Free

--
----------------------------
 ARINDAM CHAKRABORTY
 Department of Meteorology
 Florida State University
 Tallahassee, FL-32306, USA
 Tel: 850-644-3524 (Dept)
      850-524-0717 (Cell)
 Fax: 850-644-9642
____________________________



More information about the gradsusr mailing list