<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style>
<!--
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
p
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif"}
span.EstilCorreuElectrnic18
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
span.EstilCorreuElectrnic19
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
span.EstilCorreuElectrnic20
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
span.TextdeglobusCar
        {font-family:"Tahoma","sans-serif"}
span.EstilCorreuElectrnic23
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
.MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:70.85pt 3.0cm 70.85pt 3.0cm}
-->
</style><style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1" lang="CA" link="blue" vlink="purple">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">Hello,</span>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">I have a problem with the following code. I can plot the variables Tc and the wind, but&nbsp; 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:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">[Enric@meteo4u em_real]$ ncl plot-shapefiles.ncl
<br>
&nbsp;Copyright (C) 1995-2015 - All Rights Reserved<br>
&nbsp;University Corporation for Atmospheric Research<br>
&nbsp;NCAR Command Language Version 6.3.0<br>
&nbsp;The use of this software is governed by a License Agreement.<br>
&nbsp;See http://www.ncl.ucar.edu/ for more details.<br>
fatal:Undefined identifier: (gsn_add_shapefile_polylines) is undefined, can't continue<br>
fatal:[&quot;Execute.c&quot;: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:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">Any idea?</span></p>
<p class="MsoNormal"><br>
<span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">Best</span></p>
<p class="MsoNormal"><br>
<span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D"><br>
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">&nbsp;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl&quot;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">&nbsp;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">begin</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">a = addfile(&quot;./wrfout_d01_2016-06-26_18:00:00&quot;,&quot;r&quot;)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">wks = gsn_open_wks(&quot;png&quot;,&quot;shapefiles&quot;)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">&nbsp;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">&nbsp;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">T2 = wrf_user_getvar(a,&quot;T2&quot;,0)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">Tc = T2-273</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">u10 = wrf_user_getvar(a,&quot;U10&quot;,0)&nbsp;&nbsp;&nbsp; ; u at 10 m, mass point</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">v10 = wrf_user_getvar(a,&quot;V10&quot;,0)&nbsp;&nbsp;&nbsp; ; v at 10 m, mass point</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">u10 = u10*1.94386&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Turn wind into knots</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">v10 = v10*1.94386</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">u10@units = &quot;kts&quot;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">v10@units = &quot;kts&quot;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">&nbsp;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">res = True</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">pltres = True</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">mpres = True</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">;opts = True</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">&nbsp;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">opts = res</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">opts@cnFillOn = True</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">opts@cnLevelSelectionMode = &quot;ExplicitLevels&quot;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">opts@cnLevels&nbsp;&nbsp; =(/ -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:&quot;Courier New&quot;">opts@cnFillColors =(/&quot;Blue&quot;,&quot;DarkOliveGreen1&quot;, \</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;DarkOliveGreen3&quot;,&quot;Chartreuse&quot;, \</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Chartreuse3&quot;,&quot;Green&quot;,&quot;ForestGreen&quot;, \</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Yellow&quot;,&quot;Orange&quot;,&quot;Red&quot;,&quot;Violet&quot;/)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">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:&quot;Courier New&quot;">delete(opts)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">&nbsp;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">&nbsp;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">; Plotting options for Wind Vectors&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">&nbsp;opts = res&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">&nbsp;opts@NumVectors = 47&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; density of wind barbs</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">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:&quot;Courier New&quot;">delete(opts)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">&nbsp;
</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">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:&quot;Courier New&quot;">&nbsp;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">shp_name = &quot;/home/Enric/Fronteres/FEsp/ESP_adm2.shp&quot;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">lnres = True</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">lnres@gsLineColor = &quot;gray25&quot;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">lnres@gsLineThicknessF = 0.5</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">&nbsp;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">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:&quot;Courier New&quot;">draw(plot)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">frame(wks)</span></p>
<span style="font-size:11.0pt; font-family:&quot;Courier New&quot;">end</span><span style="font-size:11.0pt; font-family:&quot;Courier New&quot;"></span><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D"></span>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<div>
<div class="WordSection1"></div>
</div>
</div>
</div>
</body>
</html>