Re: Extra Points on Contour Maps

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri May 14 2010 - 14:21:51 MDT

Hi Josh,

Thanks for sending the small script and data.

When I run it using "RasterFill" without smoothing, I get a picture with some green and black cells in it. This was true for AreaFill and CellFill.

I tried both NCL V5.1.1 and V5.2.0 on this script and got the same green/black plot, which I've attached (this one is raster fill).

What version of NCL are you running? Perhaps you need to upgrade.

When I plot the full global grid, I see that this particular area you are zooming in (near Idaho) on does indeed just have green and black cells in it, so the zoomed in image seems correct to me.

Also, if I print the data in the lat/lon range that you're zooming in on, I get these values:

(0,0) 3.979706
(0,1) 3.932434
(0,2) 3.956482
(1,0) 4.062988
(1,1) 4.051941
(1,2) 4.074158
(2,0) 4.110504
(2,1) 4.129395
(2,2) 4.092682

Your contour levels in this range are (/..., 3, 4, 5, .../)

These values value either between the 3 and 4, or the 4 and 5, so you should only see two colors, as I do here.

--Mary

On May 14, 2010, at 9:17 AM, Josh Thompson wrote:

> Hi Mary,
>
> I did have RasterSmoothing set to True, with no luck at the time.
>
> I ran my script again to see which data files were doing this (unchanged), and everything seemed to plot properly. I am not sure what is going on here. I did make the debug stuff you requested (attached). This was one of the problematic files.
>
> When I plot the small area with CellFill, only four whole cells are on the plot. There are 12 partial cells along the edges of the plots.
>
> Thanks!
>
> -Josh
>
>
> On 05/13/2010 09:59 AM, Mary Haley wrote:
>> Josh,
>>
>> I need more information about your data. When you say 4x4 degrees, exactly
>> how big of an array is this area? If you are zooming in on area that is only contained by
>> one cell, I don't think you can contour this.
>>
>> There may be something else going on with it that's causing the blank plot.
>> For example, if you are zooming in on an area that is contained between two
>> contour levels, you may get the blank plot. This is something I created a ticket
>> for, as it seems like a bug.
>>
>> However, this problem is supposed to go away when you use raster fill
>> and set res@cnRasterSmoothingOn = True. Have you tried this?
>>
>> If you are able to provide us with script and data, then here's
>> one way to do this:
>>
>> - Set res@gsnDebugWriteFileName = "mary"
>> - Run your script
>> - This should create "mary.ncl" and "mary.nc". Send me these two files, and I'll take a look.
>>
>> Thanks,
>>
>> --Mary
>>
>>
>>
>> On May 13, 2010, at 1:19 AM, Josh Thompson wrote:
>>
>>
>>> Hi all,
>>>
>>> I am trying to produce some plots that are at a low resolution, but
>>> only cover a very small area (something like 4x4 degrees). The problem
>>> I am running into is, there don't seem to be enough points within the
>>> area for NCL to make contours. I am using "AreaFill" and have tried
>>> "RasterFill". With those two fill modes, I get a blank plot (except
>>> outlines; also, the field is not constant 0). "CellFill" works, but I
>>> need the smooth(rounded) contour lines. I know my data is good,
>>> because I can successfully plot a larger area.
>>>
>>> My question is, is it possible to have the contour lines drawn with
>>> consideration of points that aren't in the viewable area? In other
>>> words, can I have NCL plot, and create smooth contours, with a large
>>> area of points, then zoom into a smaller area while keeping the
>>> contours intact?
>>>
>>> Thanks!
>>>
>>> -Josh Thompson
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>
>
> <mary.nc><mary.ncl><mary.res>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

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

mary.png
Received on Fri May 14 14:22:06 2010

This archive was generated by hypermail 2.1.8 : Wed May 26 2010 - 10:39:13 MDT