Hi Joel,

Thanks for your email.

Joel Richardson wrote:
> 
> Steve,
> 
> >
> > This just scales the depth back.  What I really want is to feed Depth
> > into the Compute module as input B and use the Expression:
> >
> >       [a.x, a.y, a.z * [b.x, b.y] / 22]
> >
> > When I do this, I get the following in the Message Window:
> >
> >       Error: Compute: Bad parameter: Inputs must be of same length / Input 1
> > not matching the master (input 0).
> >
> 
> This means that the number of depth values is different from the
> number of positions. Compute wants its inputs to be arrays
> of the same length. It then computes the expression
> for each set of corresponding elements. 

So I'm guessing that I'd use Make3DField then to add a third dimension?
I'm finding no documentation of Make3DField.  Has anybody used this to
create a 3D array out of a 2D array where each vertical slice (Dimension
Z) is a copy of the original 2D array?  I see the Stack module and I've
given it a try too but it isn't cooperating (or I guess I'm not).  I
can't see where to tell it that I want the 3rd dimension to have 22
levels.

> As a special case,
> an input can be a single value (array of length 1), in which case
> the same value is used throughout.

> Your expression also has an error - which Compute will complain
> about next, after the inputs are the same length. If what you
> want is to multiply a.z by the length of vector b, try:
>         [a.x, a.y, a.z * mag(b) / 22 ]

What I want is to multiply a(x,y,z) by b(x,y) where b(x,y) is the depth
at grid point (x,y).  It really isn't a vector so I don't think mag()
applies.  I think that if I can construct a 3D version of the depth
array then I'd just do:

        [a.x, a.y, a.z * b.z / 22 ]
 
Thanks very much for your help,

Regards,

Steve
-- 
______________________________________________________________________
 Steve Cousins, Ocean Modeling Group    Email: [EMAIL PROTECTED]
 Marine Sciences, 208 Libby Hall        http://rocky.umeoce.maine.edu
 Univ. of Maine, Orono, ME 04469        Phone: (207) 581-4302

Reply via email to