Previous: Jython Methods Next: Doing More with Jython Table of contents Frames User guide
ITC-IDV Workshop for NGIC > Accessing and Displaying Data > Diagnostic Functions: Formulas and Jython

3.2.2 Doing More With Formulas

A formula for wind chill, and more details about formula names, categories, and variable names

First review Basics of IDV Formulas.

  1. A Formula for the JAG-TI Wind Chill
  2. Here is a wind chill contour plot:

More Details about Formula Names, Categories, and Variable Names

The Description is listed in the Field Selector's Fields panel. If you leave the Description field empty, the name of the formula will be used as the description.

Group is a way of categorizing your formulas and is optional. If the Group does not already exist, it is added when you save the new formula. If the Group already exists, the new formula will appear under that group's tab in the Field Selector's Fields panel. If you leave the Group empty, the formula appears in the list directly.

The variable names in the formula definition, such as dpt, are dummy names, and in principle can be anything, such as "a" or "var2". It is best to use variable names that suggest the parameter data they represent so that later in the parameter selection step you remember what the variables should represent. Use names like Temp500m, RelHum_surf, absvort, sst_jan, or whatever makes sense to you. If you use a variable names like V1 and V2, then later when the formula requests which real parameter name goes with which dummy variable name you may be puzzled.

Once you have defined a formula, it is saved and will appear in future runs of your IDV. It is saved in your personal copy of the derived.xml file, which usually is in the file ~/.metapps/DefaultIdv/derived.xml on UNIX systems.

Holding the mouse pointer stationary over the formula name in the Field Selector's Fields panel will cause a tooltip box to appear showing the formula name and the mathematical formula.

Formulas are preserved by the IDV. Next time you start the IDV you will see formulas you created before. You can build up a library of your own formulas.

To remove a formula, click on Remove formula in the Field Selector's formula pull down menu. This does not remove a display of calculations made with a formula, it removes the formula itself from the Field Selector window. Usually you leave formulas in place until you are sure you will not use them again.

 


Previous: Jython Methods Next: Doing More with Jython Table of contents Frames User guide
ITC-IDV Workshop for NGIC > Accessing and Displaying Data > Diagnostic Functions: Formulas and Jython