[Thread Prev][Thread Next][Index]

Fortran Binary File Read


I'd like to read a set of fortran binary files into ferret. I've tried it
a couple of different ways according to the documentation (User guide v4.4
p24) but ferret quits with a core dump.

The size of each binary file is 59435348 bytes and they are written with
a fortran subroutine which looks like:

! generate file name from time t
      s = t
      if(s.ge.10**6) s = 10**6-1
      do i=5,0,-1
        p = s/10**i
        s = s - p*10**i
        num((6-i):(6-i)) = digit(p)
      fil = 'out'//num
      if(sda) then
         ff = 'physical'
         ff = 'unformatted'
! open file and write it
      write(10) nx,ny,nk
      write(10) eta
      write(10) ub
      write(10) vb
      write(10) up
      write(10) vp
      write(10) us
      write(10) vs
      write(10) dp
      write(10) q
      write(10) qx
      write(10) qy


The variables are arrays of dimension (nx,ny) or (nx,ny,nk) and they
are written unformatted. Any help would be appreciated.



David Oxilia                          Tel: (541) 737-2368
COAS-Oregon State University          Fax: (541) 737-2064
Ocean Admin. Bldg. 104                
Corvallis, OR 97331-5503              Email: oxilia@hejira.oce.orst.edu

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement