skipping negative values in GRADS

Douglas Clark dbcl at CEH.AC.UK
Mon Mar 26 07:45:40 EDT 2007


Sachin,

Maskout will also work when averaging etc, and wil omit negative values from the average, as you require.l

Either use directly
e.g. d ave (maskout(var,var),t=1,t=60)
or first define a masked variable if you're going to use it a lot
e.g. define maskvar=maskout(var,var)
d ave(maskvar,t=1,t=60)

Doug


>>> sachinghude at TROPMET.RES.IN 26/03/2007 12:48 >>>


Thank you very much for your kind suggestion.

My bad data lie below 0 and good data is above 0 then maskout will work.

But what if while taking area average,

For example

set lat 0 40

set lon 50 110

maskout (var,var)

d ave (var,t=1,t=60)

Will this reject negative values (below 0) while calculating average from month 1 to 60.

Thanks in advance

Sachin


--
This message (and any attachments) is for the recipient only. NERC
is subject to the Freedom of Information Act 2000 and the contents
of this email and any reply you make may be disclosed by NERC unless
it is exempt from release under the Act. Any material supplied to
NERC may be stored in an electronic records management system.



More information about the gradsusr mailing list