<div dir="ltr"><div><span>Since name_n1 and name_n2 are variables of type string, you must use additional syntax<br><br></span></div><span>Change  <br><br></span><div><div><span>   &gt; VAR&amp;name_n1 = Var_n1</span>
<p><span>   &gt; VAR&amp;name_n2 = Var_n2</span></p><p><br><span></span></p><p><span>To</span></p><p><span>   &gt; VAR&amp;$name_n1$ = Var_n1</span>
</p><p><span>   &gt; VAR&amp;$name_n2$ = Var_n2</span></p><p>==</p><p><a href="http://www.ncl.ucar.edu/Document/Manuals/language_man.pdf">http://www.ncl.ucar.edu/Document/Manuals/language_man.pdf</a></p><p>See section 3.1.3:  When to use the $ syntax<br></p><p><br><span></span></p><p><span><br></span></p><p><br><span></span></p><p><span><br></span></p></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 6, 2016 at 6:50 AM, Zhuxiao Li <span dir="ltr">&lt;<a href="mailto:zhuxiao.li@spire.com" target="_blank">zhuxiao.li@spire.com</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"><div>Hi there,</div><div><br></div><div>I am trying to name the variable dimensions(1,2) with the string variables (name_n1, name_n2) with the following NCL code:</div><div>







<p><span>   &gt; VAR!0 = &quot;time&quot;</span></p>
<p><span>   &gt; VAR!1 = name_n1</span></p><p>   &gt; VAR!2 = name_n2</p>
<p><span>   &gt; time = ispan(0,nh,1)          </span></p>
<p><span>   &gt; VAR&amp;time = time</span></p><p><span>   &gt; ; exit               </span></p>
<p><span>   &gt; VAR&amp;name_n1 = Var_n1</span></p>
<p><span>   &gt; VAR&amp;name_n2 = Var_n2</span></p>
<p><span>   &gt; printVarSummary(VAR)</span></p>
<p><span>   &gt;  ; exit</span></p></div><div> Have got the following error message:</div><div>







<p><span>&gt;fatal:(name_n1) is not a named dimension in variable (VAR).</span></p></div><div>I bet this error message due to the quotation sign of the string variable in &#39;VAR&amp;name_n1 = Var_n1&#39; ? Could you help me to solve this problem?</div><div><br></div><div>Thanks very much in advance!</div><div>Jasmine </div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><br clear="all"><div><br></div>-- <br><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><p style="font-size:12.8px;margin-top:0px;margin-bottom:0px"><b>Zhuxiao Li</b></p><p style="font-size:12.8px;margin-top:0px;margin-bottom:0px"><font color="#000000">Numerical Modeling Prediction</font></p><div style="font-size:12.8px"></div><p style="font-size:12.8px;margin-top:0px;margin-bottom:0px"><b style="font-size:12.8px"><font color="#cc0000">Spire Global, Inc.</font></b><br></p><p style="font-size:12.8px;margin-top:0px;margin-bottom:0px"><span style="font-size:12.8px">1320 Pearl Street, Suite 210, Boulder, CO 80302 USA</span></p><p style="font-size:12.8px;margin-top:0px;margin-bottom:0px"><span style="background-color:rgba(255,255,255,0)"><font style="font-size:12.8px" color="#0b5394"><u><a href="tel:%2B1-415-356-3400x379" value="+14153563400" target="_blank">+1-415-356-3400x379</a></u></font></span></p><p style="font-size:12.8px;margin-top:0px;margin-bottom:0px"><span style="background-color:rgba(255,255,255,0)"><font color="#0b5394"><u><a href="tel:%2B1-303-359-0495" value="+13033590495" target="_blank">+1-303-359-0495</a></u></font></span></p></div></div></div></div></div>
</div>
</blockquote></div><br></div>