lair.air.soundings#

Upper air sounding data.

Module Attributes

SOUNDING_DIR

Sounding data directory

Functions

download_sounding(station, date[, dst])

Download an upper air sounding from the Wyoming archive.

download_soundings(station, start, end[, ...])

Download upper air soundings from the Wyoming archive.

get_soundings([station, start, end, ...])

Get upper air soundings from the Wyoming archive.

merge(soundings)

Merge a list of sounding data.

valleyheatdeficit(data[, integration_height])

Calculate the valley heat deficit.

Classes

Sounding(path)

Upper air sounding data.

lair.air.soundings.SOUNDING_DIR = '/uufs/chpc.utah.edu/common/home/lin-group11/group_data/soundings'#

Sounding data directory

class lair.air.soundings.Sounding(path: str)[source]#

Upper air sounding data.

Attributes

path

(str) The path to the sounding data.

filename

(str) The filename of the sounding data.

station

(str) The station identifier.

time

(datetime) The date and time of the sounding.

data

(pd.DataFrame) The sounding data.

Methods

interpolate(start=1289, stop=5000, interval=10)

Interpolate sounding data to regular height intervals.

__init__(path: str)[source]#

Initialize a Sounding object.

Strips the station identifier and time from the filename and reads the data.

Parameters:
pathstr

The path to the sounding data.

interpolate(start=1289, stop=5000, interval=10)[source]#

Interpolate sounding data to a specified height.

Parameters:
startint

The starting height.

stopint

The stopping height.

stepint

The height step.

Returns:
xr.Dataset

The interpolated sounding data.

lair.air.soundings.merge(soundings: list) DataFrame[source]#

Merge a list of sounding data.

Parameters:
soundingslist

A list of Sounding objects.

Returns:
pd.DataFrame

The merged sounding data.

lair.air.soundings.download_sounding(station, date, dst=None) str[source]#

Download an upper air sounding from the Wyoming archive.

Parameters:
stationstr

The 4-letter station identifier. # FIXME: 3-letter?

datedatetime

The date and time.

dststr

The destination directory.

Returns:
str

The path to the downloaded sounding data.

lair.air.soundings.download_soundings(station, start, end, dst=None, months=None)[source]#

Download upper air soundings from the Wyoming archive.

Parameters:
stationstr

The 4-letter station identifier.

startdatetime

The start date and time.

enddatetime

The end date and time.

dststr

The destination directory.

monthslist

The months to download.

lair.air.soundings.get_soundings(station='SLC', start=None, end=None, sounding_dir=None, months=None, driver='xarray', **kwargs)[source]#

Get upper air soundings from the Wyoming archive.

Parameters:
stationstr

The 4-letter station identifier.

startdatetime

The start date and time.

enddatetime

The end date and time.

sounding_dirstr

The directory containing the sounding data.

Returns:
pd.DataFrame

The sounding data.

lair.air.soundings.valleyheatdeficit(data: Dataset, integration_height=2200) DataArray[source]#

Calculate the valley heat deficit.

Whiteman, C. David, et al. “Relationship between Particulate Air Pollution and Meteorological Variables in Utah’s Salt Lake Valley.” Atmospheric Environment, vol. 94, Sept. 2014, pp. 742-53. DOI.org (Crossref), https://doi.org/10.1016/j.atmosenv.2014.06.012.

Parameters:
dataxr.DataSet

The sounding data.

integration_heightint

The height to integrate to [m].

Returns:
xr.DataArray

The valley heat deficit [MJ/m^2].