A vertical cross section of temperature does not show as much structure as possible because the vertical temperature gradient is much larger than the horizontal temperature gradient. One way to solve this problem is to subtract the U. S. Standard Atmosphere from the temperature field, and create a vertical cross section of temperature anomaly.
This exercise will show how Jython can be used in the IDV for complex calculations like this.
Sample RUC Data
data source.
Contour Vertical Cross Section
of
the 3D grid->temperature
fieldEdit→Formulas→Jython Library
menu item...workshop/default.py
tab
which is the Jython library loaded from the plugin. You should see:
def tempAnom(t): """ temperature anomaly from U.S. Standard Atmosphere """ # get pressure levels of temperature grids p=extractPressureFromNWPGrid(t) # calculate temperature for a constant lapse rate (6.5 C/km) atmosphere tstd=288.15*(p/1013.25)**(287.05*.0065/9.806) # change temperature in stratosphere to isothermal (216.65 K) for i in range(len(p)): if p[i] < 225.0: tstd[i]=216.65 # change the units to K tstd = newUnit(tstd,"tstd","K") # calculate the temperature anomaly tanom=t-tstd return tanom
If it is not there, paste this formula into your locally editable
library and click the Save
button.
Edit→Formulas→Create Formula
menu item.Name:
anomaly of temperatureFormula:
tempAnom(temperature)Group:
WorkshopAdd Formula
button.Formulas
data source
in the Field Selector
.
anomaly of temperature
formula under the
Workshop tab in the Fields
panel.
Displays
pane select
Contour Vertical Cross Section
Create Display
buttonOK
buttonEdit→Sharing
menu of each display control, check
the Sharing On
item.