Re: Plotting Colors for Missing Values

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Thu, 28 May 2009 10:43:35 -0600

Hi Dave,

Interesting. I spent too long yesterday just to finally arrive at the
same conclusion that gsnAddCyclic was the culprit. I was about to let
you know my findings but I am glad you were able to figure it out
yourself. I am copying this to ncl-talk to let people know that this
has been resolved.

It certainly would be nice if NCL could figure out that it was being
given an unreasonable task to perform. Maybe eventually...
  -dave

On May 28, 2009, at 7:09 AM, David Reusch wrote:

> Hi Dave,
>
> I came back to this just now and have discovered that I had
> "AddCyclic" set to True for some reason. Changing it to False has
> resolved the weirdness I was seeing earlier. I almost never need
> this resource to be True so I'm a bit confused as to how it got
> that way. Nonetheless, it looks like the source of my bad plots
> (and in hindsight, it sorta makes sense given the spurious contours
> I was seeing...).
>
> The idealist in me wishes NCL would catch mistakes like this
> automatically somehow, but the realist recognizes that's just not
> even close to reasonable.
>
> Cheers,
> Dave
>
> David Brown wrote:
>>
>> Hi Dave,
>>
>> Thanks for the report. We will look into this as soon as possible.
>> -dave
>>
>> On May 21, 2009, at 1:38 PM, David B. Reusch wrote:
>>
>>> Hi Dave,
>>>
>>> This problem seems to have resurfaced on a different Mac (10.4
>>> this time; though same results on 10.5) and different dataset
>>> (naturally ...). The fix you suggested back on May 8th worked
>>> fine with the original file. Now I get a much larger, still
>>> messed up PS file when I use these cn settings. The same
>>> behavior occurs with both of the WRF and MM5 netcdf files I've
>>> tried. I've included both in case you want to experiment. The
>>> included cn*ps files are from the WRF file. The default cn run
>>> gets the continent right but then bleeds out way beyond the data
>>> domain, as we were seeing before. With rasterfill, the contour
>>> lines are ok but the fill is messed up (though you can see the
>>> data domain at least). This config also takes a lot longer to
>>> run now.
>>>
>>> You can run this with
>>> ncl 'mon="198812"' plot_Tavg.ncl
>>> and you'll get a PS file beginning with "WRF"
>>>
>>> To run it with MM5
>>> ncl 'mon="198812"' 'var="t2"' 'model="MM5"' plot_Tavg.ncl
>>> and you'll get a PS file beginning with "MM5"
>>>
>>> All files can be downloaded in one tgz file from http://
>>> www.geosc.psu.edu/fetch.php?file=77
>>>
>>> Thanks!
>>> dave
>>>
>>> David Brown said the following on 5/8/09 4:27 PM:
>>>>
>>>> Hi David,
>>>>
>>>> I believe that the problem you are experiencing is different
>>>> from the missing values problem reported earlier. I am not
>>>> totally sure yet, but I think your problem is a floating point
>>>> issue in the low level contouring code that occasionally results
>>>> in a fill coloring 'bleeding' from a small contour area into a
>>>> larger area where it does not belong. This will take some work
>>>> to track down. I ran your code with versions 5.1.0, 5.0.0, and
>>>> 4.3.0 and they all exhibit the same problem.
>>>>
>>>> In the meantime, there is a workaround that generates results
>>>> that look okay as far as I can tell.
>>>> Use raster fill:
>>>>
>>>> res_at_cnFillMode = "rasterfill"
>>>> res_at_cnRasterSmoothingOn = True
>>>>
>>>> I will let you know when we make some more progress on this issue.
>>>> -dave
>>>>
>>>>
>>>>
>>>> On May 7, 2009, at 1:40 PM, David Reusch wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I seem to be having the same "wrong colors for missing values"
>>>>> problem reported earlier this week, only the fix based on
>>>>> cnMissingValFillPattern and cnMissingValFillColor does not fix
>>>>> my plots. I expect white everywhere except on the Antarctic
>>>>> continent since all those points are _FillValues. Instead I
>>>>> always get colors like in the image below (and I have tried
>>>>> lots of color tables as well as explicitly adding White to the
>>>>> color table).
>>>>>
>>>>> My files can be found at http://www.geosc.psu.edu/fetch.php?
>>>>> file=75. To reproduce the output, use "ncl 'cntrs=(/
>>>>> 0,500,50/)' plot_amsr.ncl" to match my contours.
>>>>>
>>>>> I am running ncl 5.1.0 on Mac OS 10.5.6.
>>>>>
>>>>> Thanks!
>>>>> Dave
>>>>>
>>>>> <amsr_accum_plot.png>
>>>>> --
>>>>> 517 Deike Building
>>>>> Earth & Environmental Systems Institute
>>>>> Penn State University
>>>>> University Park, PA 16802
>>>>>
>>>>> <amsr_accum_plot.png>
>>>>> _______________________________________________
>>>>> ncl-talk mailing list
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>>
>>> --
>>> 517 Deike Building
>>> Earth & Environmental Systems Institute
>>> Penn State University
>>> University Park, PA 16802
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
> --
> 517 Deike Building
> Earth & Environmental Systems Institute
> Penn State University
> University Park, PA 16802

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu May 28 2009 - 10:43:35 MDT

This archive was generated by hypermail 2.2.0 : Mon Jun 01 2009 - 07:47:28 MDT