[ncl-talk] Plotting climate division and counties at the same time

Ling Huang hlbutterflyut at gmail.com
Mon May 11 12:01:50 MDT 2015


Hi Rick,

Thank you very much for the very thoughtful suggestions!

I tried several more ways, such as loading shapefile containing the climate
division in NCL, loading shapefile containing the counties in NCL or both.
But since the sources of these data are inconsistent with each other, the
plots I got are not 100% matched. I also tried to lay two maps on each
other. But as you said, we can't do this in NCL.

Nevertheless, I loaded shapefile containing the counties and used NCL's
default setting to enable the climate division boundaries and got something
like below (not perfect but acceptable.

Again, thank you very much for your time!

Ling

[image: Inline image 1]



On Thu, Apr 16, 2015 at 4:28 PM, Rick Brownrigg <brownrig at ucar.edu> wrote:

> (please ignore the previous unintelligible post -- accidentally got away
> from me)
>
> Hi Ling,
>
> I too did not fully understand your original post and why you were
> introducing the  climdiv_polygon.nc dataset. I see the issue now.   As
> far as I know, there is no other readily available source of these
> boundaries that's guaranteed to line up with NCL's map database.
>
> At first, I thought perhaps overlay plots, using Earth..2 and Earth..3 as
> in your original attempt would work. But after trying this, I learned that
> map-plot objects can not be overlaid on top of other plots (they can only
> be the base plot in an overlay).
>
> I hesitate to even show this second possibility, because it is a giant
> hack. But it involves suppressing framing of the page, and drawing two maps
> directly on top of each other. All the external annotations (labels,
> titles, tick marks, labelbars, etc.) have to be the same in both plots or
> the two maps won't line up on the page;  this trick might not work for your
> case.
>
> In any event, attached is a script that shows climate divisions for
> Colorado along with the county boundary for Boulder county. It uses NCLs
> internal database in both case.   It is drawn from the last example
> (shapefile_15.ncl) on the following page, and heavily modified:
>
>      http://ncl.ucar.edu/Applications/maponly.shtml
> <http://ncl.ucar.edu/Applications/maponly.shtml>
>
> I wish I had a better answer...
> Rick
>
>
>
> On Thu, Apr 16, 2015 at 3:15 PM, Rick Brownrigg <brownrig at ucar.edu> wrote:
>
>>
>>
>> It is drawn from the last example (shapefile_15.ncl) on the following
>> page, and heavily modified:
>>
>> http://ncl.ucar.edu/Applications/maponly.shtml
>>
>> and is hea
>>
>> On Thu, Apr 16, 2015 at 9:48 AM, Ling Huang <hlbutterflyut at gmail.com>
>> wrote:
>>
>>> Hi Rick,
>>>
>>> As pointed by Alan, the climate division boundaries should align with
>>> the county boundaries, IF both were from NCL's default settings.
>>>
>>> I guess the problem lies in the "climdiv_polygon.nc" file that I
>>> downloaded from NCL's website. The latitude and longitude provided by this
>>> file seem mismatched with the default NCL setting as shown below. Maybe
>>> there is another file that is more consistent with NCL's default setting?
>>>
>>> Thanks
>>>
>>> Ling
>>>
>>> [image: Displaying image.png]
>>>
>>> On Thu, Apr 16, 2015 at 8:51 AM, Rick Brownrigg <brownrig at ucar.edu>
>>> wrote:
>>>
>>>> Hi Ling,
>>>>
>>>> This is a tough one -- off hand it looks like a classic issue of mixing
>>>> two disparate geodata sources of very different scales/resolutions, which
>>>> typically incur alignment/registration issues. If that's what is going on,
>>>> I don't think there's much you can really do about it. Do you know what are
>>>> the relative scales of the different sources?   Is there a reason to
>>>> believe the climate division boundaries would align with the county
>>>> (political) boundaries? (e.g., are they semi-arbitrarily defined that way
>>>> for convenience?)
>>>>
>>>> Rick
>>>>
>>>> On Wed, Apr 15, 2015 at 9:43 PM, Ling Huang <hlbutterflyut at gmail.com>
>>>> wrote:
>>>>
>>>>> Dear NCL talk,
>>>>>
>>>>> I want to show boundaries of climate division and counties over the
>>>>> same plot. But the boundaries of climate divisions and counties are
>>>>> provided by different map dataset, which means I can only draw each at a
>>>>> time. Is there a way that I can show them at the same time? For example, I
>>>>> want to combine the following two plots into one plot.
>>>>>
>>>>> The left one shows the boundaries of climate divisions and the right
>>>>> one shows county.
>>>>>
>>>>> [image: Inline image 1][image: Inline image 2]
>>>>>
>>>>> I tried to load counties boundaries while reading the "
>>>>> climdiv_polygons.nc" to plot a polyline for the climate division. But
>>>>> it seems the boundaries do not match, like below:
>>>>>
>>>>> [image: Inline image 3]
>>>>>
>>>>> Is there a way that I can do this?
>>>>>
>>>>> Thank you very much!
>>>>>
>>>>> Ling
>>>>>
>>>>> _______________________________________________
>>>>> ncl-talk mailing list
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150511/f494d4c4/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 32078 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150511/f494d4c4/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 67526 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150511/f494d4c4/attachment-0001.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 38157 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150511/f494d4c4/attachment-0002.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 115213 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150511/f494d4c4/attachment-0003.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 47653 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150511/f494d4c4/attachment-0004.png 


More information about the ncl-talk mailing list