Rephrasing my question
Henrique Barbosa
hmjbarbosa at GMAIL.COM
Wed Mar 30 13:13:26 EST 2005
Dear Matt,
Why do you need to change de undefined values? Depending
on your answer, there are different possible solutions for your question.
For instance, if you just want to change the undefined values
for some arbitrary defined value, you can do:
define newsst=const(sst,300,-u)
In this example, all undefined values (-u flag) will be replaced
by a constant value, in this case 300 degree kelvin. Check out the
grads web page for a complete help with the const function.
If you want to have, e.g., 300 over ocean and 320 over land,
you can to something like:
define newsst=const(sst,300,-u)+const(maskout(sst,lsmk>0),20,-u)
...assuming you have a land sea mask (lsmk) variable with positive
values in land and negative or zero over ocean.
Now, if you need some realist values, the best is really to do what you say:
> points remain undefined. I did this using a weighted average in Fortran
> and while the results look decent enough over water, they are poor over
I mean, a weighted average. Now, if that's not working for land values,
just mask them out to some fixed value inside grads.... Again, you are going
to need a land sea mask for that.
Bye,
Henrique Barbosa
More information about the gradsusr
mailing list