<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Laura,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">There is definitely an issue with the minus sign in the variable name.  If you do something like this:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">var = f-><span style="color:rgb(0,0,0);font-size:12px;font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">lwp37_mid-high_daynight_mon</span></font></div><br>then NCL thinks you are trying to read "lwp37_mid" off the file and subtract the variable "high_daynight_mon" from it.<br><br>To work around this, enclose the variable name in $"..."$:<div class="gmail_default" style="font-size:small"><font face="monospace, monospace"><span style="color:rgb(0,0,0);font-size:12px;font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace"><span style="color:rgb(0,0,0);font-size:12px;font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="color:rgb(34,34,34);font-size:small;font-variant-ligatures:normal;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">var = f->$"</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">lwp37_mid-high_daynight_mon"$</span></span></font></div><br>You can also do this:<div><br><div class="gmail_default" style=""><font color="#000000" face="monospace, monospace"><span style="font-size:12px;font-variant-ligatures:no-common-ligatures">varname = <span style="text-decoration-style:initial;text-decoration-color:initial;color:rgb(34,34,34);font-size:small;font-variant-ligatures:normal;float:none;display:inline">"</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">lwp37_mid-high_daynight_mon"</span></span></font></div><div class="gmail_default" style=""><font color="#000000" face="monospace, monospace"><span style="font-size:12px;font-variant-ligatures:no-common-ligatures"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><div class="gmail_default" style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-variant-ligatures:normal;text-decoration-style:initial;text-decoration-color:initial"><font face="monospace, monospace"><span style="color:rgb(0,0,0);font-size:12px;font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="color:rgb(34,34,34);font-size:small;font-variant-ligatures:normal;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">var = f->$varname</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">$</span></span></font></div></span></span></font></div><br>--Mary<div class="gmail_default" style="font-size:small"><font face="monospace, monospace"><span style="color:rgb(0,0,0);font-size:12px;font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br class="gmail-Apple-interchange-newline"><br></span></font></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 23, 2018 at 9:04 PM, Laura Fowler <span dir="ltr"><<a href="mailto:laura@ucar.edu" target="_blank">laura@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">Hello:<div><br></div><div>I am trying to read two variables in a NetCDF file. One is named  "<span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Courier;font-size:12px">lwp37_high_daynight_mon" and I do not have any issue to read it.</span></div><div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Courier;font-size:12px"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Courier;font-size:12px">The other one is named "</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Courier;font-size:12px">lwp37_mid-high_daynight_mon" for which ncl (6.4.0) an error message. I do not have any issue using ncdump with this variable. Does ncl has an issue reading variable that a name with a mix of "_" and "-" sign.</span></div><div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Courier;font-size:12px"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Courier;font-size:12px">This is the only thing I can think of.</span></div><div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Courier;font-size:12px"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Courier;font-size:12px">Many thanks,</span></div><div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Courier;font-size:12px">Laura</span></div><span class="HOEnZb"><font color="#888888"><div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Courier;font-size:12px"><br></span></div><div><br clear="all"><div><br></div>-- <br><div class="m_-9168829091410952626gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)">!-----------------------------<wbr>------------------------------<wbr>------------------------------<wbr>--------------------</font><div><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)">Laura D. Fowler                                                                                       </font></div><div><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)">Mesoscale and Microscale Meteorology Division (MMM)         </font></div><div><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)">National Center for Atmospheric Research<br></font></div><div><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)">P.O. Box 3000, Boulder CO 80307-3000</font></div><div><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)"><br></font></div><div><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)">e-mail: <a href="mailto:laura@ucar.edu" target="_blank">laura@ucar.edu</a></font></div><div><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)">phone: 303-497-1628</font></div><div><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)"><br></font></div><div><font face="arial, helvetica, sans-serif" color="#0000ff" style="background-color:rgb(255,255,255)">!-----------------------------<wbr>------------------------------<wbr>------------------------------<wbr>--------------------</font><br></div></div></div>
</div></font></span></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>