# [Fwd: Question About Variable Limits of Integration]

```For general interest: how to tell Ferret to integrate in 3 dimensions
with complex integration limits
```
--- Begin Message ---
```Hi Ben,

If you perform a definite integral (@DIN) in 3 dimensions (X,Y & Z), Ferret
will perform this as a true 3-dimensional integral. Limits on an axis, which
are themselves dependent on the orthogonal axes, can be represented in the way
the variable is masked (where missing values are placed.

The following example illustrates a volume integral over highly irregular
limits. Notice that the output is documented as "XYZ integ." -- indicating the
multi-dimensional integration used.

- steve

yes? use levitus_climatology
yes? let temp_gt_15 = if temp gt 15 then temp

yes? list temp_gt_15[x=@din,y=@din,z=0:1000@din]
IF TEMP GT 15 THEN TEMP
LONGITUDE: 20E to 20E(380) (XYZ integ.)
LATITUDE: 90S to 90N (XYZ integ.)
DEPTH (m): 0 to 1000 (XYZ integ.)
DATA SET: /home/r3/tmap/fer_dsets/descr/levitus_climatology.des
1.028E+18

=================================================

blintner@socrates.berkeley.edu wrote:

> Ferret Developers,
>
>   I have a question concerning limits of integration of one coordinate
> that vary with other coordinates.  What I would like to do is perform
> an integration of a field over x, y, and z, where the limits of
> integration of the y coordinate depend on x, z, and t.  The lower limit
> of integration of the y coordinate is derived by maximizing another field,
> and the values of y limits of integration obtained depend on the
> remaining coordinates.  For example, for i=1, k=1, l=1, the lower limit
> is y(i=1,k=1,l=1)=2S, for i=2, k=1, l=1, the lower limit is
> y(i=2,k=1,l=1)=4N, and so on and so forth.  Do you have any suggestions
> how I might accomplish this integration?  Thanks you.
>
> Ben Lintner

--

|  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

```
--- End Message ---