[Thread Prev][Thread Next][Index]

Re: I'm confused - unformatted I/O ?




Hi Joerg -

I think the problem is that you need quotes around the variable
list in your file statement, as follows:

yes? file/format=unf/grid=csu/var="tc,dt1,dt2,dt3"
"/home/joerg/sib/sib2/data/ECMWF/test/fort.35"

The error message you got often indicates that ferret was trying to
read past the end of a file or record (I admit it is not very clear). 
You need to tell ferret what each record of your fortran output looks 
like. For example, the statement above should have 4 numbers/record,
representing the 4 variables listed. This would correspond to the
following fortran write loop:

	do 100 j=1,44
	do 100 i=1,72
100	write(35) tc,dt1,dt2,dt3

Note that if you had not written these with x varying fastest (ie if
you had switched the do loop order), you would have to add the /ord=yx 
qualifier to the ferret file statement to tell ferret that y varied
fastest.

If you had written the output:

	write(35) ((tc(i,j),dt1(i,j),dt2(i,j),dt3(i,j),i=1,72),j=1,44)

You could read it in ferret:

yes? file/format=unf/grid=csu/var="tc,dt1,dt2,dt3"/col=`4*72*44`
"/home/joerg/sib/sib2/data/ECMWF/test/fort.35"

Note the backslash on the col qualifier which allows immediate
evaluation of a numerical expression.

I hope this helps. If you still have problems send me the fortran
statement that wrote the data file.

Finally, if you added the /units qualifier to your define axis statements:

yes? define axis/x=1:72:1/unit=lon xlon
yes? define axis/y=1:44:1/unit=lat ylat

Then the plots would have nice latitude/longitude axis labels. Come to
think if it, I'm not sure if your naming the axes "lat" and "lon" might
be a problem; note the slight change I made.

Regards, Billy Kessler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
William S. Kessler
NOAA / Pacific Marine Environmental Laboratory
7600 Sand Point Way NE
Seattle Wa 98115 USA
 
Tel: 206-526-6221                    o__    ____ 
Fax: 206-526-6744                    _,>/'_  -----
E-mail: kessler@pmel.noaa.gov       (_) \(_) ------
Home page: http://www.pmel.noaa.gov/~kessler


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement