<DIV>Rochelle<BR>Also, there is another error in your fortran code.<BR>character outfile*72,infile*72, <STRONG>stid*8</STRONG><BR></DIV>
<DIV>If you use direct format.<BR>c open c(55,file=outfile,form='unformatted',access='direct'<STRONG>,recl=4*8</STRONG>)<BR>Because you have only one varible.</DIV>
<DIV><BR><B><I>Rochelle Balmori <rtfbalmori@GMAIL.COM></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Hello,<BR><BR>I'm trying to use the stnmap utility but I always get this error message:<BR><BR>Open Error: Data file type invalid<BR>--> The invalid description file record is:<BR>--> options sequential<BR><BR>The data file was not opened.<BR>File name is: rain.ctl<BR><BR>OR (if i interchange the 2nd and 3rd line of my descriptor file)<BR><BR>[balmori@methost7 mo]$ stnmap -i rain.ctl<BR>Open Error: Data file type invalid<BR>--> The invalid description file record is:<BR>--> dtype station<BR><BR>The data file was not opened.<BR>File name is: rain.ctl<BR><BR><BR>I've used and read almost all the archived messages regarding stnmap but was<BR>still unsuccessful.<BR><BR>I used rain.prn (an example) as my data file<BR><BR>4.23 93.13 17.21<BR>-5.25 105.18 26.43<BR>3.80 98.70 24.39<BR>3.57 98.68 17.30<BR>1.55 98.88 47.72<BR>1.23 97.63 20.18<BR>1.12 104.12 124.57<BR>0.92 10
4.53
27.68<BR>0.47 101.45 11.30<BR>3.20 106.25 61.65<BR>3.95 108.38 90.12<BR>-0.47 102.32 9.37<BR>-1.63 103.65 10.96<BR>-2.90 104.70 37.96<BR>-2.17 106.13 21.86<BR>-3.88 102.33 5.71<BR>-4.45 105.18 28.49<BR><BR>Then I used stngrads.f to convert this to the binary file<BR><BR>program stngrads<BR>c<BR>real rlat, rlon, rval, tim<BR>integer iyear, imonth, iflag, nlev, nflag, year, month<BR>character outfile*72,infile*72, stid*4<BR><BR>print *, 'Enter input file name: '<BR>read (*,'(a)') infile<BR><BR>print *, 'Enter output file name: '<BR>read (*,'(a)') outfile<BR><BR>c size = 17*3<BR>open (8, file=infile)<BR>open (55,file=outfile,form='unformatted',access='sequential')<BR>c open c(55,file=outfile,form='unformatted',access='direct',recl=4*17*3)<BR>c size = 17*4<BR>c<BR>C Read and Write<BR>do i = 1, 17<BR>READ (8, *) RLAT,RLON,RVAL<BR>TIM = 0.0<BR>STID = char(i+64)//'XXX'<BR>NLEV = 1<BR>NFLAG = 1<BR>WRITE (55) STID,RLAT,RLON,TIM,NLEV,NFLAG<BR>c write (*,*)
STID,RLAT,RLON,TIM,NLEV,NFLAG<BR>WRITE (55) RVAL<BR>c write (*,*) RVAL<BR>enddo<BR>c<BR>C On end of file write last time group terminator.<BR>NLEV = 0<BR>write (10)<BR>WRITE (55) STID,RLAT,RLON,TIM,NLEV,NFLAG<BR>close (55)<BR>close (8)<BR><BR>STOP<BR>END<BR><BR>I was not able to use RECORDTYPE='STREAM' because pgf90 (fortran compiler)<BR>did not recognize it so I used the 'sequential' option as suggested by some<BR>in the archive. I was able to produce the binary file (rain.out).Then I used<BR>this descriptor file to create a station map:<BR><BR>DSET ^rain.out<BR>OPTIONS sequential<BR>DTYPE station<BR>STNMAP rain.map<BR>UNDEF -999.0<BR>TITLE stations<BR>TDEF 1 linear jan1979 1hr<BR>VARS 1<BR>f 0 99 data<BR>ENDVARS<BR><BR>I've also experimented on changing the value for NLEV and NFLAG to either 1<BR>or 0 (but I always use 1 because I have surface data) but still it did not<BR>work. I'm compiling it in a linux machine (redhat 7.2) using a portland<BR>group compiler
(pgf90).<BR><BR>Could somebody suggest what I should do?<BR><BR>Thanks very much.<BR><BR>Rochelle<BR>San Jose State University<BR></BLOCKQUOTE><p>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com