<div dir="ltr">hello,<div><br></div><div>I want to create new output file, say <b><span style="font-family:Menlo;font-size:11px">foo_DATA1, </span><span style="font-family:Menlo;font-size:11px">foo_DATA2 and </span></b><span style="font-family:Menlo;font-size:11px"><b>foo_DATA3</b> </span> after each do loop. (see sample code below).</div><div>How can I modify the code near write_matrix to create a new file every time it goes in do loop. </div><div><br></div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">do site=0,2</p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"> locij = wrf_user_ll_to_ij(a, lon(site), lat(site), llres)</p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"> locij = locij - 1 ; array pointers in NCL space</p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"> locX = locij(0)</p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"> locY = locij(1)</p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">t2 = new((/9,72/),float)</p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">t2(0,:) = obs(site,:)</p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">t2(1,:) = f1->T2(:,locY,locX)-273.15</p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">t2(2,:) = f2->T2(:,locY,locX)-273.15</p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"> opt = True</p>
<p style="margin:0px;line-height:normal"><font face="Menlo"><span style="font-size:11px"> opt@fout = "</span></font><span style="background-color:rgb(255,0,0)"><b>foo_DATA</b></span><font face="Menlo"><span style="font-size:11px">"</span></font></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"> write_matrix (t2, "72f7.2", opt)</p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">;;;*****************************************************;;;;;;;;;;;</p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">end do</p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><br></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><br></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">thanks</p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">Ashish</p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><br></p></div></div>