[Thread Prev][Thread Next][Index]

Re: Reading Fortran unformatted files



Hi Michel,

I believe there are two problems here.

1) The error message "Unable to read "default.spk" to set shade ..." indicates
that the environment variable FER_PALETTE is not pointing to the directory
which contains the PLOT+ fonts. (Use "Fenv" to see Ferret environment
variables). Normally this should point to the same directory that you see with
the Unix command "echo $FER_DIR/ppl". Check your "ferret_paths" file which sets
these environment variables up.

2) To read your particular data file you need to inform ferret that all of the
data are in a single record. The /COLUMNS= qualifier is used for this purpose.
Since 64x32 = 2048 you can use

	file /var=sincos/grid=g64x32/format=UNFORMATTED/COLUMNS=2048 donnees

or equivalently

	file /var=sincos/grid=g64x32/format=UNFORMATTED/COLUMNS=`64*32` donnees

using grave accents (immediate mode) to evaluate 64*32.

For follow up questions of a specific technical nature please send to
"ferret@pmel.noaa.gov". If the questions might be of general interest then
continue using "ferret_users@ferret.wrc.noaa.gov". This minimizes the traffic
for the ferret_users list.

	cheers - steve

============================================================================
On Jul 4,  6:59pm, beland@cerca.umontreal.ca wrote:
> Subject: Reading Fortran unformatted files
> Hello,
>
> I am trying to use ferret to read a Fortran binary file and display the
> field that is in it.  The field is in a matrix A declared
>
> REAL A(64,32)
>
> I open the file with
>
> open(10,file='donnees',form='UNFORMATTED')
>
> and write it in one shot with
>
> WRITE(10) A
>
> so that there are control words only at the beginning and end.  This
> program was run on a R4000 Indigo running IRIX 5.3.
>
> Now I try to plot the field with ferret.  Here is what I did:
>
> define axis/x=0:354.375:5.625 x64
> define axis/y=-87.1875:87.1875:5.625 y32
> define grid/x=x64/y=y32 g64x32
> file /var=sincos/grid=g64x32/format=UNFORMATTED donnees
> contour /i=0:360/j=-90:90 sincos
>
> After this, I get the following error message:
>
>  PPL+ error: Unable to read "default.spk" to set shade and fill colors.
>
> What went wrong ?  Only the axes and titles show up on the screen.  I am
> using ferret 3.0 beta.
>
> --
> Michel Beland                 beland@CERCA.UMontreal.CA
> professionnel de recherche    tel: (514)369-5223  fax: (514)369-3880
> CERCA (CEntre de Recherche en Calcul Applique)
> 5160, boul. Decarie, bureau 400(423), Montreal (Quebec), Canada, H3X 2H9
>-- End of excerpt from beland@cerca.umontreal.ca




-- 

		|  NOAA/PMEL               |  ph. (206) 526-6080  
Steve Hankin	|  7600 Sand Point Way NE  |  FAX (206) 526-6744
		|  Seattle, WA 98115-0070  |  hankin@pmel.noaa.gov


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / ERL / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement