Yeah, I made a bad mistake, I didn't write arguments into "stid.dat"<br><br><br><div class="gmail_quote">2009/5/31 sh zhou <span dir="ltr"><<a href="mailto:sh.maeam@gmail.com">sh.maeam@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Dear All,<br><br>I got a error when used station data , the error message is as following: <br>
###<br>ga-> d r<br>Low Level I/O Error: Read error on data file <br> Data file name = stid.dat <br> Error reading 542200117 bytes at location 0 <br>
Data Request Error: Variable is 'r'<br> Error ocurred at column 1<br>DISPLAY error: Invalid expression <br> Expression = r<br>ga-> <br>###<br>why in "location 0 " read a so huge data ?<br><br>Station data is :<br>
###<br>Year Month Stid Lat Lon Rainfall<br>1980 1 QQQ 34.3 -85.5 123.3 <br>1980 1 RRR 44.2 -84.5 87.1 <br>1980 1 SSS 22.4 -83.5 412.8 <br>1980 1 TTT 33.4 -82.5 23.3 <br>
1980 2 QQQ 34.3 -85.5 145.1 <br>1980 2 RRR 44.2 -84.5 871.4 <br>1980 2 SSS 22.4 -83.5 223.1 <br>1980 2 TTT 33.4 -82.5 45.5 <br>###<br>The fortran code I used is :<br>###<br> PROGRAM for_read_stinfo<br>
<br> integer :: i,j,k, year, month, nflag <br> integer, parameter :: ms = 4, ml = 1, mt = 2<br> integer, parameter :: nlev = ml+1<br> character(8) :: stid(ms)<br> real, dimension(ms) :: rain, lat, lon<br>
real :: dtime<br><br> nflag = 1<br> open(1000, file = 'stid.txt')<br> open(2000, file = 'stid.dat', form = 'binary') <br> read(1000,*)<br> do j = 1, mt<br> do i = 1, ms<br>
<br> read(1000,*) year , month, stid(i), lat(i), lon(i), rain(i)<br> write(*,*) year , month, stid(i), lat(i), lon(i), rain(i)<br><br> enddo<br> <br> do i =1, ms <br>
write(2000) stid(i), lat(i), lon(i), dtime, nlev, nflag<br> enddo<br> <br> write(2000) stid(i), 0.0, 0.0, 0.0, 0, 0<br> <br> enddo<br> write(2000) stid(i), 0.0, 0.0, 0.0, 0, 0<br>
! ---------------------------------------------------------------- <br> END <br>###<br>My ".ctl" file is:<br>###<br>DSET stid.dat<br>*DSET rain.dat<br>options sequential<br>DTYPE station<br>STNMAP rain.map<br>
UNDEF -999.0<br>TITLE Station Data Sample<br>TDEF 2 linear jan1980 1mon<br>VARS 1<br>r 0 99 rainfall<br>ENDVARS<br>###<br>Please tell me what mistake I'v made.<br>Thank you.<br><br><br clear="all">Sincerely.<br>
<font color="#888888">
-- <br>Shenghui Student<br><br>HuNan University . China<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Shenghui Student<br>Major: Physics<br>HuNan University . China<br>