<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
This issue has been solved. I had NCL v6.1.2 still in the PATH
environment variable.<br>
<br>
Thank you,<br>
<br>
Scott<br>
<div class="moz-cite-prefix">On 11/11/2014 03:10 PM, Rick Brownrigg
wrote:<br>
</div>
<blockquote
cite="mid:CAGKRhbFvFk3WdEYYCVZSJxV3EFaO+HnioriUa0q1nbhpAZGS=A@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi,<br>
<br>
</div>
Is there a typo in this line:<br>
<br>
plres@gsSegments = f->segments ;(:,0)<br>
<br>
</div>
I don't think the semicolon should be there. f->segments
should be an N x 2 array.<br>
<br>
</div>
HTH...<br>
</div>
Rick<br>
<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Nov 11, 2014 at 4:00 PM, Scott
Capps <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:scott@allvertum.com" target="_blank">scott@allvertum.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Greetings,<br>
<br>
I have just upgraded to version 6.2.1
(ncl_ncarg-6.2.1.Linux_Debian7.6_x86_64_nodap_gcc472.tar.gz)
and am happy with the many enhancements. I am especially
interested in the more efficient shapefile plotting
abilities. However, I am getting strange output when trying
the new shapefile methods. Attached is a ps file generated
using the new method (Which has an issue). I can provide
the shapefile (Major U.S. highways) as well.<br>
<br>
; THIS IS THE NEW METHOD WHICH PRODUCES STRANGE OUTPUT:<br>
plres = True ; resources for
polylines<br>
plres@gsLineColor = "gray25"<br>
plres@gsLineThicknessF = 3<br>
f = addfile(ncl_dir+"shapefiles/intrastate_shapefiles/intrstat.shp",
"r") ; Open shapefile<br>
plres@gsSegments = f->segments ;(:,0)<br>
poly0 = gsn_add_polyline(wks, plot, f->x, f->y,
plres)<br>
<br>
;<br>
; THIS OLD METHOD WORKS BUT IS VERY SLOW:<br>
; f = addfile(ncl_dir+"shapefiles/intrastate_shapefiles/intrstat.shp",
"r") ; Open shapefile<br>
; segments = f->segments<br>
; geometry = f->geometry<br>
; segsDims = dimsizes(segments)<br>
; geomDims = dimsizes(geometry)<br>
; geom_segIndex = f@geom_segIndex<br>
; geom_numSegs = f@geom_numSegs<br>
; segs_xyzIndex = f@segs_xyzIndex<br>
; segs_numPnts = f@segs_numPnts<br>
; numFeatures = geomDims(0)<br>
; lines = new(segsDims(0),graphic) ; array to hold
polylines<br>
<br>
; plres = True ; resources for
polylines<br>
; plres@gsLineColor = "gray25"<br>
; plres@gsLineThicknessF = 3<br>
<br>
; lon = f->x<br>
; lat = f->y<br>
; segNum = 0 ; Counter for adding polylines<br>
; do i=0, numFeatures-1<br>
; startSegment = geometry(i, geom_segIndex)<br>
; numSegments = geometry(i, geom_numSegs)<br>
; do seg=startSegment, startSegment+numSegments-1<br>
; startPT = segments(seg, segs_xyzIndex)<br>
; endPT = startPT + segments(seg, segs_numPnts) -
1<br>
; lines(segNum) = gsn_add_polyline(wks, plot,
lon(startPT:endPT), \<br>
; lat(startPT:endPT), plres)<br>
; segNum = segNum + 1<br>
; end do<br>
; end do<br>
;<br>
<br>
The full NCL script is attached. I can provide sample data
upon request (<a moz-do-not-send="true"
href="http://invariant_d01.nc" target="_blank">invariant_d01.nc</a>,
<a moz-do-not-send="true" href="http://wrftest.nc"
target="_blank">wrftest.nc</a> and the shapefile).<br>
<br>
Thank you,<br>
<br>
Scott<br>
<br>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a moz-do-not-send="true"
href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk"
target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>