# repeat loop over depth axis

```Hello,

How do I get the repeat command to loop over the depth axis (as, say,
in a FORTRAN do loop)?

I am using the SODA data, which give U and V as functions of (x,y,z,t)
and sea level (eta) as a function of (x,y,t).  I want to define the
vertical velocity w as a function of (x,y,z,t) for some calculations.

To do this, I computed w at the surface (using eta, U, and V), but am
not able to use the repeat loop over depth (k index) to integrate
(using @din) the horizontal divergence field.  Since I need w at
several depths, I do not want to freeze the lower limit of the
integral.

A related question concerning the computation of w ...

The SODA data also include a depth attribute called depthedges.  The
last value of this atribute charts the bottom topography.  Is it
possible to use this attribute in ferret?  I need it to compute the w
field. (As before, I also need to be able to "repeat" over depth to
compute the integral using @din.)

>From the SODA netCDF file ...

dimensions:

DEPTH = 20 ;
DEPTHedges = 21 ;

variables:

double DEPTH(DEPTH) ;
DEPTH:units = "meters" ;
DEPTH:positive = "down" ;
DEPTH:point_spacing = "uneven" ;
DEPTH:edges = "DEPTHedges" ;

double DEPTHedges(DEPTHedges) ;
DEPTHedges:edges = " " ;

data:

DEPTH = 7.5, 22.5, 37.5, 52.5, 67.5, 82.5, 97.5, 112.5, 127.5, 142.5,
157.5, 190.61, 276.27, 443.79, 714.46, 1099.46, 1598.79, 2201.3, 2885.6,
3622.5 ;

DEPTHedges = 0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 174.055,
233.44, 360.03, 579.125, 906.96, 1349.125, 1900.045, 2543.45, 3254.05,
3990.95 ;

Regards, Shankar.

D. Shankar                           Ph. (O): [91](832) 22 6253 * 4312/4400
Physical Oceanography Division,                         22 1322 * 4312/4400
National Institute of Oceanography,      (R): [91](832) 23 8208
Dona Paula,                          Fax    : [91](832) 22 3340/9102
Goa 403 004,                         email  : shankar@darya.nio.org
India.                                        shankar@csnio.ren.nic.in

```