<div lang="x-western">
Hi, <br>
<br>
I am trying to convert an ASCII file into a format GrADS can read. My
ASCII file has 12 variables (it's sounding data) and looks like this:<br>
<span> 0 46 144 849.1 22.0 25 4.860
36.23 2.6 11 40.630 //////<br>
0 48 151 848.4 22.0 25 4.860 36.30 2.6 11 40.630
//////<br>
0 50 157 847.8 21.9 25 4.840 36.26 2.7 10 40.630
//////<br>
0 52 161 847.4 21.9 25 4.840 36.30 2.7 10 40.630
//////<br>
0 54 165 847.0 21.9 25 4.840 36.34 2.7 10 40.630
//////<br>
0 56 172 846.4 21.8 26 5.010 36.30 2.7 10 40.630
//////<br>
<br>
<br>
My Fortran 90 program is below. It compiles and creates the binary
file successfully but when I run the stnmap utility I get the following
error. <br>
<i>stnmap -i test.ctl<br>
Name of binary data set: testbin.dat<br>
Number of times in the data set: 1<br>
Number of surface variables: 0<br>
Number of level dependent variables: 12<br>
<br>
Starting scan of station data binary file.<br>
Binary data file open: testbin.dat<br>
<br>
Processing time step 1<br>
Sequential Read Error: Record size greater than one station report: 32
:: 28<br>
<br>
</i></span><span>Has anyone seen this before/know how
to fix it?<br>
Thanks,<br>
Shawn Milrad<br>
</span><br>
<span><br>
<br>
<br>
program fortrantest<br>
character*8 STID, RLON<br>
OPEN (8,FILE='10030000.txt')<br>
OPEN (10,FILE='testbin.dat',FORM='UNFORMATTED', &<br>
ACCESS='SEQUENTIAL')<br>
IFLAG = 0<br>
STID = 'WHEELER'<br>
! Read and Write <br>
10 READ (8,9000,END=90) IMIN,ISEC,IHGHT,PRES,TMPC, &<br>
IRELH,RMIX,THETAC,SPED,IDIR,RLAT,RLON<br>
9000 FORMAT (2x,I2,2X,I2,5X,I4,3X,F5.1,3X,F4.1,2X,I2,2X, &<br>
F5.3,3x,F5.2,1x,F4.1,1x,I3,2x,F6.3,2x,A6)<br>
IF (IFLAG.EQ.0) THEN<br>
IFLAG = 1<br>
IMINOLD = IMIN<br>
ISECOLD = ISEC<br>
ENDIF<br>
! If new time group, write time group terminator. <br>
! Assuming no empty time groups. <br>
IF (IMINOLD.NE.IMIN.OR.ISECOLD.NE.ISEC) THEN<br>
NLEV = 0<br>
WRITE (10) STID,RLAT,RLON,TIM,NLEV,NFLAG<br>
ENDIF<br>
IMINOLD = IMIN<br>
ISECOLD = ISEC<br>
! Write this report <br>
TIM = 0.0<br>
NLEV = 1<br>
NFLAG = 1<br>
WRITE (10) STID,RLAT,RLON,TIM,NLEV,NFLAG<br>
WRITE (10) IHGHT,PRES,TMPC,IRELH,RMIX,THETAC, &<br>
SPED,IDIR<br>
GO TO 10<br>
! On end of file write last time group terminator. <br>
90 CONTINUE<br>
NLEV = 0<br>
WRITE (10) STID, RLAT, RLON, TIM,NLEV,NFLAG<br>
STOP<br>
END<br>
<br>
</span>
<pre cols="72">--
Shawn Milrad, Ph. D.
Staff Scientist
AER, Inc.
</pre>
</div><br clear="all"><br>-- <br>Shawn Milrad<br>Cell: 732-261-3594<br>