<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">You’re overwriting the variable `lines` on every loop iteration. &nbsp;<div class=""><br class=""></div><div class="">you probably want</div><div class=""><br class=""></div><div class="">lines = new( ntimes, “string”)</div><div class=""><br class=""></div><div class="">do &nbsp;it…</div><div class="">…</div><div class="">lines(it) = times(i)+”...</div><div class="">…</div><div class="">end do</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Good luck,&nbsp;</div><div class=""><br class=""></div><div class="">Alan.&nbsp;</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; border-spacing: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">##############################<br class="">Alan Brammer,<div class="">Post-Doc Researcher</div><div class=""><br class=""></div><div class="">Department of Atmospheric and&nbsp;Environmental Sciences,<br class="">University at Albany,&nbsp;State University of New&nbsp;York,&nbsp;Albany, NY, 12222<div class=""><a href="mailto:abrammer@albany.edu" class="">abrammer@albany.edu</a><br class="">##############################</div></div></div></span></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On 31 Jul 2017, at 01:20, Muhammad Omer Mughal &lt;<a href="mailto:m.mughal1@postgrad.curtin.edu.au" class="">m.mughal1@postgrad.curtin.edu.au</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="divtagdefaultwrapper" dir="ltr" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">Hi<span class="Apple-converted-space">&nbsp;</span><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">I am trying to evaluate RH time series at a certain location near surface using the following code. I do get it correct when I am printing it on screen but I fail to get it corrected when I use ascii write. Can any one help quickly please.</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p><div class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"<br class=""><br class="">begin<br class="">a=addfile("wrfout_d05_2016-04-01_00:00:00.nc","r")<br class="">loc = wrf_user_ll_to_ij(a, 103.98226667,1.36776667, True)<br class="">x = loc(0) - 1<br class="">y= loc(1) - 1<br class=""><br class="">times = wrf_user_list_times(a)<br class="">ntimes = dimsizes(times)<br class=""><br class="">do it = 0,ntimes-1,1<br class="">&nbsp;&nbsp;&nbsp; RH = wrf_user_getvar(a,"rh",it)<br class=""><br class="">&nbsp;&nbsp;&nbsp; RH1=RH(2,y,x)<br class="">lines = times(it)+" "+sprintf("%.5f",RH1)<br class="">;print("Working on time: " + times(it) + " RH="+RH1)<br class="">&nbsp; end do<br class="">asciiwrite("RH.csv",lines)<br class="">end<br class=""></div><br class=""><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div id="Signature" class=""><div id="divtagdefaultwrapper" style="font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif, EmojiFont, 'Apple Color Emoji', 'Segoe UI Emoji', NotoColorEmoji, 'Segoe UI Symbol', 'Android Emoji', EmojiSymbols;" class=""><div style="font-family: Tahoma; font-size: 13px;" class=""><div style="font-family: Tahoma; font-size: 13px;" class=""><b class=""><br class=""></b></div><div style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15.4545450210571px; margin: 0px; background-color: rgb(255, 255, 255);" class=""><font size="3" face="Times New Roman,serif" class=""><span style="font-size: 12pt;" class=""><font color="#1F497D" size="2" face="Arial Bold" class=""><span style="font-size: 11pt;" class="">Muhammad Omer Mughal</span></font></span></font></div><div style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15.4545450210571px; margin: 0px; background-color: rgb(255, 255, 255);" class=""><font size="3" face="Times New Roman,serif" class=""><span style="font-size: 12pt;" class=""><font color="#1F497D" size="2" face="Arial Bold" class=""><span style="font-size: 11pt;" class="">MSc&nbsp;BSc&nbsp;Mechanical Engineering</span></font><font color="#1F497D" size="1" face="Arial,sans-serif" class=""><span style="font-size: 8pt;" class=""><br class=""></span></font><font color="#AB8303" size="2" face="Arial Bold" class=""><span style="font-size: 9pt;" class="">PhD&nbsp;&nbsp;Research&nbsp;Scholar</span></font></span></font></div><div style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15.4545450210571px; margin: 0px; background-color: rgb(255, 255, 255);" class=""><font size="3" face="Times New Roman,serif" class=""><span style="font-size: 12pt;" class=""><font color="#AB8303" size="2" face="Arial Bold" class=""><span style="font-size: 9pt;" class="">Remote Sensing and Satellite Research Group</span></font></span></font></div><div style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15.4545450210571px; margin: 0px; background-color: rgb(255, 255, 255);" class=""><font size="3" face="Times New Roman,serif" class=""><span style="font-size: 12pt;" class=""><font color="#AB8303" size="2" face="Arial Bold" class=""><span style="font-size: 9pt;" class="">Department of Imaging and Applied Physics</span></font><font color="#AB8303" size="2" face="Arial Bold" class=""><span style="font-size: 9pt;" class=""><br class="">Curtin University</span></font><font color="#AB8303" size="2" face="Arial Bold" class=""><span style="font-size: 9pt;" class=""><br class=""></span></font><font color="#1F497D" size="2" face="Calibri,sans-serif" class=""><span style="font-size: 11pt;" class=""><br class=""></span></font><font color="#1F497D" size="2" face="Arial Bold" class=""><span style="font-size: 9pt;" class="">Curtin University</span></font><font color="#1F497D" size="2" face="Arial Bold" class=""><span style="font-size: 9pt;" class=""><br class=""></span></font><font color="#AB8303" size="2" face="Arial Bold" class=""><span style="font-size: 9pt;" class="">Tel |</span></font><font color="#1F497D" size="2" face="Arial Bold" class=""><span style="font-size: 9pt;" class="">&nbsp;</span></font><font color="#1F497D" size="2" face="Arial,sans-serif" class=""><span style="font-size: 9pt;" class="">+61 8 9266 7962</span></font><font color="#1F497D" size="2" face="Calibri,sans-serif" class=""><span style="font-size: 9pt;" class="">&nbsp;</span></font><font color="#1F497D" size="1" face="Calibri,sans-serif" class=""><span style="font-size: 7pt;" class=""><br class=""></span></font><font color="#AB8303" size="2" face="Arial Bold" class=""><span style="font-size: 9pt;" class="">Fax |</span></font><font color="#1F497D" size="2" face="Arial Bold" class=""><span style="font-size: 9pt;" class="">&nbsp;</span></font><font color="#1F497D" size="2" face="Arial,sans-serif" class=""><span style="font-size: 9pt;" class="">+61 8 9266 2377</span></font><font color="#1F497D" size="2" face="Arial,sans-serif" class=""><span style="font-size: 9pt;" class=""><br class=""></span></font><font color="#AB8303" size="2" face="Arial Bold" class=""><span style="font-size: 9pt;" class="">Mobile |</span></font><font color="#1F497D" size="2" face="Calibri,sans-serif" class=""><span style="font-size: 9pt;" class="">&nbsp;</span></font><font color="#1F497D" size="2" face="Arial,sans-serif" class=""><span style="font-size: 9pt;" class="">0470&nbsp;237&nbsp;525</span></font><font color="#1F497D" size="2" face="Calibri,sans-serif" class=""><span style="font-size: 9pt;" class="">&nbsp;&nbsp;</span></font><font color="#1F497D" size="2" face="Calibri,sans-serif" class=""><span style="font-size: 9pt;" class=""><br class=""></span></font><font color="#1F497D" size="2" face="Calibri,sans-serif" class=""><span style="font-size: 9pt;" class=""><br class=""></span></font><font color="#AB8303" size="2" face="Arial Bold" class=""><span style="font-size: 9pt;" class="">Email |</span></font><font color="#1F497D" size="2" face="Calibri,sans-serif" class=""><span style="font-size: 9pt;" class="">&nbsp;</span></font><a href="mailto:m.lynch@curtin.edu.au" target="_blank" id="LPNoLP" class=""><font size="2" face="Arial,sans-serif" class=""><span style="font-size: 9pt;" class="">m.mughal1@postgrad.curtin.edu.au</span></font></a><font color="#1F497D" size="2" face="Arial,sans-serif" class=""><span style="font-size: 9pt;" class="">&nbsp;</span></font><font color="#1F497D" size="2" face="Arial,sans-serif" class=""><span style="font-size: 9pt;" class=""><br class=""></span></font><font color="#AB8303" size="2" face="Arial Bold" class=""><span style="font-size: 9pt;" class="">Web |</span></font><font color="#AB8303" size="2" face="Calibri,sans-serif" class=""><span style="font-size: 9pt;" class="">&nbsp;</span></font><a href="http://curtin.edu.au/" target="_blank" id="LPNoLP" class=""><font size="2" face="Calibri,sans-serif" class=""><span style="font-size: 11pt;" class=""><font size="2" face="Arial,sans-serif" class=""><span style="font-size: 9pt;" class="">http://curtin.edu.au</span></font></span></font></a><font color="#1F497D" size="2" face="Arial,sans-serif" class=""><span style="font-size: 9pt;" class=""><br class=""></span></font><font color="#1F497D" size="1" face="Calibri,sans-serif" class=""><span style="font-size: 7pt;" class=""><br class=""></span></font></span></font></div><div style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15.4545450210571px; margin: 0px; background-color: rgb(255, 255, 255);" class=""><font color="#1F497D" size="1" face="Calibri,sans-serif" class=""><span style="font-size: 6pt;" class=""></span></font><font color="#1F497D" size="1" face="Arial,sans-serif" class=""><span style="font-size: 6pt;" class="">Curtin University is a trademark of Curtin University of Technology.&nbsp;</span></font><br class=""></div><div style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15.4545450210571px; margin: 0px; background-color: rgb(255, 255, 255);" class=""><font size="3" face="Times New Roman,serif" class=""><span style="font-size: 12pt;" class=""><font color="#1F497D" size="1" face="Arial,sans-serif" class=""><span style="font-size: 6pt;" class="">CRICOS Provider Code 00301J (WA), 02637B (NSW)</span></font></span></font></div><div style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15.4545450210571px; margin: 0px; background-color: rgb(255, 255, 255);" class=""><font size="3" face="Times New Roman,serif" class=""><span style="font-size: 12pt;" class=""><font color="#1F497D" size="1" face="Arial,sans-serif" class=""><span style="font-size: 6pt;" class=""><br class=""></span></font></span></font></div><div style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15.4545450210571px; margin: 0px; background-color: rgb(255, 255, 255);" class=""><font size="3" face="Times New Roman,serif" class=""><span style="font-size: 12pt;" class=""><font color="#1F497D" size="1" face="Arial,sans-serif" class=""><span style="font-size: 6pt;" class=""><br class=""></span></font></span></font></div></div></div></div></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">ncl-talk mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:ncl-talk@ucar.edu" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">ncl-talk@ucar.edu</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">List instructions, subscriber options, unsubscribe:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></div></blockquote></div><br class=""></div></body></html>