# UAH LTG IDL Library

## IDL Routines from Phillip Bitzer and UAH Lightning Group

summary     class     fields     routine details     file attributes

# ats_plot_sounding.pro

Sounding, Atmospheric Science, ATS509

includes main-level program

Given an array of temperatures and pressures, produce a simple temperature profile. Note this is not the same as a Skew-T plot!

On success, a dictionary of plots is returned. See the examples for more.

This is a working file for use with ATS509.

## Examples

Use is fairly straightfoward:

 t = FINDGEN(100) - 10. p = REVERSE(FINDGEN(100) * 10. + 10.) plt = ats_plot_sounding(t, p) 
At the minimum, two keys are in the dictionary:
 help, plt.temp ;temperature/pressure plot object help, plt.isobars ;list of polyline objects 
The isobars are included as a list, so if you wanted to change their line style you could do this:
 FOREACH iso, plt.isobars DO iso.linestyle='dotted' 
Depending on what keywords are set, additional keys will be in the dictionary.

Another example is included as a main level program.

## Author information

Author

Phillip M. Bitzer, University of Alabama in Huntsville, pm.bitzer "AT" uah.edu

History

Modification History:

 First written: Aug 7, 2012 Renamed to ats_plot_sounding. Also changed style convention of variables 201310 PMB Rewritten as a function 20171021 PMB See Git log for future changes. 

Uses:

None.

## Routines

### Routines from ats_plot_sounding.pro

result = ats_plot_sounding_freezing(pFrz, xRange)

Helper routine to plot the freezing level as a horizontal line.

result = ats_plot_sounding_isobars(whichIsobars)

Helper routine to plot isobars.

result = ats_plot_sounding(temperature, pressure [, /Freezing] [, TDewpt=numeric array] [, PressureFreezing=number])

Main routine that, given arrays of temperature and pressure, produces a basic plot.

## top ats_plot_sounding_freezing

result = ats_plot_sounding_freezing(pFrz, xRange)

Helper routine to plot the freezing level as a horizontal line.

### Return value

A plot object for the freezing level. Future modification should also return the text annotation.

### Parameters

pFrz in required type=float

The pressure corresponding to the freezing level.

xRange in required type=array

An array of two elements correspinding the endpoints to be used that defined the width of the line. Nominally, this is just the current plot range. (See ats_plot_sounding_isobars for an alternate way of doing this.)

## top ats_plot_sounding_isobars

result = ats_plot_sounding_isobars(whichIsobars)

Helper routine to plot isobars. Future update should include the ability to specify specifc isobars. The x-range of the current plot is used (which should correspond to the temperatures in the "main" part of this program).

### Return value

A list of plot objects, corresponding to each isobar.

### Parameters

whichIsobars in required type=array

An array of pressure values to be plotted as isobars.

## top ats_plot_sounding

result = ats_plot_sounding(temperature, pressure [, /Freezing] [, TDewpt=numeric array] [, PressureFreezing=number])

Main routine that, given arrays of temperature and pressure, produces a basic plot.

### Return value

A dictionary of various plots. See the top-level file documentation for more.

### Parameters

temperature in required type=numeric array

The temperatures to be plotted, in degrees Celsius

pressure in required type=numeric array

The pressures to be plotted, in hPa

### Keywords

Freezing in optional type=boolean default=0B

If set, the freezing level will be plotted. In addition, the returned dictionary will contain a key freezing corresponding to this plot object.

TDewpt in optional type=numeric array

If an array is provided the same size as pressure, then a plot corresponding to the values will be plotted. In addition, the returned dictionary will contain a key tDewpt corresponding to this plot object.

PressureFreezing out optional type=number

If a variable is provided, the pressure of the freezing level will be returned in this keyword.

Uses:

None, external.

## File attributes

 Modification date: Wed Nov 1 16:24:52 2017 Lines: 68 Docformat: rst rst