[Thread Prev][Thread Next][Index]

[ferret_users] another simple FORTRAN read question



Hi all,

I've been struggling to figure this out but am not getting it so if someone can help I will be very thankful.

This time I am reading using stream format because I am writing
out using direct access, but I am using NCL not FORTRAN

I am writing out a record using NCL:

fbindirwrite(dir_name + file_out_div,dummy)


where dummy(10,32,64). fbindirwrite is the NCL way to write
out a file using FORTRAN direct access: From the NCL web
page:


fbindirwrite: Writes binary records to a file in manner
analogous to fortran's "access=direct".


Now, I want to read the data into ferret to get a quick look, so
I wrote the following simple script to define a grid and plot the data:


DEFINE AXIS/x=1:32:1 x32
DEFINE AXIS/y=1:64:1 y64
DEFINE AXIS/z=1000:100:100 z10
define grid/x=x32/y=y64/z=z10 gridxyz
FILE/VAR=vor,wg/GRID=gridxyz/FORMAT=stream/type=r4 vor.CNTLen-08.basicstate.nc.t21.dat
show data
contour vor[k=5]*1.e5

When I run it, it tells me the data doesn't fit the grid:


DEFINE AXIS/x=1:32:1 x32
DEFINE AXIS/y=1:64:1 y64
DEFINE AXIS/z=1000:100:100 z10
define grid/x=x32/y=y64/z=z10 gridxyz
FILE/VAR=vor,wg/GRID=gridxyz/FORMAT=stream/type=r4 vor.CNTLen-08.basicstate.nc.t21.dat
show data
currently SET data sets:
1> ./vor.CNTLen-08.basicstate.nc.t21.dat (default)
name title I J K L
VOR VOR 1:32 1:64 1:10 ...
WG WG 1:32 1:64 1:10 ...

contour vor[k=5]*1.e5
**ERROR: Size of file ./vor.CNTLen-08.basicstate.nc.t21.dat doesn't match size specified by variables/grid
contour vor[k=5]*1.e5
Command file, command group, or REPEAT execution aborted

But it looks to me like the data should fit the grid. Maybe I am "not seeing it"? Maybe the NCL write
doen't work with the FERRET read? I don't know how to take the next step to diagnose whats going on
so any help in this direction is useful.

Thanks

Bob


--
-------------------------------------------------------------
Robert A. Tomas
National Center for Atmospheric Research
Climate and Global Dynamics Division - Paleoclimatology
1850 Table Mesa Drive
Boulder, CO 80305-3000
e-mail: tomas@ucar.edu tel: 303-497-1342 fax: 303-497-1348

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement