Skip to content

Error with examples in MetPy Mondays #22 (CAPE/CIN): zero-size array #3287

Answered by kgoebber
rolypolyman asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @rolypolyman, it appears that with the layer you have chosen the equilibrium layer (EL) is undefined since the layer only goes to ~600 hPa and no EL level is found. So I don't think we currently support the calculation of CAPE/CIN without a valid EL.

The duplicate temperatures that you experienced were high up in the atmosphere. Another way to get around that would be to subset the data for pressure >= 100 hPa.

valid_levels = p >= 100*units.hPa

p_subset = p[valid_levels]
T_subset = T[valid_levels]
Td_subset = Td[valid_levels]
heights_subset = heights[valid_levels]

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rolypolyman
Comment options

Answer selected by rolypolyman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants