Re: Plotting Colors for Missing Values

From: David B. Reusch <dbr_at_nyahnyahspammersnyahnyah>
Date: Thu, 21 May 2009 15:38:55 -0400

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
Received on Thu May 21 2009 - 13:38:55 MDT

This archive was generated by hypermail 2.2.0 : Thu May 21 2009 - 16:54:57 MDT