[gradsusr] Writing point model output data to a file
Zilore Mumba
zmumba at gmail.com
Mon Dec 17 01:44:39 EST 2018
I want to write data at all time steps to a file, i.e at a fixed
longitude and latitude for t=1 to t=9 for a 48 hour forecast run of
the WRF output, I want all 9 temperatures in a file at that location.
I wrote the following script
'open wrfout_d01_2018-12-02_00.ctl'
************************
'set lon 30.13'
lons=sublin(result,2)
xlon=subwrd(lons,4)
'set lat -1.97'
lats=sublin(result,2)
xlat=subwrd(lats,4)
write('wrfout_t2.txt', 'Temp at Lon. 'xlon 'Lat. 'xlat)
count = 1
while (count <=3)
'set t 'count
'd t2'
tmp=sublin(result,2)
temp=subwrd(tmp,4)
*Save data to file
write('wrfout_t2.txt', temp, append)
count = count + 1
endwhile
The above script writes "Temp at Lon. 'Lat. " in the file "wrfout_t2"
as per the first write statement. Then there is no other entry in the
file, but an error on the terminal "unknown command 0". This error is
repeated 4 times
How do I go about achieving what an trying to do?
More information about the gradsusr
mailing list