As I was working with someone on creating a sounding and calculating the different CAPE values who had started with this example code, we noticed that the MLCAPE value seemed off. It turns out that in this example, the parcel profile was used for the dew point temperature in the mixed-layer calculation. In the example itself there would not be much difference in the computed value (likely why it was missed), but happen to be fairly large in the case they were looking at.
Anyway, simple fix to update this wonderful example.
Description Of Changes
As I was working with someone on creating a sounding and calculating the different CAPE values who had started with this example code, we noticed that the MLCAPE value seemed off. It turns out that in this example, the parcel profile was used for the dew point temperature in the mixed-layer calculation. In the example itself there would not be much difference in the computed value (likely why it was missed), but happen to be fairly large in the case they were looking at.
Anyway, simple fix to update this wonderful example.