<div dir="ltr">Thank you Rick and Mary,<div><br></div><div>Yes, I think the pathname was the original error. I am able to open the file interactively using the commands that Rick sent. When I tried that, I didn't get any error messages while interactively running NCL.</div><div><br></div><div>Mary, thanks for running it and sending the png file! However, I'm still not able to reproduce that image and continue to get the following error:</div><div><br></div><div>
<p><span>(0)<span>        </span>Error: gsn_add_shapefile_polylines: Can't open shapefile '/home/matt.flournoy/PECAN/overview/July06/new_shp/south-dakota_shps/roads.shp'</span></p>
<p><span>(0)<span>        </span> No shapefile information will be added.</span></p><p><span>Here's the exact script that I'm using now:</span></p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 3, 2016 at 2:22 PM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Matt,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Rick is out for a few days, so I'll try to help.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You didn't indicate what the new problem was, but it looks to me like your code is working now. I had to replace the "USA_adms2.shp" with "USA_adm2.shp", and then I turned off NCL's map outlines so the plot was cleaner.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Since you provided the south-dakota shapefiles, I went ahead and added these, using the script you provided earlier. It's important to use a unique variable name every time you call gsn_add_shapefile_polyline.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I drew the USA outlines in blue, and SD roads in red so you could see the difference.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">See attached.</div><span class="HOEnZb"><font color="#888888"><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 3, 2016 at 10:52 AM, Matt Flournoy <span dir="ltr"><<a href="mailto:mflournoy37@gmail.com" target="_blank">mflournoy37@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Rick,<div><br></div><div>The path may have been the original issue and why I wasn't getting a file extension error, because NCL couldn't find the file in the first place. So that's relatively embarrassing. But now I'm sure I have the correct path. I've attached the shapefiles that I'm using. USA_adm_shp.zip contains the shapefiles with USA county borders, and south-dakota-latest.shp.zip contains shapefiles with South Dakota road networks.</div><div><br></div><div>Thanks,</div><div>Matt<div class="gmail_chip gmail_drive_chip" style="width:396px;min-height:18px;max-height:18px;padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1;background-color:rgb(245,245,245)"><a href="https://drive.google.com/file/d/0BxjU3NJc2C4dTFVBMWowREw4LVU/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">USA_adm_shp.zip</span></a><img style="float:right"></div><div class="gmail_chip gmail_drive_chip" style="width:396px;min-height:18px;max-height:18px;padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1;background-color:rgb(245,245,245)"><a href="https://drive.google.com/file/d/0BxjU3NJc2C4dTFg1SFZTT2c3UXM/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">south-dakota-latest.shp.zip</span></a><img style="float:right"></div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 3, 2016 at 9:05 AM, Rick Brownrigg <span dir="ltr"><<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">That's odd -- what has changed to now introduce the file-extension error? In any case, are you able to send me the shapefiles in question so that I can check it out -- perhaps they are corrupt or something?<br><br><br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 3, 2016 at 7:18 AM, Matt Flournoy <span dir="ltr"><<a href="mailto:mflournoy37@gmail.com" target="_blank">mflournoy37@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Rick,<div><br></div><div>Thanks! I'm absolutely sure it's the correct path, and I now get a file extension error as well:</div><div><br></div><div>---</div><div>
<p><span>fatal:["FileSupport.c":4159]:(/home/matt.flournoy/PECAN/overview/July06/new_shp/USA_county_shps/USA_adms2.shp) has no file extension, can't determine type of file to open</span></p>
<p><span>(0)<span>        </span>Error: gsn_add_shapefile_polylines: Can't open shapefile '/home/matt.flournoy/PECAN/overview/July06/new_shp/USA_county_shps/USA_adms2.shp'</span></p><span>
<p><span>(0)<span>        </span> No shapefile information will be added.</span></p></span><p><span>---</span></p><p>The .shp, .shx, and .dbf files are all in the same directory (.../USA_county_shps/), and all of them have the "USA_adm2" prefix.</p><p>Thanks,</p><p>Matt</p></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 2, 2016 at 4:29 PM, Rick Brownrigg <span dir="ltr"><<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Matt,<br><br></div>The error says "...can't open shapefile...", so I'm not sure its a projection issue. Are you absolutely positive you've got the correct path? And you have the requisite 3 files at that path -- the .shp, the .shx, and the .dbf file, all with the same "<span>USA_adm2" prefix.<br><br></span></div><span>Rick<br></span></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Thu, Jun 2, 2016 at 2:56 PM, Matt Flournoy <span dir="ltr"><<a href="mailto:mflournoy37@gmail.com" target="_blank">mflournoy37@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi Kacie!!<div><br></div><div>Thanks for the suggestions. I tried gsn_add_shapefile_polygons, but got the same error as when I used polylines. I'm not sure how to check the map projections for the shapefiles, but I'll look into that.</div><div><br></div><div>Thanks!</div><span><font color="#888888"><div>Matt</div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 2, 2016 at 3:37 PM, Kacie Shourd <span dir="ltr"><<a href="mailto:Kacie.Shourd@dri.edu" target="_blank">Kacie.Shourd@dri.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hi Matty (<3),<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I’ve never plotted shapefiles in NCL before, so bear with me. Looking at your code, I would suggest you try using gsn_add_shapefile_polygons like you use gsn_add_shapefile_polylines.
Similar to how you are attempting to add the road polylines, try to add the polygons in this way as well?? The map you are calling in the create_SD_map function you have defined doesn’t draw these as far as I can tell.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Another thing to check would be that your map projections are matching between the shapefiles and the map you have called using NCL.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hopefully this helps, or someone else can guide you further.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Best,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Kacie
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">---<u></u><u></u></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Courier New";color:black">Kacie N. Shourd</span><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222"><u></u><u></u></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Malgun Gothic",sans-serif;color:black">드림</span><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222"><u></u><u></u></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222"><u></u> <u></u></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Courier New";color:#222222">Graduate Research Assistant</span><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222"><u></u><u></u></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Courier New";color:#222222">Desert Research Institute</span><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222"><u></u><u></u></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Courier New";color:#222222"><a href="mailto:Kacie.Shourd@dri.edu" target="_blank">Kacie.Shourd@dri.edu</a></span><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222"><u></u><u></u></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Courier New";color:#222222">Work: <a href="tel:%28775%29%20674-7049" value="+17756747049" target="_blank">(775) 674-7049</a></span><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a> [mailto:<a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a>]
<b>On Behalf Of </b>Matt Flournoy<br>
<b>Sent:</b> Thursday, June 02, 2016 12:59 PM<br>
<b>To:</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
<b>Subject:</b> [ncl-talk] shapefile woes<u></u><u></u></span></p><div><div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hi all,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I'm trying to plot a simple map of a few counties and roads in South Dakota using NCL 6.3.0. To do this, I've downloaded USA county shapefiles (from "<a href="http://www.gadm.org/country" target="_blank">http://www.gadm.org/country</a>") and SD road network
shapefiles (from "<a href="http://download.geofabrik.de/north-america.html" target="_blank">http://download.geofabrik.de/north-america.html</a>"). Then, I use gsn_add_shapefile_polylines to add the USA counties to an existing map in my code, but I get this error message:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">(0) Error: gsn_add_shapefile_polylines: Can't open shapefile '/home/matt.flournoy/PECAN/overview/July06/new_shp/USA_adm_shp/USA_adm2.shp'<u></u><u></u></p>
<p class="MsoNormal">(0) No shapefile information will be added.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I get the same error if I try inputing the road network shapefile, except that the directory in the first error message is the directory where the road network shapefile is. The
map is plotted when I run the code, but the shapefile information is not on them.<u></u><u></u></p>
<p class="MsoNormal">Does anyone know what may be causing this issue? I've attached the code that I'm using, which is very similar to the NCL example online about reading in USA county shapefiles from
the same site as above.<u></u><u></u></p>
<p class="MsoNormal">Thank you,<u></u><u></u></p>
<p class="MsoNormal">Matt<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Matthew Flournoy<u></u><u></u></p>
<div>
<p class="MsoNormal">M.S. Meteorology Student, University of Oklahoma<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">B.S. Meteorology, Penn State University<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></div>
<br>
<font face="Arial" size="2">PUBLIC RECORDS NOTICE: In accordance with NRS Chapter 239, this email and responses, unless otherwise made confidential by law, may be subject to the Nevada Public Records laws and may be disclosed to the public upon request.</font>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Matthew Flournoy<div>M.S. Meteorology Student, University of Oklahoma</div><div>B.S. Meteorology, Penn State University</div></div></div></div></div>
</div>
</div></div><br></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Matthew Flournoy<div>M.S. Meteorology Student, University of Oklahoma</div><div>B.S. Meteorology, Penn State University</div></div></div></div></div>
</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Matthew Flournoy<div>M.S. Meteorology Student, University of Oklahoma</div><div>B.S. Meteorology, Penn State University</div></div></div></div></div>
</div>
</div></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Matthew Flournoy<div>M.S. Meteorology Student, University of Oklahoma</div><div>B.S. Meteorology, Penn State University</div></div></div></div></div>
</div>