[Thread Prev][Thread Next][Index]

Re: How to read the data wroten in ferret



Ferret does not output the data as one write statement. In order to correctly
read the data into your ForTran program, try the following:

      parameter(imt=85,jmt=48,kmt=23,lmt=192)
      dimension temp(imt,jmt,kmt,lmt)

      open(11,file="b.bin",form="unformatted",access="sequential")

      do l=1,lmt
         do k=1,kmt
            do j=1,jmt
               read(11) (temp(i,j,k,l),i=1,imt)
            enddo
         enddo
      enddo

      end
On Sep 16,  2:23pm, Yang Haijun wrote:
> Subject: How to read the data wroten in ferret
> Hi,
>
> I want to get a new data from NetCDF data, so I did like this,
>
> yes? sh da
>      currently SET data sets:
>     1> /usr5/navyang/yhj/MOM_3/EXP/PACIFIC1/CONTROL/ts_45_92_season.nc
 (default)
>  name     title                             I         J         K         L
>  T2       T1[GT=TAX2@MOD]                  1:85      1:48      1:23
     1:192
>
> yes? list/file=my.dat/format=unformatted t2
>
> I got a new data named "my.day".
> Then I used a Fortran code to read this new data,
>
>       parameter(imt=85,jmt=48,kmt=23,lmt=192)
>       dimension temp(imt,jmt,kmt,lmt)
>
>       open(11,file="b.bin",form="unformatted",access="sequential")
>
>       read(11) temp
>
>       end
>
> When I run this code, I failed and was told,
>
> forrtl: severe (67): input statement requires too much data, unit 11, file
> /usr5/navyang/yhj/MOM_3/EXP/FERRET/b.bin
>
> Does anyone know the reason?
>
> Thanks very much,
>
> Haijun Yang
>-- End of excerpt from Yang Haijun




-- 
 Mark Verschell                     NASA/Goddard Space Flight Center
 verschell@neptune.gsfc.nasa.gov    Code 970/Lab. for Hydrospheric Proc.
 301-614-5669  Fax: 301-614-5666    Greenbelt, MD 20771


		     Better Living Through Denial
               ** USQC Certified: 100% Microsoft Free **


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement