Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Use functions from metpy.calc to perform a number of calculations using sounding data.

The code below uses example data to perform many sounding calculations for a severe weather event on May 22, 2011 from the Norman, OK sounding.

Imports

Effective Shear Algorithm for use in Supercell Composite Calculation

Obtain Data and Format

Upper air data can be obtained using the siphon package, but for this example we will use some of MetPy’s sample data. as_file_obj=False), skiprows=5, usecols=[0, 1, 2, 3, 6, 7], names=col_names) is necessary due to the formatting of the MetPy sample data. This formatting is not needed when using upper air data obtained via Siphon. Obtaining data with Siphon will be covered in a later notebook.

Downloading file '20110522_OUN_12Z.txt' from 'https://github.com/Unidata/MetPy/raw/v1.7.1/staticdata/20110522_OUN_12Z.txt' to '/home/runner/.cache/metpy/v1.7.1'.

Assign Units

We will pull the data out of the example dataset into individual variables and assign units. This is explained in further detain in the Simple Sounding notebook and in the Metpy documentation.

Compute the wind components

Compute common sounding index parameters

Compture the parcel profile for a surface-based parcel

Compute the corresponding Lifted Index (LI), Convective Available Potential Energy (CAPE), Convective Inhibition (CIN) values for a surface parcel

Determine the Lifted Condensation Level (LCL), Level of Free Convection (LFC), and Equilibrium Level (EL) for our surface parcel

Compute the characteristics of a mean layer parcel (50-hPa depth)

Compute the characteristics of the most unstable parcel (50-hPa depth)

Compute the Bunkers Storm Motion vector and use to calculate the critical angle

Work on the calculations needed to compute the significant tornado parameter

Compute the supercell composite parameter, if possible

Print Important Sounding Parameters

Important Sounding Parameters for KOUN on 22 Mary 2011 12 UTC

        CAPE: 3297.18 joule / kilogram
         CIN: -128.30 joule / kilogram
LCL Pressure: 949.00 hectopascal
LFC Pressure: 735.84 hectopascal
 EL Pressure: 194.83 hectopascal

   Lifted Index: [-6.94] delta_degree_Celsius
        K-Index: 22.10 degree_Celsius
Showalter Index: [-0.05] delta_degree_Celsius
   Cross Totals: 17.10 delta_degree_Celsius
   Total Totals: 50.20 delta_degree_Celsius
Vertical Totals: 33.10 delta_degree_Celsius

Mixed Layer - Lowest 50-hPa
     ML Temp: 20.99 degree_Celsius
     ML Dewp: 20.55 degree_Celsius
     ML CAPE: 3323.51 joule / kilogram
      ML CIN: -170.54 joule / kilogram

Most Unstable - Lowest 50-hPa
     MU Temp: 20.40 degree_Celsius
     MU Dewp: 20.40 degree_Celsius
 MU Pressure: 925.00 hectopascal
     MU CAPE: 3787.64 joule / kilogram
      MU CIN: -84.98 joule / kilogram

Bunkers Storm Motion Vector
  u_storm: 21.85 knot
  v_storm: 4.55 knot
Critical Angle: 67.33 degree

Storm Relative Helicity: 279.49 meter ** 2 / second ** 2
Significant Tornado Parameter: [4.70] dimensionless
Supercell Composite Parameter: [9.30] dimensionless