<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:"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 http://www.ncl.ucar.edu/ 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 class="WordSection1"></div>
</div>
</div>
</div>
</body>
</html>