format questions [message #51642] |
Fri, 01 December 2006 11:01 |
lee
Messages: 3 Registered: February 1993
|
Junior Member |
|
|
Hello, all,
I have one basic questions: When I tried to read a header of ASCII
file, somehow precision of
xllcenter and yllcenter (see the below) is lost, could someone help me
on this? Thank you!
## data file
ncols 50
nrows 50
xllcenter 598594.35000000
yllcenter 6738650.14000000
cellsize 5.00000
NODATA_value -9999
0.42 0.00 0.26 0.33
0.38 0.21 0.41 0.25 .......
## my code
OPENR, lun, filename,/GET_LUN
header=strarr(6)
readf, lun, header
xcor=""
mx=0.0
ycor=""
my=0.0
reads,header(2),xcor, mx, format='(A10,x, D20.8)'
reads,header(3),ycor, my, format='(A10,x, D20.8)'
data=make_array(ncols, nrows,/double)
readF, lun, data
## Question : print out is different from the original file!!!!!!,
why?????
IDL> print, mx
598594.
IDL> print, double(mx)
598594.38
IDL> print, double(my)
6738650.0
|
|
|