<div dir="ltr"><div><div>Enric,<br><br></div>That is very odd, given that you are running 6.3.0. It sounds like perhaps your $NCARG_ROOT is pointing to an older distribution. or that perhaps your installation is a combination of NCL versions. I can send you offline the gsn_code.ncl file from 6.3.0, although I have to wonder if other incompatibilities or incompleteness may surface. If that turns out to be the case, I'd recommend a clean install of 6.3.0.<br><br></div>Rick<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 30, 2016 at 9:29 AM, Agud Pique, Enric <span dir="ltr"><<a href="mailto:eagud.q@ccma.cat" target="_blank">eagud.q@ccma.cat</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Hello Rick<br>
<br>
When I type grep shapefile or shapefile_polyline $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl,<br>
<br>
I get nothing...an empty answer. The fle gsn_code.ncl exists but it doesn't contain "shapefile or shapefile_polyline"<br>
<br>
Enric<br>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma" size="2"><b>De:</b> Rick Brownrigg [<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>]<br>
<b>Enviat el:</b> diumenge, 26 / juny / 2016 16:02<br>
<b>Per a:</b> Agud Pique, Enric<br>
<b>A/c:</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
<b>Tema:</b> Re: [ncl-talk] about shapefiles<br>
</font><br>
</div><div><div class="h5">
<div></div>
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>Hi,<br>
<br>
</div>
That certainly looks correct, and I see you are running 6.3.0. What do you get if you run:<br>
<br>
</div>
grep shapefile_polyline $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl<br>
<br>
</div>
or just<br>
<br>
grep shapefile $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl<br>
<br>
<br>
<br>
</div>
Rick<br>
<br>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Jun 26, 2016 at 7:08 AM, Agud Pique, Enric <span dir="ltr">
<<a href="mailto:eagud.q@ccma.cat" target="_blank">eagud.q@ccma.cat</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="CA">
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hello,</span>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I have a problem with the following code. I can plot the variables Tc and the wind, but I get an error from the shapefile’s command. The error is...</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">[Enric@meteo4u em_real]$ ncl plot-shapefiles.ncl
<br>
Copyright (C) 1995-2015 - All Rights Reserved<br>
University Corporation for Atmospheric Research<br>
NCAR Command Language Version 6.3.0<br>
The use of this software is governed by a License Agreement.<br>
See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br>
fatal:Undefined identifier: (gsn_add_shapefile_polylines) is undefined, can't continue<br>
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 49 in file plot-shapefiles.ncl</span></p>
<p class="MsoNormal"><br>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Any idea?</span></p>
<p class="MsoNormal"><br>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Best</span></p>
<p class="MsoNormal"><br>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><br>
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New""> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">begin</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">a = addfile("./wrfout_d01_2016-06-26_18:00:00","r")</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">wks = gsn_open_wks("png","shapefiles")</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New""> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New""> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">T2 = wrf_user_getvar(a,"T2",0)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">Tc = T2-273</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">u10 = wrf_user_getvar(a,"U10",0) ; u at 10 m, mass point</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">v10 = wrf_user_getvar(a,"V10",0) ; v at 10 m, mass point</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">u10 = u10*1.94386 ; Turn wind into knots</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">v10 = v10*1.94386</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">u10@units = "kts"</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">v10@units = "kts"</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New""> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">res = True</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">pltres = True</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">mpres = True</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">;opts = True</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New""> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">opts = res</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">opts@cnFillOn = True</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">opts@cnLevelSelectionMode = "ExplicitLevels"</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">opts@cnLevels =(/ -10, -5,0,5,10,15,20,25,30,35,40/)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">opts@cnFillColors =(/"Blue","DarkOliveGreen1", \</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New""> "DarkOliveGreen3","Chartreuse", \</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New""> "Chartreuse3","Green","ForestGreen", \</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New""> "Yellow","Orange","Red","Violet"/)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">contour_t2 = wrf_contour(a,wks,Tc,opts)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">delete(opts)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New""> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New""> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">; Plotting options for Wind Vectors
</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New""> opts = res
</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New""> opts@NumVectors = 47 ; density of wind barbs</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">vector = wrf_vector(a,wks,u10,v10,opts)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">delete(opts)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">
</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">plot = wrf_map_overlays(a,wks,(/contour_t2,vector/),pltres ,mpres)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New""> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">shp_name = "/home/Enric/Fronteres/FEsp/ESP_adm2.shp"</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">lnres = True</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">lnres@gsLineColor = "gray25"</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">lnres@gsLineThicknessF = 0.5</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New""> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">spain_id = gsn_add_shapefile_polylines(wks,plot,shp_name,lnres)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">draw(plot)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">frame(wks)</span></p>
<span style="font-size:11.0pt;font-family:"Courier New"">end</span><span style="font-size:11.0pt;font-family:"Courier New""></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"></span>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<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></div></div>
</div>
</div>
</blockquote></div><br></div>