[Thread Prev][Thread Next][Index]

Reading Fortran data files



Try this again:
> Hello,
>
> I was trying to read Fortran 77 files similar to the following one:
>
>       parameter(mi=72,mj=45,msea=5)
>       real map1(mi,mj),map2(mi,mj),map3(mi,mj)
>
>       open(1,form='unformatted',file='data.dat')
>
>        do is=1,msea
>         write(1)map1,map2,map3
>        enddo
>
> using Ferret scripts:
>
> def axis/x=180W:180E/npoint=72/unit="degrees_east" lon
> def axis/y=90S:90N/npoint=45/unit="degrees_north" lat
> def axis/t=1:5:1 time
> def grid/x=lon/y=lat/t=time g5x4
> file/format=unformatted/var=amp,pha,avg/col=9720/grid=g5x4 data.dat
> !
> set var/bad=-99999. amp
> set var/bad=-99999. pha
>
> However, the maps for amp[l=1], ..., amp[l=5], and pha are incorrect.
>
> Any suggestions would be appreciated for reading this types of data
> files (also for cases with only map1 and map2 written). Thanks lot.
>
> -Aiguo Dai, NCAR, Boulder, CO


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement