[gradsusr] writing the station data to a txt file.

Subash Yeggina subash.yeggina at gmail.com
Thu Apr 7 05:01:00 EDT 2011


I have station data for Precipitation at a timestep of 1hr, which is
cumulative.

No of stations = 58
The undefined values are given by -999
Starting date : 00z15may2009
End Date : 23z17oct2009
Time varying 1 3744



I would to write the precipitation values at each of the stations into a txt
file. The format is as below.

Time  Stn-1  Stn-2 Stn-3
 Precip Precip Precip
00z15may2009
01z15may2009
.
.


23z17oct2009


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.

'reinit'
'open dat2stn.ctl'
'set gxout print'
'set lat 11 15'
'set lon 75 79'
timestep = 1
while(timestep <=3745)
'set t 'timestep''
'query time'
r0 = subwrd(result,3)
res = write("output.txt",r0,append)
res = close("output.txt")
timestep = timestep + 1
endwhile


Attached is the data.rar file containing the following files

(i) .stn file
(i) .map file
(iii) .ctl file


Thanks & Regards,
Subash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110407/2c02d628/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: data.rar
Type: application/rar
Size: 75034 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20110407/2c02d628/attachment-0003.bin 


More information about the gradsusr mailing list