<div dir="ltr"><div>Thank you, Guilherme and Bill! I tried using both 6.3.0 and 6.4.0, and both created the error. Then, I checked in my .cshrc file and realized I hadn't updated by $NCARG_ROOT from 6.3.0 to 6.4.0 (I had updated everything else.) It works now using 6.4.0. It looks like it was a bug in 6.3.0.<br><br></div><div>Sorry for my mistake.<br></div><div><br></div>Joe<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 13, 2017 at 9:48 AM, Bill Ladwig <span dir="ltr"><<a href="mailto:ladwig@ucar.edu" target="_blank">ladwig@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">Hi Joe,<div><br></div><div>I think we're going to need to look at your script, because this works for me (NCL 6.4.0):</div><div><br></div><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_-1766671972559995209gmail-s1">ncl 1> uv = wind_component(17., 180., 0)<br></span><span class="m_-1766671972559995209gmail-s1">ncl 2> print (uv)</span><br><br><span class="m_-1766671972559995209gmail-s1">Variable: uv<br></span><span class="m_-1766671972559995209gmail-s1">Type: float<br></span><span class="m_-1766671972559995209gmail-s1">Total Size: 8 bytes<br></span><span class="m_-1766671972559995209gmail-s1"> 2 values<br></span><span class="m_-1766671972559995209gmail-s1">Number of Dimensions: 2<br></span><span class="m_-1766671972559995209gmail-s1">Dimensions and sizes: [uv | 2] x [1]<br></span><span class="m_-1766671972559995209gmail-s1">Coordinates: <br></span><span class="m_-1766671972559995209gmail-s1">Number Of Attributes: 1<br></span><span class="m_-1766671972559995209gmail-s1"> long_name : zonal [0] and meridional [1] wind components<br></span><span class="m_-1766671972559995209gmail-s1">(0,0) 0<br></span><span class="m_-1766671972559995209gmail-s1">(1,0) 17</span></blockquote><div><br></div><div>If you're able to run the code above via the NCL interpreter, then you should do a printVarSummary on the variables that you are passing to 'wind_component' to make sure it is what you think it is. If the code snippet above fails for you, what version of NCL are you using?</div><div><br></div><div>Regards,</div><div><br></div><div>Bill</div>
<p class="m_-1766671972559995209gmail-p2"><span class="m_-1766671972559995209gmail-s1"></span></p>
<p class="m_-1766671972559995209gmail-p2"><span class="m_-1766671972559995209gmail-s1"></span></p>
</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Thu, Jul 13, 2017 at 8:47 AM, Joe Grim <span dir="ltr"><<a href="mailto:grim@ucar.edu" target="_blank">grim@ucar.edu</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 class="h5"><div dir="ltr"><div><div><div><div>Hi,<br><br></div>When I try to use the valuable function "wind_component" with single values (e.g., uv = wind_component(17.0,180.,0)), I get the following error message:<br>fatal:Number of subscripts (1) and number of dimensions (2) do not match for variable (uv)<br>fatal:["Execute.c":8575]:Execu<wbr>te: Error occurred at or near line 1279 in file /usr/local/ncl/lib/ncarg/nclsc<wbr>ripts/csm/contributed.ncl<br><br>fatal:["Execute.c":8575]:Execu<wbr>te: Error occurred at or near line 4 in file temp.ncl<br><br></div>It looks like it expects "wspd" and "wdir" to have at least two elements in both arrays. I know how to program around this, but was wondering if the intention for this function was to also deal with single values for wspd and wdir?<br><br></div>Thanks!<span class="m_-1766671972559995209HOEnZb"><font color="#888888"><br><br></font></span></div><span class="m_-1766671972559995209HOEnZb"><font color="#888888">Joe<br></font></span></div>
<br></div></div><span class="">______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></span></blockquote></div><br></div>
</blockquote></div><br></div>