Re: can't overlay two filled contours?

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Fri Oct 25 2013 - 11:12:25 MDT

Hi Paula,
First, thanks for providing a clean well commented script.. That always
makes things easier.

There are a few issues here. One is the resolution of your data as you
guessed. It is quite high, but that in and of itself isn't usually
enough to cause problems. We are forced to use "AreaFill" or "CellFill"
due to the overlaying, and that is another problem in terms of speed.
The final problem: Turning the contour lines on for the Lake Michigan
plot due to the large number of lines drawn over the lower part of
Michigan.

I've tried changing a number of things with the plot. This combination
got the two lakes drawn (attached):
resH@cnFillMode="AreaFill"
resH@cnMaxLevelValF = 0 ; was 400..
resM@cnLinesOn=False ; was True

But as you can see I had to modify the contour levels..

I will be passing your script/data onto the NCL developers. They may be
able to suggest better methods to get the plots drawn...
Adam

On 10/25/2013 09:41 AM, Paula Doubrawa wrote:
> Thank you very much, Adam.
>
> I am indeed using "RasterFill"!
>
> With "CellFill" minutes and minutes go by while drawing and I end up
> having to kill the script because my computer starts freezing...
>
> With "AreaFill" I get fatal errors after a few seconds of attempting
> to plot:
> /*fatal:_NhlUseWorkspace: Allocation of workspace would exceed maximum
> total size*/
> /*fatal:ContourPlotDraw: error reserving label area map workspace*/
> /*fatal:ContourPlotDraw: Error reserving workspace*/
> /*fatal:ContourPlotDraw: draw error*/
> /*warning:WorkstationDeactivate: workstation not active or not opened*/
> /*
> fatal:ContourPlotDraw: Workspace reallocation would exceed maximum
> size 100000000
> fatal:ContourPlotDraw: draw error
> warning:WorkstationDeactivate: workstation not active or not opened
>
> */
> Do you have any other suggestions? Is the problem that the data is too
> high-res?
>
> If needed:
> Attached is the code, and data is here:
> http://www.ngdc.noaa.gov/mgg/greatlakes/michigan.html
>
>
>
> On Fri, Oct 25, 2013 at 11:14 AM, Adam Phillips <asphilli@ucar.edu
> <mailto:asphilli@ucar.edu>> wrote:
>
> Hi Paula,
> I believe it matters whether you are setting res2@cnFillMode =
> "RasterFill". Areas of _FillValue (or areas beyond the range of
> the grid) are set to transparent with cnFillMode = "AreaFill"
> (=default) or cnFillMode = "CellFill". However, if cnFillMode =
> "RasterFill", then transparency is not supported, and those areas
> set to _FillValue or outside the range of the grid are set to the
> background color (usually white)..
>
> http://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnFillMode
> http://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnOutOfRangeFillColor
>
> If you are setting res2@cnFillMode = "RasterFill", see if changing
> that resource to "CellFill" gets your overlay working.
>
> If the above does not apply, please include your complete resource
> list / plotting section of your script in your reply to ncl-talk..
> Adam
>
> On 10/24/2013 06:38 PM, Paula Doubrawa wrote:
>> Hello, all!
>>
>> I am overlaying filled contours on a map (basic overlay
>> procedure, see below).
>>
>> The different plots cover different regions of my map.
>>
>> If I plot one with filled contours and the other without filled
>> contours (only lines) then it works!
>>
>> If I try to plot them both with filled contours, only the last
>> one to be overlaid appears in the final plot, it's overwriting
>> the first plot that was overlaid!
>>
>> Has anyone run into this?!
>>
>> Any help appreciated!
>>
>> Thank you very much
>> Paula
>>
>> /map=gsn_csm_map(wks,mpres)/
>> /plot1=gsn_csm_contour(wks,data1,res1)/
>> /plot2=gsn_csm_contour(wks,data2,res2)/
>> /
>> /
>> /overlay(map,plot1)/
>> /overlay(map,plot2)/
>> /
>> /
>> /draw(map)/
>> /frame(wks)/
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> --
> ______________________________________________________________
> Adam Phillipsasphilli@ucar.edu <mailto:asphilli@ucar.edu>
> NCAR/Climate and Global Dynamics Division(303) 497-1726 <tel:%28303%29%20497-1726>
> P.O. Box 3000
> Boulder, CO 80307-3000http://www.cgd.ucar.edu/cas/asphilli
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli


_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Lakes_Michigan_Huron.png
Received on Fri Oct 25 11:12:37 2013

This archive was generated by hypermail 2.1.8 : Fri Nov 01 2013 - 08:58:14 MDT