Re: Read unformatted data which generated from fortran

From: Dave Allured <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Sat Apr 03 2010 - 22:03:34 MDT

The order of dimensions in Fortran is reversed in NCL. Please
change either the Fortran program or the NCL program from (x,y) to
(y,x).

--Dave A.
NOAA/PSD/CIRES

On 4/3/2010 12:24 PM, 绋嬪啗 wrote:
> Dear NCL users,
>
> I'm trying to read a "unformatted" FORTRAN data file with NCL, but the my NCL script seems like not work, could someone help me to resolve this problem? Thanks at first.
>
> The FORTRAN program involving the data is as following:
>
> parameter(nlon=100,nlat=116)
>
> open(17,file='mask_map_pb.dat',status='unknown',
> & form='unformatted',access='direct',recl=nlon*nlat*4)
>
> write(17,rec=1) ((mask_map(ii,jj),ii=1,nlon),jj=1,nlat)
> write(32,*) mask_map
>
>
> The NCL script to read this data file:
>
> fili = "mask_map_pb.dat" ; input file
> nrec = 0
> dims = (/100,116/)
> t = fbindirread(fili, nrec, dims, "float")
>
> Regards,
>
> Jun

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Apr 3 22:03:44 2010

This archive was generated by hypermail 2.1.8 : Wed Apr 07 2010 - 07:12:50 MDT