Re: [idvusers] IDV formulas

Hi Luis...

I'm not sure that "degrees" is a valid unit in this case, since it
really needs to be qualified (as in "degrees_north" or "deg_K").

Regardless, however, if your desire is to strip the units from this
computation, I suggest you use the "noUnit()" method....something like
this

def     landSlideH(sr, si, sh, ts, tp, tpr, tpre):
        ptot= noUnit(tp + tpr + tpre)
        h = noUnit(sr*si*sh) * noUnit(ts + ptot)
        return h

(here I assume that the units of "tp", "tpr" and "tpre" are
compatible...if not, then you'll need to use "noUnit()" on
each...likewise, "ts" and "ptot" are compatible...:)

tom

On Tue, Dec 7, 2010 at 6:59 PM,  <luis.delcastillo@xxxxxxxxxxxx> wrote:
> For the Tp = no units and  The other variables have been reclassified to 
> values 0 - 5. Units degrees
> Correo electronico generado desde un BlackBerry de movistar.
>
> -----Original Message-----
> From: Tom Whittaker <whittaker@xxxxxxxx>
> Date: Tue, 07 Dec 2010 18:16:19
> To: Luis Del Castillo<luis.delcastillo@xxxxxxxxxxxx>
> Cc: <idvusers@xxxxxxxxxxxxxxxx>
> Subject: Re: [idvusers] IDV formulas
>
> Luis -- What are the units of each of your fields?
>
> tom
>
> On Tue, Dec 7, 2010 at 2:57 PM, Luis Del Castillo
> <luis.delcastillo@xxxxxxxxxxxx> wrote:
>> Tom after you send me your email I did this:
>>
>> (newUnit(Sr, "ries", "R")*newUnit(SI, "ries", "R")*newUnit(Sh, "ries", 
>> "R"))*(newUnit(Ts, "ries", "R") + (newUnit(P, "ries", "R") + newUnit(P1, 
>> "ries", "R") + newUnit(P2, "ries", "R")))
>>
>> This is the only way that I saw a correct evaluation of the formula and I 
>> see it when I plot each layer values as Value plots.
>> If I just run (Sr*SI*Sh)*(Ts + Tp) I get a bad value something like 
>> (4*5*2)*(3 + 50)  = 4 and since I use precipitation accumulated 72 hr I must 
>> get a high value.
>>
>> So could be true about the incompatibility between Ts and Tp so am wondering 
>> what could be the best way to reassign unit here because the output like 250 
>> or 450 is going to be in hight risk, low risk.
>>
>> Bay the way I am trying to write a procedure like this one
>>
>> def     landSlideH(sr, si, sh, ts, tp, tpr, tpre):
>>        ptot= tp + tpr + tpre
>>        h = (sr*si*sh)*(ts + ptot)
>>        return h
>>
>> Can I use newUnit inside it?
>>
>> Thanks
>> Luis
>>
>> -----Original Message-----
>> From: Tom Whittaker [mailto:whittaker@xxxxxxxx]
>> Sent: martes, 07 de diciembre de 2010 03:23 p.m.
>> To: Luis Del Castillo
>> Cc: idvusers@xxxxxxxxxxxxxxxx
>> Subject: Re: [idvusers] IDV formulas
>>
>> Hi Luis...
>>
>> It would seem to me that if there is a unit compatibility issue with
>> this formla:
>>
>> equation is  H = (Sr*SI*Sh)*(Ts + Tp) .
>>
>> it would have to be between Ts and Tp.  Is that true?  Or is there
>> some other issue here?
>>
>> Best wishes,
>>
>> tom
>>
>> --
>> Tom Whittaker
>> University of Wisconsin-Madison
>> Space Science & Engineering Center (SSEC)
>> Cooperative Institute for Meteorological Satellite Studies (CIMSS)
>> 1225 W. Dayton Street
>> Madison, WI  53706  USA
>> ph: +1 608 262 2759
>>
>
>
>
> --
> Tom Whittaker
> University of Wisconsin-Madison
> Space Science & Engineering Center (SSEC)
> Cooperative Institute for Meteorological Satellite Studies (CIMSS)
> 1225 W. Dayton Street
> Madison, WI  53706  USA
> ph: +1 608 262 2759
>



-- 
Tom Whittaker
University of Wisconsin-Madison
Space Science & Engineering Center (SSEC)
Cooperative Institute for Meteorological Satellite Studies (CIMSS)
1225 W. Dayton Street
Madison, WI  53706  USA
ph: +1 608 262 2759



  • 2010 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the idvusers archives: