I am trying to use the metpy.calc functions to get supercell composite values, as shown here: Supercell Composite
However, I can't seem to find anywhere how to calculate the effective storm helicity, and effective shear. I've got storm-relative helicity in my grib2 data, but how do I get the effective?
Thanks!
As of version 1.0, MetPy does not have functionality for calculating effective SRH (ESRH) and effective bulk shear (EBS).
Paraphrasing from Thompson et al. 2007 :
ESRH is the SRH calculated within the "effective storm inflow layer", which is the lowest vertical region of a storm defined by a lower boundary of a parcel characteristics CAPE >= 100 J/kg and CIN >= -250 J/kg, continuing upward until either of these criteria are no longer met. EBS is the bulk shear of a storm normalized over its depth instead of a standard vertical extent.
Consider opening a feature request or pull request to get this functionality added to MetPy!
Here is a quick attempt at an effective layer for calculation of effective storm relative helicity and effective bulk shear. This uses MetPy functions for calculating the parcel temperature profile and CAPE and CIN values.
The output from this function can then be used to set up the appropriate depth and bottom of a layer for calculation of storm relative helicity and bulk shear (to then calculate such things as supercell composite parameter).
I've tested it on the 4 May 1999 00 UTC sounding from KOUN and it gives a reasonable answer, but has not been widely tested.
# Effective Shear Algorithm
def effective_layer(p, T, Td, h, height_layer=False):
'''This function determines the effective inflow layer for a convective sounding.
Input:
- p: sounding pressure with units
- T: sounding temperature with units
- Td: sounding dewpoint temperature with units
- h: sounding heights with units
Returns:
- pbot/hbot, ptop/htop: pressure/height of the bottom level, pressure/height of the top level
'''
from metpy.calc import parcel_profile, cape_cin
from metyp.units import units
import numpy as np
pbot = None
for i in range(p.shape[0]):
prof = parcel_profile(p[i:], T[i], Td[i])
sbcape, sbcin = cape_cin(p[i:], T[i:], Td[i:], prof)
if sbcape >= 100 * units('J/kg') and sbcin > -250 * units('J/kg'):
pbot = p[i]
hbot = h[i]
bot_idx = i
break
if not pbot:
return None, None
for i in range(bot_idx+1, p.shape[0]):
prof = parcel_profile(p[i:], T[i], Td[i])
sbcape, sbcin = cape_cin(p[i:], T[i:], Td[i:], prof)
if sbcape < 100 * units('J/kg') or sbcin < -250 * units('J/kg'):
ptop = p[i]
htop = h[i]
break
if height_layer:
return hbot, htop
else:
return pbot, ptop
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.