<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=4>Hi</FONT></DIV>
<DIV><FONT size=4></FONT> </DIV>
<DIV><FONT size=4>I had written a program for plotting station-data by
GrADS.</FONT></DIV>
<DIV><FONT size=4>It works OK on a DEC Alpha machine with F77
compiler.</FONT></DIV>
<DIV>The 'open' line in my program is:</DIV>
<DIV><FONT size=4></FONT> </DIV>
<DIV><FONT size=4>
open(13,file=file(3),status="unknown",form="unformatted",<BR>
+ recordtype='stream')</FONT></DIV>
<DIV><FONT size=4></FONT> </DIV>
<DIV><FONT size=4>And I also declared the "station id" as:</FONT></DIV>
<DIV><FONT size=4> character*8
sta1(1:stnn),sta2</FONT></DIV>
<DIV><FONT size=4></FONT> </DIV>
<DIV><FONT size=4>Mark Wang</FONT></DIV>
<DIV><FONT size=4><BR></FONT> </DIV>
<DIV><FONT size=4></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt 新細明體">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt 新細明體; font-color: black"><B>From:</B>
<A title=zmumba@YAHOO.COM href="mailto:zmumba@YAHOO.COM">zilore mumba</A>
</DIV>
<DIV><FONT face=新細明體 size=2></FONT><FONT face=新細明體 size=2></FONT><FONT
face=新細明體 size=2></FONT><FONT face=新細明體 size=2></FONT><FONT face=新細明體
size=2></FONT><FONT face=新細明體 size=2></FONT><FONT face=新細明體
size=2></FONT><FONT face=新細明體 size=2></FONT><FONT face=新細明體
size=2></FONT><BR></DIV>
<DIV> program stndata</DIV>
<DIV> implicit none</DIV>
<DIV> integer
:: i<BR>
integer ::
IYEAR,IMONTH,IYROLD,IMNOLD<BR>
integer ::
NFLAG,IFLAG,NLEV<BR> </DIV>
<DIV>
real
:: LAT,LON,RVAL,tim</DIV>
<DIV> </DIV>
<DIV> CHARACTER(len=4) :: STID<BR>
<BR> OPEN
(8,NAME='rainin.dat',status='old') <BR>
OPEN (12,file='rainout.dat',FORM='BINARY',ACCESS='SEQUENTIAL')</DIV>
<DIV> !OPEN
(12,file='rainout.dat',form='unformatted',access='direct',recl=8*7)<BR>
<BR> IFLAG = 0 </DIV>
<DIV>! Read and Write<BR>10 READ (8,9000,END=90)
IYEAR,IMONTH,STID,LAT,LON,RVAL <BR>9000 FORMAT
(1x,I4,2X,I1,2X,A3,3(2x,F5.1))</DIV>
<DIV> IF (IFLAG.EQ.0)
THEN<BR> IFLAG = 1
<BR> IYROLD =
IYEAR<BR> IMNOLD =
IMONTH <BR> ENDIF </DIV>
<DIV>! If new time group, write time group terminator. <BR>!
Assuming no empty time groups.
<BR> <BR> IF
(IYROLD.NE.IYEAR.OR.IMNOLD.NE.IMONTH) THEN
<BR> NLEV =
0<BR>
write(12)stid,lat,lon,tim,nlev,nflag<BR>
ENDIF<BR> <BR>
IYROLD = IYEAR <BR> IMNOLD = IMONTH </DIV>
<DIV>! Write this report <BR> tim =
0.0 <BR> NLEV = 1
<BR> NFLAG =
1<BR> <BR>
write(12)stid,lat,lon,tim,nlev,nflag,rval</DIV>
<DIV> GOTO 10<BR>
<BR>! On end of file write last time group terminator. </DIV>
<DIV>90 CONTINUE
<BR> NLEV =
0<BR> <BR>
write(12)stid,lat,lon,tim,nlev,nflag</DIV>
<DIV> close(12)<BR></DIV></BLOCKQUOTE></BODY></HTML>