NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [idvusers] Pow Command in formula definition

Hi Juan,

Here is what you will need to do:

First define a Jython function (Edit, Formulas, Jython Library, User's
Library).

,----
| def windchill(temp, wspeed):
|     """
|     Windchill formula according to
https://en.wikipedia.org/wiki/Wind_chill
|     """
|     # Must strip off units to make VisAD happy.
|     T = noUnit(temp)
|     WS = noUnit(wspeed)
|     # ** is how you exponentiate, to answer your original question
|     WC = 13.12 + 0.6215 * (T - 273.15) - 11.37 * (WS * 3.6)**0.16 +
0.3965 * (
|         T - 273.15) * (WS * 3.6)**0.16
|     # Reattaching units.
|     return newUnit(WC, "windchill", "celsius")
`----

Save your new Jython function.

Now go to the Edit, Formulas, Create Formula menu item. The description
and name of the formula are up to you. The formula will be:

,----
| windchill(temperature, windspeed)
`----

At this point, load up some data. You will see your new formula in the
IDV Dashboard, Field Selector tab. When you create a display with it,
the IDV will prompt you for the fields you want. Select 3D fields. I
don't think 2D fields will work.

Hope this helps.

Best,

Unidata IDV Support


On Fri, Apr 29, 2016 at 10:08 AM, Juan Figueroa <juanfigueroa@xxxxxxxxxxx>
wrote:

> Hello everyone, I'm trying to calculate the thermal sensation with Siple
> and Passel formula but i dont know how to calculate powers in IDV, the
> equation is:
>
> [image: T_{s}=13,12+0,6215\cdot T-11,37\cdot V^{0,16}+0,3965\cdot T\cdot
> V^{0,16}]
>
> as you can see I need to raise the rate to 0.16 meters per second, can
> someone help?
>
> Thank you.
>
> --
> *- - - - - - - - - - - - - - - - - - - - - - - - - -  - -*
>
> * - - - - - - - - - - - - - - - -  - - - - - - - - - - *
>
> *jn 3:16*
> _______________________________________________
> idvusers mailing list
> idvusers@xxxxxxxxxxxxxxxx
> For list information, to unsubscribe, visit:
> http://www.unidata.ucar.edu/mailing_lists/
>



-- 
Julien Chastang
Scientific Software Developer
Unidata-UCAR


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