Old station data problem

zilore mumba zmumba at YAHOO.COM
Wed Jan 30 05:10:25 EST 2008


Mark,
  Thank you for your hints. however I think I have a platform problem. Both on Windows and on Redheart LINUX I get the same result. But another program with a full synop does plot only when I put in one station. When I put two stations the same error message comes.
  Zilore

Mark <gemark at GEORGE2.AS.NTU.EDU.TW> wrote:
          Hi

  I had written a program for plotting station-data by GrADS.
  It works OK on a DEC Alpha machine with F77 compiler.
  The 'open' line in my program is:

         open(13,file=file(3),status="unknown",form="unformatted",
     +        recordtype='stream')

  And I also declared the "station id" as:
         character*8 sta1(1:stnn),sta2

  Mark Wang



    ----- Original Message -----
  From: zilore mumba


   program stndata
   implicit none
      integer          :: i
    integer          :: IYEAR,IMONTH,IYROLD,IMNOLD
    integer          :: NFLAG,IFLAG,NLEV

      real              :: LAT,LON,RVAL,tim

      CHARACTER(len=4) :: STID

       OPEN (8,NAME='rainin.dat',status='old')
       OPEN (12,file='rainout.dat',FORM='BINARY',ACCESS='SEQUENTIAL')
         !OPEN (12,file='rainout.dat',form='unformatted',access='direct',recl=8*7)

    IFLAG = 0
  !  Read and Write
10     READ (8,9000,END=90) IYEAR,IMONTH,STID,LAT,LON,RVAL
9000   FORMAT (1x,I4,2X,I1,2X,A3,3(2x,F5.1))
         IF (IFLAG.EQ.0) THEN
          IFLAG = 1
          IYROLD = IYEAR
          IMNOLD = IMONTH
       ENDIF
  !  If new time group, write time group terminator.
!  Assuming no empty time groups.

       IF (IYROLD.NE.IYEAR.OR.IMNOLD.NE.IMONTH) THEN
          NLEV = 0
          write(12)stid,lat,lon,tim,nlev,nflag
       ENDIF

       IYROLD = IYEAR
       IMNOLD = IMONTH
  !  Write this report
       tim = 0.0
       NLEV = 1
       NFLAG = 1

       write(12)stid,lat,lon,tim,nlev,nflag,rval
         GOTO 10

!  On end of file write last time group terminator.
  90    CONTINUE
       NLEV = 0

    write(12)stid,lat,lon,tim,nlev,nflag
      close(12)






---------------------------------
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20080130/2e7fcef9/attachment.html 


More information about the gradsusr mailing list