[Thread Prev][Thread Next][Index]

[ferret_users] depth coordinate (inverted vertical axis)



Hi Ferret users,

I'm wondering how to associate depth coordinate values
with a binary datafile which has this structure:

   k = 1    --- 1000m depth
   k = 2    ---  990m depth
   . . . .
   k = 101  ---    0m

To be concrete, let's pretend the file were produced by
this Fortran program:

   parameter(NZ=101, NY=31) ! NY is # of lat. gridpoints
   real*4 v(NY,NZ)
   open(10, . . . , recl = size_of_the_entire_array)
   write(10, rec = 1) v ! Dump the entire array.

My first attempt was:

   define axis/y=10N:40N:1        y_axis
   define axis/z=1000:0:-10       z_axis
   define grid/y=y_axis/z=z_axis  my_grid
   file/format=stream/g=my_grid/var=v  mybin.dat

but Ferret doesn't accept the "z=1000:0:-10" part. If it's
replaced with "z=-1000:0:10", then Ferret produces correct
plots for the data.  The problem of the latter solution is
that the depths become negative, which I'd like to avoid.

So, could somebody tell me how to get it right?  For the
moment, the only solution I can think of is to convert the
datafile using Fortran (or whatever) to the normal order
(k=1 for z=0, k=2 for z=10m, . . . , k=101 for z=1000m) and
to use

   define axis/z=0:1000:10/depth  z_axis

Regards,
Ryo

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement