<div dir="ltr">Arshitha,<div><br></div><div>Here is the simplest possible way to write a netcdf file with one attribute.  Try this first.  Use ncdump -h to inspect your output file.  Suppose you already calculated a variable named "rh" in NCL.</div><div><br></div><div>    f = addfile ("<a href="http://filename.nc">filename.nc</a>","c")</div><div>    rh@att1 = "test"</div><div>    f->rhum = rh</div><div>    exit</div><div><div><br></div>For more details, please see this documentation:<br><a href="https://www.ncl.ucar.edu/Applications/method_1.shtml">https://www.ncl.ucar.edu/Applications/method_1.shtml</a></div><div><br><div>--Dave</div><div><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 4, 2019 at 9:29 AM arshitha anand via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="ltr"><div style="font-family:sans-serif;font-size:13.696px" dir="auto"><div style="margin:16px 0px"><div dir="auto">Dear all, <div dir="auto"><br></div><div dir="auto">I have an inssue in writing netcdf file. </div><div dir="auto">I calculated relative humidity from wrf ouput file. Then I need to write it as a netcdf file.</div><div dir="auto">Does anyone know  how to define the attribute  and also, how can I write it as a netcdf file. </div><div dir="auto"><span style="font-size:13.696px"> Kindly note my script, attached below.</span><br></div></div></div></div></div><div dir="ltr"><br></div><div dir="ltr">Thank you for your suggestions in advance.</div><div dir="ltr"><br>-- <br><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div><span style="color:rgb(0,0,255)"><i><span style="font-family:arial,helvetica,sans-serif">Regards,</span></i></span></div><div><span style="font-family:arial,helvetica,sans-serif"><b><br></b></span></div><div><span style="color:rgb(0,0,255)"><span style="font-family:arial,helvetica,sans-serif"><b>Arshitha Anand K A</b><br></span></span></div><span style="color:rgb(0,0,255)"><span style="font-family:arial,helvetica,sans-serif">Project Associate<br></span></span></div><div><span style="color:rgb(0,0,255)"><span style="font-family:arial,helvetica,sans-serif">Department of civil engineering<br></span></span></div><div><span style="color:rgb(0,0,255)"><span style="font-family:arial,helvetica,sans-serif">Indian Institute of Technology Madras</span></span></div><div><span style="color:rgb(0,0,255)"><span style="font-family:arial,helvetica,sans-serif">Chennai - 600036<br></span></span></div><span style="color:rgb(0,0,255)"><span style="font-family:arial,helvetica,sans-serif"></span></span></div></div></div></div></div></div></blockquote></div></div></div></div>