<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>'reinit'</div><div>'open dat2stn.ctl'</div><div>'set gxout print'</div><div>'set lat 11 15'</div><div>'set lon 75 79'</div><div>timestep = 1</div><div>while(timestep <=3745)</div>
<div>'set t 'timestep''</div><div>'query time'</div><div>r0 = subwrd(result,3)</div><div>res = write("output.txt",r0,append)</div><div>res = close("output.txt")</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 & Regards,</div><div>Subash</div>