<div dir="ltr"><div class="gmail_default" style="font-size:small">Chao,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I didn't see any response to this; I apologize for the delay.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Whenever you have "non-standard" variable names like this, you can use the special $"..."$ syntax to work around it:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div class="gmail_default">att_glb = True</div><div class="gmail_default">att_glb@$"VAR-LIST"$= name_value;</div><div class="gmail_default">fileattdef( fout, att_glb )</div></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Note that this syntax *only* works when you use it for an attribute name, a dimension name, or a coordinate variable. Some examples:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">x!$"dim-0"$ = "lat" ; as a dimension name</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">x&$"latitude-0"$ = (/10,20,30,40/) ; as a coordinate variable name</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You can't use it like this:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">$"myvar-0"$ = 58.1</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 26, 2015 at 9:26 PM, Luo, Chao <span dir="ltr"><<a href="mailto:chao.luo@eas.gatech.edu" target="_blank">chao.luo@eas.gatech.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000"><font face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)"><span style="font-size:12pt">Dear NCL users,</span></font><div style="font-size:12pt;background-color:rgb(255,255,255)"><br></div><div style="font-size:12pt;background-color:rgb(255,255,255)">I am try to change global attribute in netcdf file. What I did is:</div><div style="font-size:12pt;background-color:rgb(255,255,255)"><br></div><div style="background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif">att_glb = True</font></div><div style="background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif">att_glb@VAR-LIST = name_value;</font></div><div style="background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif">fileattdef( fout, att_glb )</font></div><div style="background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif"> </font></div><div style="background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif">I happened the error at att_glb@VAR-LIST, It was caused by hyphen sign between VAR and LIST.</font></div><div style="background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif">in this attribute. Any suggestions to solve this problem would be very appreciated!</font></div><div style="background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif"><br></font></div><div style="background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif">Thanks in advance,</font></div><div style="background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif"><br></font></div><div style="background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif">Chao</font></div></div></div><br>_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>