Skip to content

Error when calculating Parcel Path for sounding #2052

Answered by dopplershift
Stormfreak10 asked this question in Q&A
Discussion options

You must be logged in to vote

The error you're seeing is InvalidSoundingError: Pressure does not decrease monotonically in your sounding.. What that means is that the pressure values in your sounding are not consistently decreasing. That means for one or more indices n+1 in the pressure array of your data, the value is equal or less than the pressure at index n. Most of MetPy's sounding calculations assume that pressure is decreasing as you go along in the array.

The error message suggests using scipy.signal.medfilt as a way to try to filter your pressure values to make them decrease if the problem is just due to noise in measurements. Something like:

import scipy.signal
pressure = scipy.signal.medfilt(pressure, 5)

Wh…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Stormfreak10
Comment options

@dopplershift
Comment options

@Stormfreak10
Comment options

Answer selected by dopplershift
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