Hi Rick,
Thank you very much. I'm getting an error though, and maybe you can help. This is my script. I haven't included all the resources I've set.
fnam="/root/TempData/average/average_2010.nc"
x=addfile(fnam,"r")
data=x->var61(0,0,:,:)
shapefile=addfile("/root/IRL_adm/IRL_adm1.shp","r")
segments=shapefile->segments
geometry=shapefile->geometry
segsDims=dimsizes(segments)
geomDims=dimsizes(geometry)
geom_segIndex=shapefile@geom_segIndex
geom_numSegs=shapefile@geom_numSegs
segs_xyzIndex=shapefile@segs_xyxIndex
segs_numPnts=shapefile@segs_numPnts
lines=new(segsDims(0),graphic)
numFeatures=geomDims(0)
lon=shapefile->x
lat=shapefile->y
plres=True
plres@gsEdgesOn=True
plres@gsLineColor="black"
plres@gsEdgeColor="black"
xwks=gsn_open_wks("ps","Average_2010")
resources=True
resources@mpProjection="Mercator"
xwks=gsn_open_wks("ps","Average_2010")
gsn_define_colormap(xwks,colors)
plot=gsn_csm_contour_map(xwks,data,resources)
do i=0, numFeatures-1
startSegment=geometry(i,geom_segIndex)
numSegments=geometry(i,geom_numSegs)
do seg=startSegment,startSegment+numSegments-1
startPT=segments(seg,segs_xyzIndex)
endPT=startPT+segments(seg,segs_numPnts)-1
lines(segNum)=gsn_add_polyline(xwks,plot,lon(startPT:endPT),lat(startPT:endPT),plres)
segNum=segNum+1
end do
end do
end
> From: brownrig@ucar.edu
> Subject: Re: Detailed map of Ireland
> To: cohara1985@hotmail.com; ncl-talk@ucar.edu
> Date: Thu, 27 Feb 2014 06:25:22 -0700
>
> Hi Ciara,
>
> Check out the shapefiles examples at:
>
> http://www.ncl.ucar.edu/Applications/shapefiles.shtml
>
> Example #13 in particular is probably most applicable to what you are
> wanting to do. Shapefiles for Ireland can be found at:
>
> http://www.gadm.org
>
> Shapefiles from GADM come in several levels, with the "0" level being
> the national boundaries, level "1" the next administrative unit down
> (eg., states in the US), and so on (level 2 is counties in the US).
>
> Hope that helps...
> Rick
>
>
> On Thu, 27 Feb 2014 12:46:37 +0000
> Ciara O'Hara <cohara1985@hotmail.com> wrote:
> > Hi,
> >
> > Is there any map I could use that contains more detail than the one
> >I'm using now. I'm creating contour maps of Ireland but I'd like it
> >to show county boundaries, is that possible?
> >
> > Regards,
> > Ciara
> >
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Feb 27 08:35:08 2014
This archive was generated by hypermail 2.1.8 : Mon Mar 03 2014 - 14:26:18 MST