Hi Bob,
FORTRAN unformatted output is not really a standard. It is system
and
compiler dependent how the concept of a "record" is implemented.
So for
a start if the data are written on one system architecture and are
being
read on another then all bets are off.
The second thing is that the existence of the loop in your code
shouldn't be a factor in successfully reading the first output
record.
Reading this first record, alone, should be your first target.
See Ch2
Sec4.1.1. "Records of uniform length" in the on-line users guide.
At a glance I think the problem in your command may be that you
need to
include /COLUMNS=`128*64*19`. (It has been years since I have
used this
capability.)
yes? file/var=hrmean/grid=gg/type=r8/format=unf/COL=`128*64*19`
HRMEAN.sst-2Xna-ctrl-04_001_280_emean.dat
If this works, then move onto the time looping. Define the time
axis as
part of your grid, but do not change the /COLUMNS argument. /COLUMNS
tells how many values are on each record as I recall.
- steve
=================================
Bob Tomas wrote:
Jaison,
I looked at the examples and unfortunately the one provided doesn't
address the
case I have because the FORTRAN write is imbedded inside do loops
and
single array elements are written with each "write". In my case, I
write out the whole darn array using a single write.
In Ferret I tried:
define axis/x=1:128:1 x128
define axis/y=1:64:1 y64
define axis/z=1:19:1 z19
define grid/x=x128/y=y64/z=z19 gg
file/var=hrmean/grid=gg/type=r8/format=unf
HRMEAN.sst-2Xna-ctrl-04_001_280_emean.dat
show data
currently SET data sets:
1> ./HRMEAN.sst-2Xna-ctrl-04_001_280_emean.dat (default)
name title I J
K L
HRMEAN HRMEAN 1:128 1:64
1:19 ...
fill hrmean[k=19]
sfe: formatted io not allowed
apparent state: unit 62 named
./HRMEAN.sst-2Xna-ctrl-04_001_280_emean.dat
lately reading sequential formatted external IO
Abort
Bob
On Fri, 7 Jul 2006, Jaison Kurian wrote:
Hi Bob,
See the examples given in this mail :
http://ferret.pmel.noaa.gov/Ferret/Mail_Archives/fu_2004/
msg00372.html
Regards,
Jaison
On Thu, 6 Jul 2006, Bob Tomas wrote:
Hello,
I tried to sort this out using the documentation but I wasn't able
so...
I created a binary file using FORTRAN using something like:
real*8 hrmean(19,64,128)
open(unit=10,access='sequential',form='unformatted',...)
write(10)hrmean
If someone can provide an example, I'd be very thankful.
Bob
--
º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤º¤ø,¸¸,ø¤º
Steve Hankin, NOAA/PMEL -- Steven.C.Hankin@noaa.gov
7600 Sand Point Way NE, Seattle, WA 98115-6349
ph. (206) 526-6080, FAX (206) 526-6744