@@ -37,14 +37,11 @@ def effective_layer(p, t, td, h, height_layer=False):
3737 - pbot/hbot, ptop/htop: pressure/height of the bottom level,
3838 pressure/height of the top level
3939 """
40- from metpy .calc import cape_cin , parcel_profile
41- from metpy .units import units
42-
4340 pbot = None
4441
4542 for i in range (p .shape [0 ]):
46- prof = parcel_profile (p [i :], t [i ], td [i ])
47- sbcape , sbcin = cape_cin (p [i :], t [i :], td [i :], prof )
43+ prof = mpcalc . parcel_profile (p [i :], t [i ], td [i ])
44+ sbcape , sbcin = mpcalc . cape_cin (p [i :], t [i :], td [i :], prof )
4845 if sbcape >= 100 * units ('J/kg' ) and sbcin > - 250 * units ('J/kg' ):
4946 pbot = p [i ]
5047 hbot = h [i ]
@@ -54,8 +51,8 @@ def effective_layer(p, t, td, h, height_layer=False):
5451 return None , None
5552
5653 for i in range (bot_idx + 1 , p .shape [0 ]):
57- prof = parcel_profile (p [i :], t [i ], td [i ])
58- sbcape , sbcin = cape_cin (p [i :], t [i :], td [i :], prof )
54+ prof = mpcalc . parcel_profile (p [i :], t [i ], td [i ])
55+ sbcape , sbcin = mpcalc . cape_cin (p [i :], t [i :], td [i :], prof )
5956 if sbcape < 100 * units ('J/kg' ) or sbcin < - 250 * units ('J/kg' ):
6057 ptop = p [i ]
6158 htop = h [i ]
0 commit comments