<div dir="ltr">Hi Yohan,<div>Actually your data does have NaNs at two identical locations in both the U and V data files:</div><div><br></div><div><div>ncl 19&gt; var1 = f1-&gt;va850_dtrend_Mean</div><div>ncl 20&gt; print(var1(84,127))</div>
<div><br></div><div><br></div><div>Variable: var1 (subsection)</div><div>Type: float</div><div>Total Size: 4 bytes</div><div>            1 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes:   [1]</div>
<div>Coordinates:</div><div>Number Of Attributes: 4</div><div>  lon : 318.75</div><div>  lat : 79.88764</div><div>  average_op_ncl :      dim_avg_n over dimension(s): time</div><div>  _FillValue :  -1e+10</div><div>(0)     nan</div>
<div>ncl 21&gt; print(var1(63,18))</div><div><br></div><div><br></div><div>Variable: var1 (subsection)</div><div>Type: float</div><div>Total Size: 4 bytes</div><div>            1 values</div><div>Number of Dimensions: 1</div>
<div>Dimensions and sizes:   [1]</div><div>Coordinates:</div><div>Number Of Attributes: 4</div><div>  lon : 46.25</div><div>  lat : 37.41573</div><div>  average_op_ncl :      dim_avg_n over dimension(s): time</div><div>  _FillValue :  -1e+10</div>
<div>(0)     nan</div></div><div><br></div><div>CurlyVector drawing is more sensitive than ordinary vector drawing to the presence of NaNs because more than one grid point is involved in producing each glyph. NCL graphics are not documented to be NaN-proof, so you need to remove all the NaNs prior to calling any graphics routines.<br>
</div><div>It is easily done using replace_nanieee:</div><div><br></div><div><div>  var1    = f1-&gt;$varname1$</div><div>  var2    = f2-&gt;$varname2$</div><div>  replace_ieeenan(var1,var1@_FillValue,0)<br></div><div>  replace_ieeenan(var2,var2@_FillValue,0)</div>
</div><div><div>  lat     = f1-&gt;$&quot;lat&quot;$</div><div>  lon     = f1-&gt;$&quot;lon&quot;$</div></div><div><br></div><div>Your script works fine in CurlyVector mode after adding the replace_ieeenan lines.</div><div>
 -dave</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 11, 2014 at 11:25 AM, David Brown <span dir="ltr">&lt;<a href="mailto:dbrown@ucar.edu" target="_blank">dbrown@ucar.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Yohan,<div><br></div><div>I have reproduced the seg fault with your script and data. I&#39;ll let you know what the problem is as soon as I figure it out.</div>
<div> -dave</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Aug 8, 2014 at 12:22 PM,  <span dir="ltr">&lt;<a href="mailto:ruprich@cerfacs.fr" target="_blank">ruprich@cerfacs.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Dave,<br>
<br>
I put my u and v component files on the ftp site. Their name are:<br>
<a href="http://CM2.1_DJFM_501_4000_ua850_dtrend_Mean.nc" target="_blank">CM2.1_DJFM_501_4000_ua850_dtrend_Mean.nc</a><br>
<a href="http://CM2.1_DJFM_501_4000_va850_dtrend_Mean.nc" target="_blank">CM2.1_DJFM_501_4000_va850_dtrend_Mean.nc</a><br>
<br>
And please see attached my simplify script that target the problem, or you<br>
can find it on the ftp site as well:<br>
Plot_Clim_Test_For_Dave.ncl<br>
<br>
Many thanks,<br>
Yohan<br>
<div><div><br>
&gt; Well as I said, I would like to run your script here. There should not be<br>
&gt; a<br>
&gt; seg fault, so there must be a bug somewhere that I would like to fix. So<br>
&gt; if<br>
&gt; you can upload your data and script to the ftp site as described in the<br>
&gt; bug<br>
&gt; report page, I would appreciate it. I am going to be off work for the rest<br>
&gt; of this week, but I will take a look at this first thing next Monday if I<br>
&gt; have the files.<br>
&gt;  -dave<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Aug 6, 2014 at 7:09 PM, &lt;<a href="mailto:ruprich@cerfacs.fr" target="_blank">ruprich@cerfacs.fr</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Hi Dave,<br>
&gt;&gt;<br>
&gt;&gt; thank you for your answer.<br>
&gt;&gt;<br>
&gt;&gt; Actually, my data look fine. I already ploted the u and v components<br>
&gt;&gt; with<br>
&gt;&gt; ferret to verify it and I also print the Min and Max of those components<br>
&gt;&gt; with NCL and everything look normal.<br>
&gt;&gt; When I run the same script with the standard option &quot;LineArrow&quot; of the<br>
&gt;&gt; vcGlyphStyle resource my script works and I obtain a nice plot with<br>
&gt;&gt; westerlies and esterlies at good places. An excpetion should be note at<br>
&gt;&gt; the longitude 0 where vectors seem to overlap each other.<br>
&gt;&gt; But, if I switch the vcGlyphStyle option to &quot;CurlyVector&quot;, it leads to a<br>
&gt;&gt; segmentation fault.<br>
&gt;&gt;<br>
&gt;&gt; Also, I tried to plot it with a different approach, using the SfXArray<br>
&gt;&gt; and<br>
&gt;&gt; SfYArray resources. Again, I obtain good results when I run my script<br>
&gt;&gt; with<br>
&gt;&gt; the standard vcGlyphStyle option but a segmentation fault when I use the<br>
&gt;&gt; &quot;CurlyVector&quot; option.<br>
&gt;&gt;<br>
&gt;&gt; Many thanks,<br>
&gt;&gt; Yohan<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; &gt; Hi Yohan,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I would first want to make sure your data is valid: try printing the<br>
&gt;&gt; max<br>
&gt;&gt; &gt; and min of each variable. Also make sure that there are no NaN values<br>
&gt;&gt; in<br>
&gt;&gt; &gt; the data. You can use isnan_ieee to discover whether there are NaNs in<br>
&gt;&gt; the<br>
&gt;&gt; &gt; data. If the data seems okay, then I would like to take a look at your<br>
&gt;&gt; &gt; complete script along with the data. Please look at &quot;Report bugs&quot;<br>
&gt;&gt; under<br>
&gt;&gt; &gt; the &quot;Support&quot; tab on the NCL web site. Let me know offline when you<br>
&gt;&gt; have<br>
&gt;&gt; &gt; uploaded the relevant files. Thank you.<br>
&gt;&gt; &gt;  -dave<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Wed, Aug 6, 2014 at 5:33 PM, &lt;<a href="mailto:ruprich@cerfacs.fr" target="_blank">ruprich@cerfacs.fr</a>&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; Dear NCL users,<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I have some problem using the vcGlyphStyle resource. When I chose the<br>
&gt;&gt; &gt;&gt; option &quot;CurlyVector&quot;, my script leads to a Segmentation fault.<br>
&gt;&gt; &gt;&gt; Do you know any reason for that?<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Here is some pieces of my script:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; 1) I load 2 variables:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;   Variable: var1<br>
&gt;&gt; &gt;&gt;   Type: float<br>
&gt;&gt; &gt;&gt;   Total Size: 51840 bytes<br>
&gt;&gt; &gt;&gt;               12960 values<br>
&gt;&gt; &gt;&gt;   Number of Dimensions: 2<br>
&gt;&gt; &gt;&gt;   Dimensions and sizes:   [lat | 90] x [lon | 144]<br>
&gt;&gt; &gt;&gt;   Coordinates:<br>
&gt;&gt; &gt;&gt;               lat: [-89.49438..89.49438]<br>
&gt;&gt; &gt;&gt;               lon: [1.25..358.75]<br>
&gt;&gt; &gt;&gt;   Number Of Attributes: 2<br>
&gt;&gt; &gt;&gt;     _FillValue :  -1e+10<br>
&gt;&gt; &gt;&gt;     average_op_ncl :      dim_avg_n over dimension(s): time<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;   Variable: var2<br>
&gt;&gt; &gt;&gt;   Type: float<br>
&gt;&gt; &gt;&gt;   Total Size: 51840 bytes<br>
&gt;&gt; &gt;&gt;               12960 values<br>
&gt;&gt; &gt;&gt;   Number of Dimensions: 2<br>
&gt;&gt; &gt;&gt;   Dimensions and sizes:   [lat | 90] x [lon | 144]<br>
&gt;&gt; &gt;&gt;   Coordinates:<br>
&gt;&gt; &gt;&gt;               lat: [-89.49438..89.49438]<br>
&gt;&gt; &gt;&gt;               lon: [1.25..358.75]<br>
&gt;&gt; &gt;&gt;   Number Of Attributes: 2<br>
&gt;&gt; &gt;&gt;     _FillValue :  -1e+10<br>
&gt;&gt; &gt;&gt;     average_op_ncl :      dim_avg_n over dimension(s): time<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; 2) I define the resources for my plot:<br>
&gt;&gt; &gt;&gt;   res                         = True<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;   res@gsnDraw                 = False              ; don&#39;t draw<br>
&gt;&gt; &gt;&gt;   res@gsnFrame                = False              ; don&#39;t advance<br>
&gt;&gt; frame<br>
&gt;&gt; &gt;&gt;   res@gsnAddCyclic            = True<br>
&gt;&gt; &gt;&gt;   res@vcGlyphStyle            = &quot;CurlyVector&quot;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; 3) I plot:<br>
&gt;&gt; &gt;&gt;   wks     = gsn_open_wks(pltTypeLocal, plotDir+plotName)<br>
&gt;&gt; &gt;&gt;   plot    = new(1, &quot;graphic&quot;)<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;   plot(0) = gsn_csm_vector_map(wks, var1, var2, res)<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;   draw(wks)<br>
&gt;&gt; &gt;&gt;   frame(wks)<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; That&#39;s pretty much it... And if I run this script without the<br>
&gt;&gt; &gt;&gt; &quot;CurlyVector&quot; option it works.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Than you,<br>
&gt;&gt; &gt;&gt; Yohan<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; PS: I am running this script with the 6.1.2 ncl version<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; ncl-talk mailing list<br>
&gt;&gt; &gt;&gt; List instructions, subscriber options, unsubscribe:<br>
&gt;&gt; &gt;&gt; <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>