<div>I have station data for Precipitation at a timestep of 1hr, which is cumulative. </div><div><br></div><div>No of stations = 58</div><div>The undefined values are given by -999</div><div>Starting date : 00z15may2009</div>
<div>End Date : 23z17oct2009</div><div>Time varying 1 3744</div><div><br></div><div><br></div><div><br></div><div>I would to write the precipitation values at each of the stations into a txt file. The format is as below.</div>
<div><br></div><div>Time<span class="Apple-tab-span" style="white-space:pre">                        </span> Stn-1 <span class="Apple-tab-span" style="white-space:pre">        </span> Stn-2 <span class="Apple-tab-span" style="white-space:pre">        </span>Stn-3</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span> Precip<span class="Apple-tab-span" style="white-space:pre">        </span>Precip<span class="Apple-tab-span" style="white-space:pre">        </span>Precip</div><div>00z15may2009</div>
<div>01z15may2009</div><div>.</div><div>.</div><div><br></div><div><br></div><div>23z17oct2009<span class="Apple-tab-span" style="white-space:pre">        </span></div><div><br></div><div><br></div><div>I had written the following script to dump the time information to the txt file. Not sure how the preciptation at each station can be dumped into the same txt file.</div>
<div><br></div><div>&#39;reinit&#39;</div><div>&#39;open dat2stn.ctl&#39;</div><div>&#39;set gxout print&#39;</div><div>&#39;set lat 11 15&#39;</div><div>&#39;set lon 75 79&#39;</div><div>timestep = 1</div><div>while(timestep &lt;=3745)</div>
<div>&#39;set t &#39;timestep&#39;&#39;</div><div>&#39;query time&#39;</div><div>r0 = subwrd(result,3)</div><div>res = write(&quot;output.txt&quot;,r0,append)</div><div>res = close(&quot;output.txt&quot;)</div><div>timestep = timestep + 1</div>
<div>endwhile</div><div><br></div><div><br></div><div>Attached is the data.rar file containing the following files</div><div><br></div><div>(i) .stn file</div><div>(i) .map file</div><div>(iii) .ctl file</div><div><br></div>
<div><br></div><div>Thanks &amp; Regards,</div><div>Subash</div>