<div dir="ltr">Thanks. I worked. I think I was having a syntax error.<div>Appreciated Dave.</div><div><br></div><div>Ashish </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 24, 2016 at 12:07 PM, David Brown <span dir="ltr">&lt;<a href="mailto:dbrown@ucar.edu" target="_blank">dbrown@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Try<br>
opt@fout = &quot;foo_DATA&quot; + (site + 1)<br>
 -dave<br>
<div><div class="h5"><br>
On Wed, Feb 24, 2016 at 9:40 AM, Ashish Sharma &lt;<a href="mailto:asharma7@nd.edu">asharma7@nd.edu</a>&gt; wrote:<br>
&gt; hello,<br>
&gt;<br>
&gt; I want to create new output file, say foo_DATA1, foo_DATA2 and foo_DATA3<br>
&gt; after each do loop. (see sample code below).<br>
&gt; How can I modify the code near write_matrix to create a new file every time<br>
&gt; it goes in do loop.<br>
&gt;<br>
&gt; do site=0,2<br>
&gt;<br>
&gt;   locij = wrf_user_ll_to_ij(a, lon(site), lat(site), llres)<br>
&gt;<br>
&gt;   locij = locij - 1         ; array pointers in NCL space<br>
&gt;<br>
&gt;   locX = locij(0)<br>
&gt;<br>
&gt;   locY = locij(1)<br>
&gt;<br>
&gt;<br>
&gt; t2 = new((/9,72/),float)<br>
&gt;<br>
&gt; t2(0,:) = obs(site,:)<br>
&gt;<br>
&gt; t2(1,:) = f1-&gt;T2(:,locY,locX)-273.15<br>
&gt;<br>
&gt; t2(2,:) = f2-&gt;T2(:,locY,locX)-273.15<br>
&gt;<br>
&gt;<br>
&gt;  opt = True<br>
&gt;<br>
&gt;  opt@fout = &quot;foo_DATA&quot;<br>
&gt;<br>
&gt;   write_matrix (t2, &quot;72f7.2&quot;, opt)<br>
&gt;<br>
&gt; ;;;*****************************************************;;;;;;;;;;;<br>
&gt;<br>
&gt;<br>
&gt; end do<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; thanks<br>
&gt;<br>
&gt; Ashish<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; ncl-talk mailing list<br>
&gt; <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
&gt; List instructions, subscriber options, unsubscribe:<br>
&gt; <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
&gt;<br>
</blockquote></div><br></div>