我怎样才能得到这个metpy计算的有效风暴螺旋度和有效切变值？

How can I get the effective storm helicity and effective shear values for this metpy calculation?

2 个回复

ESRH 是在“有效风暴流入层”内计算的 SRH，它是由地块特征 CAPE >= 100 J/kg 和 CIN >= -250 J/kg 的下边界定义的风暴的最低垂直区域，继续直到不再满足其中任何一个标准。 EBS 是风暴的整体切变，在其深度而非标准垂直范围内归一化。

``````# 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
``````
1 如何获得有效的文件权限？

2 如何在pintool中获取数组的内存有效地址？

3 ASLR如何有效？

2010-10-03 21:08:46 2 642   aslr
4 如何使该停止标准有效？

5 无效的有效地址计算

2010-05-11 08:39:01 2 5716   assembly
6 这种标记解决方案的效果如何？

8 如何获取小于或等于当前日期的最近“生效日期”

9 如何使用Javascript或jQuery使此代码更有效？

2014-03-03 16:22:50 2 60   jquery
10 如何使此动画代码更有效？