sharppy.databases package

Submodules

sharppy.databases.inset_data module

Contains data to be drawn on various insets (such as the line graphs and box and whisker plots in the SHIP or STP EF insets)

sharppy.databases.inset_data.condSTPData()[source]
sharppy.databases.inset_data.sherbData()[source]
sharppy.databases.inset_data.shipData()[source]
sharppy.databases.inset_data.stpData()[source]
sharppy.databases.inset_data.vrotData()[source]

sharppy.databases.pwv module

Handles comparing the loaded sounding against the PWV climatology

class sharppy.databases.pwv.PWDatabase(data_path='/Users/travis/build/sharppy/SHARPpy/sharppy/databases')[source]

Bases: object

getClimo(loc, month=None)[source]
getStddev(stddev, loc, month=None)[source]
sharppy.databases.pwv.get_mean_pwv(station)[source]

Function to get the mean precipitable water vapor (inches) values for every month of the year, based on the station passed through.

Parameters
  • Staion (Can be the 4 letter station ID (i.e. KOUN), 3 letter station) –

  • (i.e. OUN), or the 5 digit WMO ID (i.e. 72357) (ID) –

Returns

  • mean_pwv (1D Array of float values corresponding to the mean PWV)

  • Jan - December.

  • Written by Greg Blumberg

  • and Kelton Halbert.

sharppy.databases.pwv.get_stdev_pwv(station)[source]

Function to get the standard deviation from the mean precipitable water vapor (inches) values for every month of the year, based on the station passed through.

Parameters
  • Staion (Can be the 4 letter station ID (i.e. KOUN), 3 letter station) –

  • (i.e. OUN), or the 5 digit WMO ID (i.e. 72357) (ID) –

Returns

  • stdev_pwv (1D Array of float values corresponding to the standard deviation)

  • from the mean PWV

  • Jan - December.

  • Written by Greg Blumberg

  • and Kelton Halbert.

sharppy.databases.pwv.pwv_climo(prof, station, month=None)[source]

month is an integer from 1-12 station_id_3 is the station ID (lower case) prof is the profile object

This function uses the PWV climatology databases provided by Matt Bunkers (NWS/UNR) and accepts a SHARPPY profile object, the station name, and the month and returns to the user a number indicating where in the distribution the profile’s PWV value lies. This function is used in SHARPPY to help provide the user climatological context of the PWV index they are viewing.

x can equal 0, 1, 2, or 3 If the returned value is x, the PWV lies outside +x standard deviations of the mean If the returned value is -x, the PWV lies outside -x standard deviations of the mean If the returned value is 0, the PWV lies within 1 standard deviation of the mean

Written by Greg Blumberg and Kelton Halbert.

sharppy.databases.sars module

Handles comparing the loaded sounding against past severe weather soundings (the SARS function).

sharppy.databases.sars.getSounding(match_string, match_type, profile='default')[source]

Given a match string and type (supercell:hail) from one of the SARS routines, decode the raw sounding data into a Profile object and return said object. It will default to a “default” profile object that does not compute any indices, but can be set to profile=”convective” if indices are desired.

Parameters
  • match_string

  • match_type

Returns

a Profile object

sharppy.databases.sars.get_sars_dir(match_type)[source]

Returns the directory where the raw SARS files are.

Parameters

match_type (str) – ‘supercell’ or ‘hail’

Returns

Return type

string

sharppy.databases.sars.hail(database_fn, mumr, mucape, h5_temp, lr, shr6, shr9, shr3, srh)[source]

The SARS Hail database was provided by Ryan Jewell of the NOAA Storm Prediction Center in Norman, Oklahoma. This is a database of observed and model proximity analogue soundings to hail events.

This function works by searching for matches to particular variables in the database that have been attributed to hail events given a certain range of uncertainty. The loose matches are used for statistics such as % significant hail matches, and are based on a looser criteria for matches. The analogues that get displayed are based on a tighter criteria for matches to insure that only quality matches are received. Ranges for loose and quality matches are semi-arbitrary, and were tuned by testing internally by SPC.

The loose matches are based on the most unstable parcel mixing ratio (mumr), most unstable cape (mucape), 700-500mb labse rate (lr), 500mb temperature (h5_temp), 0-3km shear (shr3), 0-6km shear (shr6), and the 0-9km shear (shr9).

The ranges for the loose matches are set as such:

mumr: +/- 2.0 g/kg mucape: +/- 30% J/kg lr: +/- 2.0 C/km h5_temp: +/- 9.0 C shr6: +/- 12 m^2/s^2 shr9: +/- 22 m^2/s^2 shr3: +/- 10 m^2/s^2

The quality matches use the fields described in the loose matches, plus the 0-3km Storm Relative Helicity (srh). The bounds for the search for quality matches is much more strict that the loose matches.

The ranges for the quality matches are set as such:

mumr: +/- 2.0 g/kg mucape < 500 J/kg: +/- 50% J/kg mucape < 2000 J/kg: +/- 25% J/kg mucape >= 2000 J/kg: +/- 20% J/kg lr: +/- 0.4 C/km h5_temp: +/- 1.5 C/km shr6: +/- 6 m^2/s^2 shr9: +/- 15 m^2/s^2 shr3: +/- 8 m^2/s^2 srh < 50 m^2/s^2: +/- 25 m^2/s^2 srh >= 50 m^2/s^2: +/- 50% m^2/s^2

Parameters
  • - most unstable parcel mixing ratio (g/kg) (mumr) –

  • - most unstable CAPE (J/kg) (mucape) –

  • - 500 mb temperature (C) (h5_temp) –

  • - 700-500 mb lapse rate (C/km) (lr) –

  • - 0-6 km shear (m/s) (shr6) –

  • - 0-9 km shear (m/s) (shr9) –

  • - 0-3 km shear (m/s) (shr3) –

  • - 0-3 Storm Relative Helicity (m2/s2) (srh) –

Returns

  • quality_match_dates (str) - dates of the quality matches

  • quality_match_sizes (float) - hail sizes of the quality matches

  • num_loose_matches (int) - number of loose matches

  • num_sig_reports (int) - number of significant hail reports (>= 2 inches)

  • prob_sig_hail (float) - SARS sig. hail probability

sharppy.databases.sars.supercell(database_fn, mlcape, mllcl, h5temp, lr, shr, srh, shr3k, shr9k, srh3)[source]

The SARS Supercell database was provided by Rich Thompson of the NOAA Storm Prediction Center in Norman, Oklahoma. This is a database of observed and model proximity soundings to both tornadic and nontornadic supercell thunderstorms.

This function works by searching for matches to particular variables in the database that have been found to be useful in forecasting supercell thunderstorms. It searches through the database to find matches to a given sounding within a range of uncertainty that has been tested internally in SPC to provide the best analogues possible. There is a loose criteria that is used to get probabilities, and there is a tighter criteria for quality matches that are supposed to be similar to the given sounding.

The loose matches are based on the mixed layer cape (mlcape), mixed layer lcl (mllcl), 0-1km shear (shr), 0-1km storm relative helicity (srh), 500mb temperature (h5temp), and the 700-500mb lapse rate (lr).

The ranges for the loose matches are set as such:

mlcape: +/- 1300 J/kg mllcl: +/- 500 m shr: +/- 14 kts srh < 50 m^2/s^2: +/- 100 m^2/s^2 srh >= 50 m^2/s^2: +/- 100% m^2/s^2 h5temp: +/- 7.0 C lr: +/-1.0 C/km

The quality matches are based on the same variables as the loose matches, with the addition of the 0-3km shear (shr3k), 0-9km shear (shr9k), and the 0-3km Storm Relative Helicity (srh3).

The ranges for the quality matches are set as such:

mlcape: +/- 25% J/kg mllcl: +/- 200 m shr: +/- 10 kts srh < 100 m^2/s^2: +/- 50 m^2/s^2 srh >= 100 m^2/s^2: +/- 30% m^2/s^2 srh3 < 100 m^2/s^2: +/- 50 m^2/s^2 srh3 >= 100 m^2/s^2: +/- 50% m^s/s^2 h5temp: +/- 5 C lr: +/- 0.8 C/km shr3k: +/- 15 kts shr9k: +/- 25 kts

Parameters
  • - filename of the database (database_fn) –

  • - the mixed layer cape (J/kg) (mlcape) –

  • - the mixed layer LCL (m) (mllcl) –

  • - the 500mb temp (C) (h5temp) –

  • - the 700-500mb lapse rate (C/km) (lr) –

  • - the 0-1km shear (kts) (shr) –

  • - the 0-1km storm relative helicity (m^2/s^2) (srh) –

  • - the 0-3km shear (kts) (shr3k) –

  • - the 0-9km shear (kts) (shr9k) –

  • - the 0-3km storm relative helicity (m^2/s^2) (srh3) –

Returns

  • quality_match_soundings (The dates/locations of the quality matches)

  • quality_match_tortype (The type of quality match (SIGTOR/WEAKTOR/NONTOR))

  • len(loose_match_idx) (The number of loose matches)

  • num_matches (The number of weak and sig matches in the loose matches)

  • tor_prob (SARS sig. tornado probability)

sharppy.databases.sars_distribution module

Module contents