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

Alan Brammer abrammer at albany.edu
Thu Apr 16 09:25:36 MDT 2015


Ahh,  I misunderstood a little and tried to go for the easy answer.
 I defer to Rick's message then.

Good luck.

p.s. try and keep ncl-talk in the cc list.

On 16 April 2015 at 11:10, Ling Huang <hlbutterflyut at gmail.com> wrote:

> Hi Alan,
>
> Thank you very much for your help.
>
> For the first image which shows climate division boundary, I used the
> following resources setting:
>
> res at mpOutlineBoundarySets       = "AllBoundaries"
> res at mpDataBaseVersion           = "Ncarg4_1"
> res at mpDataSetName               = "Earth..3"
>
> For the second image which shows the county boundary, I used the following:
>
> res at mpOutlineBoundarySets       = "GeophysicalAndUSStates"
> res at mpDataBaseVersion           = "Ncarg4_1"
> res at mpDataSetName               = "Earth..2"
> texas_counties                  = (/"Travis"/)
> res at mpOutlineSpecifiers         = "Texas . " + texas_counties
>
> These two images should overlap perfectly since they are from NCL's
> default setting.
>
> For the third image where I tried to plot both the county and climate
> region boundary, I downloaded the "climdiv_polygons.nc" from NCL's
> website which contains the latitude and longitude of each climate regions
> and plot a polyline based on that. For counties, I still used NCL's default
> setting. So the command is like below:
>
>
> res at mpOutlineBoundarySets       = "GeophysicalAndUSStates"
> res at mpDataBaseVersion           = "Ncarg4_1"
> res at mpDataSetName               = "Earth..2"
> texas_counties                  = (/"Travis"/)
> res at mpOutlineSpecifiers         = "Texas . " + texas_counties
>
> ncdf          = addfile("climdiv_polygons.nc","r")
> x              = ncdf->TX_CD3 at lon
> y              = ncdf->TX_CD3 at lat
> dum          = gsn_add_polyline(wks,plot(0),x,y,res_poly)
>
>
> So I would guess the mismatch between the climate region and county
> boundaries would be the incorrect number from the "climdiv_polygons.nc"
> files. I also plotted the climate division boundary both from the "
> climdiv_polygons.nc" file and NCL's default setting, the two do not match
> as below:
>
> [image: Inline image 1]
>
> Thank you
>
> Ling
>
> On Thu, Apr 16, 2015 at 9:43 AM, Alan Brammer <abrammer at albany.edu> wrote:
>
>> I overlayed these 3 images in powerpoint increasing the transparency of
>> them.  The yellow boundary in the last plot does not overlap with the
>> boundaries of the first image.
>> The first 2 images overlap perfectly and the boundaries are coincident.
>> Something is amiss with the plotting of the yellow boundaries in the last
>> image.
>>
>> It might be worth seeing the script here.  How are you combining them?
>>
>>
>> Alan.
>>
>> On 16 April 2015 at 09:51, 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
>>>>
>>>>
>>>
>>> _______________________________________________
>>> 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/20150416/73efb2f0/attachment.html 
-------------- 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/20150416/73efb2f0/attachment.png 
-------------- 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/20150416/73efb2f0/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/20150416/73efb2f0/attachment-0002.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/20150416/73efb2f0/attachment-0003.png 


More information about the ncl-talk mailing list