Binary to Ascii conversion
Yitbarek Kifle
yitbek at YAHOO.COM
Fri Feb 23 09:34:18 EST 2007
I would like to thank Diane Stokes and Kristian Horvath for the Script that
you sent me.I am still having a minor problem while excuting the script
file.The problem is,when i run the script it turns out an error on line 9
of the scipt as follows;
'reinit'
'sdfopen D:\reanalysis\soilw.mon.mean.nc'
'set t 613 697'
'set lon 95.5 112.5'
'set lat 31.5 42.5'
'set gxout print'
'set prnopts %10.3e 1 1'
'd tloop(amean(soilw,lon=95.5,lon=112.5,lat=31.5,lat=42.5))'
rc=write(D:\reanalysis\ascii.txt,result)
rc=close(D:\reanalysis\ascii.txt)
'quit'
return
and the other script i have is;
'reinit'
'sdfopen D:\reanalysis\soilw.mon.mean.nc'
'set gxout print'
'set prnopts %8.5e 1'
'set t 613 697'
'display tloop(amean(soilw,lon=95.5,lon=112.5,lat=31.5,lat=42.5))'
say result
write ('D:\reanalysis\ascii.txt',result,append)
'reinit'
and the later gives me an ascii file as follows;(What i didn't like is that
the the text "Printing Grid -- 1 Values -- Undef = 32766"is repeated after
every numeric output.)
Printing Grid -- 1 Values -- Undef = 32766
1.89156e+02
Printing Grid -- 1 Values -- Undef = 32766
1.73351e+02
Printing Grid -- 1 Values -- Undef = 32766
1.64099e+02
Printing Grid -- 1 Values -- Undef = 32766
1.60951e+02
Printing Grid -- 1 Values -- Undef = 32766
1.70652e+02
Printing Grid -- 1 Values -- Undef = 32766
1.85685e+02
Printing Grid -- 1 Values -- Undef = 32766
2.07550e+02
Printing Grid -- 1 Values -- Undef = 32766
2.19629e+02
Printing Grid -- 1 Values -- Undef = 32766
2.19556e+02
Printing Grid -- 1 Values -- Undef = 32766
2.24317e+02
.
.
.
Would somebody please make a correction of these scripts or send me another
one?
Thanks in advance.
More information about the gradsusr
mailing list