The parcel calculation requires pressure to be monotonically decreasing, so
this error message means at least one of the pressure values is higher than a
previous value in the pressure array. BTW, I also get a similar message when a
pressure level is repeated. I don’t use the SciPy medfilt solution, so I can’t
help with that.
In my experience, except in cases of older sounding records, this occurs most
with levels above 100mb or so. Therefore, when I am in a hurry I only pass
data below 100mb. In older data I have seen this defect at lower levels.
A better, (still quick) solution is to sort the dataframe on the pressure
column and then follow-up with pandas.drop_duplicates to catch any duplicated
levels. This doesn’t solve the problem of “which one to keep and which one to
throw away.” But it is quick.
Eventually I wrote a QC subroutine that looks at duplicated and inverted
pressures AND heights, and tries to determine if the problem is due to
interpolation between mandatory and significant levels, and which ones to keep.
I hope this helps.
Geoff
> On Apr 13, 2023, at 9:20 PM, Cavin, Jeanette Rose <cavin1jr@xxxxxxxx:u> wrote:
I am currently working on creating a Skew-T for my meteorology class. I have
created the Skew-T, but I need to add CAPE and CIN. I've followed a couple of
examples and watched the MetPy Monday videos. I understand what I need to do,
which is the parcel profile. Whenever I try to do it, I get an error stating,
"Pressure increases between at least two points in your sounding. Using
scipy.signal.medfilt may fix this." I am not sure how to go about using this
suggestion, or if there is anything I am doing wrong specifically.