<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Elham,<div><br></div><div>You’re referencing the attribute “units”, not “long_name”:</div><div><br></div><div><blockquote type="cite"><div id="divtagdefaultwrapper" dir="ltr"><div id="divtagdefaultwrapper" dir="ltr"><font color="#000000"><span style="caret-color: rgb(0, 0, 0); background-color: rgba(255, 255, 255, 0);">res@gsnRightString=data_hdf4@units</span></font></div></div></blockquote></div><div><br></div><div><span style="background-color: rgba(255, 255, 255, 0);">But apparently your variable doesn’t have a “units” attribute. That’s what the error is saying:</span></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><blockquote type="cite"><div id="divtagdefaultwrapper" dir="ltr"><div id="divtagdefaultwrapper" dir="ltr"><font color="#000000"><span style="caret-color: rgb(0, 0, 0); background-color: rgba(255, 255, 255, 0);">warning:Attempt to reference attribute (units) which is undefined</span></font></div></div></blockquote><br></div><div>Try changing it to:</div><div><br></div><div><blockquote type="cite"><div id="divtagdefaultwrapper" dir="ltr"><div id="divtagdefaultwrapper" dir="ltr"><font color="#000000"><span style="caret-color: rgb(0, 0, 0); background-color: rgba(255, 255, 255, 0);">res@gsnRightString=data_hdf4@long_name</span></font></div></div></blockquote></div><div><br></div><div>Depending on what you’re trying to reference, you also write it in you script manually:</div><div><br><blockquote type="cite"><div id="divtagdefaultwrapper" dir="ltr"><div id="divtagdefaultwrapper" dir="ltr"><font color="#000000"><span style="caret-color: rgb(0, 0, 0); background-color: rgba(255, 255, 255, 0);">res@gsnRightString=“XYZ”</span></font></div></div></blockquote></div><div><br></div><div><br></div><div>I hope that helps!</div><div><br></div><div>Toni</div><div><br></div><div><br><div id="AppleMailSignature"><b class="" style="background-color: rgba(255, 255, 255, 0); font-size: 13pt;">Toni Klemm</b><b class="" style="background-color: rgba(255, 255, 255, 0); font-size: 13pt;"><span class="">, </span><span class="">Ph.D.</span></b><div><span style="background-color: rgba(255, 255, 255, 0); font-size: 13pt;">Postdoctoral Research Associate</span></div><div><span style="background-color: rgba(255, 255, 255, 0); font-size: 13pt;">Department of Ecosystem Science and Management</span></div><div><span style="background-color: rgba(255, 255, 255, 0); font-size: 13pt;">College of Agriculture and Life Sciences</span></div><div><span style="background-color: rgba(255, 255, 255, 0); font-size: 13pt;">Texas A&M University, College Station, TX</span></div><div><span style="background-color: rgba(255, 255, 255, 0); font-size: 13pt;">Contributor to the </span><a href="https://www.eccforum.org/" class="" style="background-color: rgba(255, 255, 255, 0); font-size: 13pt;">Early Career Climate Forum</a></div><div><span class="" style="background-color: rgba(255, 255, 255, 0); font-size: 13pt;"><a href="http://www.toni-klemm.de/" class="">www.toni-klemm.de</a> | </span><a href="https://twitter.com/ToniKlemm" class="" style="background-color: rgba(255, 255, 255, 0); font-size: 13pt;">@toniklemm</a></div><div><br></div></div><div><br>On Sep 13, 2018, at 3:03 AM, Elham Ghasemifar <<a href="mailto:elham.ghasemifar@modares.ac.ir">elham.ghasemifar@modares.ac.ir</a>> wrote:<br><br></div><blockquote type="cite"><div>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">



<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p><br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Elham Ghasemifar<br>
<b>Sent:</b> Thursday, September 13, 2018 12:33 PM<br>
<b>To:</b> <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
<b>Subject:</b> </font>
<div> </div>
</div>
<div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Dear colleges</p>
<p>hello</p>
<p>i dont know why the error has occured, because i defined the long-name , could you please help me?</p>
<p></p>
<div><br>
</div>
<div>
<div><span style="font-size:11pt; font-family:Arial,Helvetica,sans-serif">res@gsnRightString=data_hdf4@units                               </span><br>
<span style="font-size:11pt; font-family:Arial,Helvetica,sans-serif">warning:Attempt to reference attribute (units) which is undefined</span><br>
<span style="font-size:11pt; font-family:Arial,Helvetica,sans-serif"> res@sfXArray   = conform(data_plt, time, 1)</span><br>
<span style="font-size:11pt; font-family:Arial,Helvetica,sans-serif">res@sfYArray   = lev(nbin_2B_GEOPROF|:,nray_2B_GEOPROF|:)</span><br>
<span style="font-size:11pt; font-family:Arial,Helvetica,sans-serif"> res@trGridType = "Triangularmesh"</span><br>
<span style="font-size:11pt; font-family:Arial,Helvetica,sans-serif"> plot=gsn_csm_contour(xwks, data_plt, res)</span><br>
<span style="font-size:11pt; font-family:Arial,Helvetica,sans-serif">warning:ContourPlotInitialize: no valid values in scalar field; ContourPlot not possible:[errno=1101]</span><br>
<span style="font-size:11pt; font-family:Arial,Helvetica,sans-serif">stop record</span><br>
<span style="font-size:11pt; font-family:Arial,Helvetica,sans-serif">quit</span></div>
<br>
</div>
<br>
<p></p>
<p><br>
</p>
</div>
</div>
</div>
</div>


</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>ncl-talk mailing list</span><br><span><a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a></span><br><span>List instructions, subscriber options, unsubscribe:</span><br><span><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></span><br></div></blockquote></div></body></html>