[gradsusr] Error in data extraction frrom a netcdf file for more than one stations through script
Waheed
waheed.met at gmail.com
Sat Sep 4 03:29:35 EDT 2010
dear all
I want to extract point data from a netcdf file for 9 stations ie for 9
different latitudes longitudes .
my script is like this:
'reinit'
'sdfopen air.2009.nc'
n=1
t=1
ln1=74.9
ln2=76.03
ln3=68.9
ln4=73.25
ln5=71.78
ln6=71.68
ln7=73.35
ln8=70.1
ln9=69.72
lt1=35.34
lt2=35.12
lt3=24.63
lt4=29.95
lt5=29.4
lt6=29.38
lt7=34.38
lt8=33
lt9=29.88
while (n<=9)
'set lat lt'n
'set lon ln'n
while(t<3)
'set t 't
'q time'
say result
res=subwrd(result,3)
dd=substr(res,4,2)
mm=substr(res,6,3)
yy=substr(res,9,4)
'set gxout value'
* Temperature
'd air-273.15'
say result
tmp=subwrd(result,4)
aph=write('output/lahore.csv',' 'yy' 'mm' 'tmp,append)
'c'
t=t+1
endwhile
n=n+1
endwhile
but it results in error that
set error lat /lon missing or invalid arguments.
regards
--
Waheed Iqbal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100904/6c3520b4/attachment-0003.html
More information about the gradsusr
mailing list