The IDV is not only a data visualization package, but it is also a powerful analysis package. The IDV has several built-in functions that range from very simple operations, such as negating a field (that is, changing the sign of all of the values on the grid), to more complex operations, such as computing the horizontal flux divergence field. These built-in operations can be accessed through the
Field Selector tab by clicking on
Forumlas in the Data Sources side panel.
As an example, let's use a formula to compute the 500 mb - 850 mb wind speed shear:
Field Selectorpanel, select
Formulasfrom the Data Sources panel and click
Grids→Layer Wind Shear, then select
Color Filled Contour Plan Viewas the display and click
The IDV will prompt you for which levels you would like to calculate the shear between (top and bottom), and the fields (u, v, and z) needed to compute the layer shear.
u, expand the data source for your WRF output and select the
3D grid→u_wind @ isobaricfield.
v, expand the data source for your WRF output and select the
3D grid→v_wind @ isobaricfield.
z, expand the data source for your WRF output and select the
3D grid→Geopotential_height @ isobaricfield.
Formulas in the IDV are defined using Jython, which means extending the analysis capabilities of the IDV can be done by adding new Jython functions (much easier than editing the IDV Java code!) As an example, let's add a Jython formula to compute wind speed (although one already exists, it's still a good exercise to go through):
Edit→Formulas→Create Formula. The
Formula Editorwindow should appear.
Nameof your forumla:
windspeed(one word - no space).
Formulaentry field using the Jython syntax. The formula is
sqrt(u**2 + v**2)
Advancedpanel in the Formula Editor.
Descriptionfor the forumula:
wind speed from u and v.
Displayssection, click the
Use selectedradio button, then click the
Plan Viewscategory and check the
Contour Plan Viewoption. Also, expand the
3D Surfacecategory and check the
A new item
wind speed from u and v should appear in the
Field Selector window's
Fields panel, under
Workshop. We've only touched on the basics of the use of formulas in the IDV - please see the IDV Formulas for more details.