Problem with 'query shades' - strange behaviour

Diane Stokes Diane.Stokes at NOAA.GOV
Tue Jun 20 10:18:20 EDT 2006


Witold,

Just to be sure we are on the same page...

I wasn't suggesting the whole field was undefined.  If the defined
points all have the same value, and you 'set clevs' in advance, you will
get a result of something like:

Contouring at clevs =  1 2 5 10 15 20 25 30 40

but 'q shades' will result in 'None'.

If you *don't* set clevs in advance and you have a constant field, then
you'll get:

Constant field.  Value = 0  (or whatever the constant value is).

So, it may help in your debugging if you comment out your call to 'set
clevs' to see if the "Constant field" msg shows up.  Also, 'set stat on'
might provide useful statistics when you 'say result'.

     Diane



Witold Interewicz wrote:
> Dear Diane,
>
> Thank you for your help. Constant value could be a reason, but I think not the
> main one. Now I see that this problem happens when there are still some defined
> values after masking (first query - after display command - does not say 'Cannot
> contour grid - all undefined values'), but they are all on the edge of domain,
> so that  they are not ploted. Could it be like that? Did anyone else notice such
> strange behaviour?
>
> I'm still debugging this script, so I'll let know as soon as I detect
> reproducible circumstances leading to this problem.
>
> --
> Witek
>
> Dnia 15-06-2006 o godz. 16:30 Diane Stokes napisał(a):
>> Witek,
>>
>> I can't see how doing an "fgrid" plot in advance of the sequence you
>> list should cause a problem.  (It doesn't cause a problem for me running
>> 1.9b4 for AIX).
>>
>> My best guess is the result of 'display PTOTM' is (sometimes) a constant
>> value.  'query shades' will result in "None" after a constant field is
>> displayed.  When this problem occurs, does your display of PTOTM look
>> reasonable?
>>
>>     Diane
>>
>>
>> Witold Interewicz wrote:
>>> Hello,
>>> Thank you for help. Unfortunately I issue the command you mentioned prior to
>>> scale defining. Full sequence is:
>>> 'set gxout shaded'
>>> 'set rgb 16 ...'
>>> ...
>>> 'set rgb 25 ...'
>>> 'set rbcols 16 17 18 19 20 21 22 23 24 25'
>>> 'set clevs 1 2 5 10 15 20 25 30 40'
>>> 'define PTOTM = maskout( PTOT , PTOT - 0.1 )'
>>> 'display PTOTM'
>>> say result
>>> 'query shades'
>>> say result
>>>
>>> Could the reason be, that prior to that sequence I plot some other user defined
>>> field using 'set gxout fgrid'?
>>>
>>> --
>>> Witek
>>>
>>> Dnia 13-06-2006 o godz. 20:49 Jennifer M. Adams napisał(a):
>>>> Witek,
>>>> The difference is likely due to the current 'gxout' setting. If you
>>>> add 'set gxout shaded' to your script before your display command,
>>>> then it should always generate the output you're looking for from 'q
>>>> shades'.
>>>> Jennifer
>>>>
>>>> On Jun 13, 2006, at 1:23 PM, Witold Interewicz wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I issue the following sequence of commands:
>>>>>
>>>>> 'define PTOTM = maskout( PTOT ; PTOT - 0.1 )'
>>>>> 'display PTOTM'
>>>>> say result
>>>>> 'query shades'
>>>>> say result
>>>>>
>>>>> This sequence should plot PTOT masked below 0.1 . Both 'say result'
>>>>> should
>>>>> generate output like this:
>>>>>
>>>>> Contouring at clevs =  1 2 5 10 15 20 25 30 40
>>>>> 16 < 1
>>>>> 17 1 2
>>>>> 18 2 5
>>>>> 19 5 10
>>>>> 20 10 15
>>>>> 21 15 20
>>>>> 22 20 25
>>>>> 23 25 30
>>>>> 24 30 40
>>>>> 25 40 >
>>>>>
>>>>> assuming that I've defined proper scale prior to presented commands
>>>>> sequence.
>>>>> The problem is, that this sequence sometimes prints something like
>>>>> this:
>>>>>
>>>>> Contouring at clevs =  1 2 5 10 15 20 25 30 40
>>>>> None
>>>>>
>>>>> It means, that somewhere in between time defined scale of values
>>>>> and colors
>>>>> disappears. Whats the reason of this behaviour, and how could it be
>>>>> avoided?
>>>>>
>>>>> Please help me, this error seems to be random and I can't figure
>>>>> out where the
>>>>> problem is. Having "None" from 'query shades' one can not plot the
>>>>> scale properly.
>>>>>
>>>>> --
>>>>> Witek
>>>>>

--
Diane Stokes
Environmental Modeling Center
National Weather Service/NOAA



More information about the gradsusr mailing list