remove "Constant field. Value ="

Dave Allured dave.allured at NOAA.GOV
Sun Nov 27 21:00:32 EST 2005


When I ran into this a while back, I found that it was sufficient to
change a single grid point by a small value, such as multiplying the
corner point by 1.001, to make the constant field message go away.

I mention this because it runs faster than computing a trig function
across the whole grid.  This is not important if you are generating only
a few frames.  Arindam's method is very elegant, occupying only one line
of code, and handling grids with distributed missing values.

--Dave A.
CDC/PSD/NOAA/CIRES

Arindam Chakraborty wrote:

>hi Yun,
>        since grads shades between two values rather than at a single
>value, you may have to add a slowly varying function to the constant
>field you want to display. Set the clevs before the display. An
>example for 2-d x-y grid:
>
>...
>'set gxout shaded'
>'set clevs 10' * assuming var has the constant value of 10
>'d var+cos(lat*3.1416/180)*1e-6'
>
>where var is the constant field variable to display. The cos() allows
>a slow variation in the field (along with the multiplication of 1e-6).
>The order of magnitude of this factor should be must less than the
>value of the variable to display.
>
>
>
>
>On Sun, 27 Nov 2005, Ji-Yun SEO wrote:
>
>
>
>>Hi, everyone,
>> I'd like to display a constant field using Grads,
>> unfortunately, there is always a warning of "Constant field. Value = xx"
>>on picture window, and I'm now asking about whether there is a command to
>>avoid such a warning?
>> Thanks in advance.
>>
>>
>>



More information about the gradsusr mailing list