[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[IDV #BVE-541882]: vector divided by data
- Subject: [IDV #BVE-541882]: vector divided by data
- Date: Fri, 07 Mar 2008 05:41:50 -0700
Hi Alberto-
I will get back to you next week on this.
Don
> Dearest Don (Ok... I guess it's always Don Murray behind the
> curtains :-) ). Thanks God.
>
> Seriously, thanks for your offer beforehand... I definitely think I
> need your help... Let me tell you I'm planning to include your name on
> the citations, references and thanks chapters of my research work...
> If you kindly allow me to :-) You can eventually include a reference
> to my work in your CV if you like.
>
> Ok...I'm trying to derive the Ekman vectors of the very first Ekman
> layer. Winds blowing over the sea induce water currents which are
> always 45º to the right of the wind forcing vector: that simple. The
> module (induced water current speed) is obtained with this simple
> expression:
>
> V0 = 0.0127·W/sqrt(sen(L)) where
>
> 0.0127 is a dimensionless parameter
> W is the wind vector module, W=sqrt(U10*U10+V10*V10) in m/s
> sqrt(sen(L)) is the sine of the Latitude, square rooted (dimensionless)
>
> The Ekman vector (water current speed) is then builded in this simply
> way: V = (V0*cos(45), V0*sin(45)) (just a 45º vector bended to the
> right with respect to to the origin of coordinates and with module
> V0). V is build with makeTrueVector().
>
> BUT... V must always be 45º bended to the right of the wind vector
> W(U10,V10) (and not the origin of coordinates), that's why I must
> finally add both vectors V+W. BUT as W is ~100 times greater than V,
> if I add the two vectors, I'll end up with a sum vector which will
> almost be like W... that's why I had the idea of reducing W's module
> to V0. I'm just interested in angle sum... I already know the water
> current vector intensity (V0).
>
> I don't know if I'm explaining myself... the induced water current
> speed vector is just a vector with module V0 and bended 45º to the
> right of the forcing wind vector. Example: if the W is 60º, then V is
> 45º to the right of that (that's 105º) and module V0.
>
> The reasoning is extremely simple but somehow awkward for me to
> program it on jythoon/IDV. If you could help I'd be strongly and
> eternally thankful. If I could make this simple calculation directly
> on IDV I'll be able to paint and animate water currents very easily.
> And on the fantastic IDV.
>
> Best regards from Spain,
> Alberto.
>
> PS: the reason why I'm including HGT (terrain height) on the formula
> is just a trick planned for later. I was planning to multiply the sum
> vector by a power of cos(HGT)... Why? Very simple: is just a quick
> trick to faint V0 module when terrain height goes up (on land)...
> because I don't want sea surface current speed vector to be painted on
> land :-) I guess IDV doesn't understand that V is water current and
> it's not to paint anything on land. IDV is smart, but not so smart as
> to understand that.
>
>
>
>
>
> El 06/03/2008, a las 16:53, Unidata IDV Support escribió:
>
> > Hi Alberto-
> >
> >> (If you're Don Murray replying me, thanks for your previous help!)
> >
> > Glad to help.
> >
> >> Hi... My name is Alberto Corbí and I'm a PhD Student happily using
> >> IDV
> >> to analyze WRF netCDF output. Here's my question.
> >>
> >> I'd like to have a wind vector (composed with makeTrueVector) divided
> >> by a "number" derived from the current latitude. And I get this
> >> message:
> >>
> >> visad.TypeException: visad.TypeException: FunctionType.binary: types
> >> don't match
> >
> > The problem is that you are trying to divide a vector by a scalar
> > and this is not allowed in the abstract VisAD math model. You need
> > to divide each component of the vector by the scalar.
> >
> > In general, the VisAD data model carries along units with all
> > mathematical operators so you need to be careful about making
> > sure your units all are compatible. See below:
> >
> >>
> >> Here's my very very simple function:
> >>
> >> def ekmanVector(U10,V10,HGT):
> >> W=sqrt(U10*U10+V10*V10)
> >> V0=0.0127*W/sqrt(sin(latr(U10)))
> >> vector=makeTrueVector(V0*0.707,V0*0.707)
> >> vector2=makeTrueVector(U10,V10) / V0 <- Here's the error (or so
> >> I believe)
> >> sum=add(vector2,-vector)
> >> return sum
> >
> > So, if you change the above to:
> >
> > def ekmanVector(U10,V10,HGT):
> > W=sqrt(U10*U10+V10*V10)
> > V0=0.0127*W/sqrt(sin(latr(U10)))
> > vector=makeTrueVector(V0*0.707,V0*0.707)
> > vector2=makeTrueVector(U10,V10)
> > vector2=vecr(ur(vector2)/V0,vr(vector2)/V0)
> > sum=add(vector2,-vector)
> > return sum
> >
> > You'll get a little further. However, dividing the U component
> > of vector2 by V0 will result in dimensionless units (m.s-1/m.s-1)
> > so you'll end up with a UnitException when trying to add
> > vector2 (dimensionless) to -vector (m.s-1).
> >
> >> I'm just trying to derive Ekman surface currents: that simple!
> >
> > Can you send along the formula or a reference so I can try to
> > assist you further? That will help me understand what units
> > the constants (0.0127, 0.707) are supposed to be. Also, what is
> > HGT being used for?
> >
> >> Thanks millions in advance, (again, I haven't found anything in
> >> forums
> >> nor in mailing lists and I'm sorry to disturb you)
> >
> > Thanks for checking there first.
> >
> > Don Murray
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: BVE-541882
> > Department: Support IDV
> > Priority: Normal
> > Status: Open
> >
>
> Alberto Corbi Bellot
> Estudiante 3er Ciclo
> Ciencias del Mar
> Universidad Católica de Valencia
> San Vicente Mártir
> Tel: 610457462
>
>
Ticket Details
===================
Ticket ID: BVE-541882
Department: Support IDV
Priority: Normal
Status: Open