<div dir="ltr">Nice! :-)<div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">Em qui, 13 de jul de 2017 às 12:56, Joe Grim <<a href="mailto:grim@ucar.edu">grim@ucar.edu</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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><div dir="ltr"><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_1521884399967480348m_-1766671972559995209gmail-s1">ncl 1> uv = wind_component(17., 180., 0)<br></span><span class="m_1521884399967480348m_-1766671972559995209gmail-s1">ncl 2> print (uv)</span><br><br><span class="m_1521884399967480348m_-1766671972559995209gmail-s1">Variable: uv<br></span><span class="m_1521884399967480348m_-1766671972559995209gmail-s1">Type: float<br></span><span class="m_1521884399967480348m_-1766671972559995209gmail-s1">Total Size: 8 bytes<br></span><span class="m_1521884399967480348m_-1766671972559995209gmail-s1"> 2 values<br></span><span class="m_1521884399967480348m_-1766671972559995209gmail-s1">Number of Dimensions: 2<br></span><span class="m_1521884399967480348m_-1766671972559995209gmail-s1">Dimensions and sizes: [uv | 2] x [1]<br></span><span class="m_1521884399967480348m_-1766671972559995209gmail-s1">Coordinates: <br></span><span class="m_1521884399967480348m_-1766671972559995209gmail-s1">Number Of Attributes: 1<br></span><span class="m_1521884399967480348m_-1766671972559995209gmail-s1"> long_name : zonal [0] and meridional [1] wind components<br></span><span class="m_1521884399967480348m_-1766671972559995209gmail-s1">(0,0) 0<br></span><span class="m_1521884399967480348m_-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_1521884399967480348m_-1766671972559995209gmail-p2"><span class="m_1521884399967480348m_-1766671972559995209gmail-s1"></span></p>
<p class="m_1521884399967480348m_-1766671972559995209gmail-p2"><span class="m_1521884399967480348m_-1766671972559995209gmail-s1"></span></p>
</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_1521884399967480348h5">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="m_1521884399967480348h5"><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]:Execute: Error occurred at or near line 1279 in file /usr/local/ncl/lib/ncarg/nclscripts/csm/contributed.ncl<br><br>fatal:["Execute.c":8575]:Execute: 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_1521884399967480348m_-1766671972559995209HOEnZb"><font color="#888888"><br><br></font></span></div><span class="m_1521884399967480348m_-1766671972559995209HOEnZb"><font color="#888888">Joe<br></font></span></div>
<br></div></div><span>_______________________________________________<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></span></blockquote></div><br></div>
</blockquote></div><br></div>
</blockquote></div><div dir="ltr">-- <br></div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>------------------------------------------------------------------------------------------------</div><div><div>Instituto Nacional de Pesquisas Espaciais (INPE)<br></div><div>Centro de Previsão de Tempo e Estudos Climáticos (CPTEC)</div><div>Divisão de Satélites e Sistemas Ambientais (DSA)</div><div>Programa de Monitoramento de Queimadas</div><div>Telefone (INPE/CP): +55 12 3186-9205 || Celular (TIM): +55 12 98111-4292</div><div>E-mail: <a href="mailto:guilherme.martins@inpe.br">guilherme.martins@inpe.br</a> || <a href="mailto:jgmsantos@gmail.com">jgmsantos@gmail.com</a></div><div>Skype: guilherme.martins.</div><div>Homepage: <a href="https://sites.google.com/site/jgmsantos">https://sites.google.com/site/jgmsantos</a></div><div>Currículo Lattes: <a href="http://lattes.cnpq.br/5997657584785803">http://lattes.cnpq.br/5997657584785803</a></div></div><div><span style="font-family:"helvetica neue",helvetica,arial,sans-serif">------------------------------------------------------------------------------------------------</span><br></div></div></div>