Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SkewT Plots not working when Pressure does not Decrease Monotonically #372

Closed
ajsockol opened this issue Dec 14, 2021 · 6 comments
Closed
Assignees

Comments

@ajsockol
Copy link
Collaborator

I'm getting this error when trying to plot skewT diagrams:
Screen Shot 2021-12-14 at 10 45 18 AM

Looking at skewtdisplay.py, it seems there is a fix in place for this issue, but it still raises an invalid sounding error when it tries to implement the fix. Maybe we just need to implement some code to remove duplicate pressure levels? Perhaps by removing any points where the difference between two pressure levels is equal to zero?

@AdamTheisen
Copy link
Collaborator

Thanks @ajsockol ! I've ran into this before with the PBL calculations in the calculate_pbl_liu_liang retrieval code. I had to do some smoothing to the pressure ahead of time. The plotting might not be an issue if there are NaNs but we'll have to test that.

@AdamTheisen AdamTheisen self-assigned this Dec 14, 2021
@kenkehoe
Copy link
Contributor

I was able to fix this in the DQ Office code by looking for differences that are greater than or equal to zero for pressure and resample the Dataset to exclude those values. Should we look into implementing this logic for Sonde Skewt plotting? The other option is to not extract the good values but set the issue causing Pressure values to NaN in a copy of the Dataset.

@AdamTheisen
Copy link
Collaborator

@kenkehoe with the samples so close together this is what I did in the pbl height calculations

ds[pressure] = ds[pressure].rolling(time=smooth_height, min_periods=1, center=True).mean()

if that didn't work, then I increased the smoothing

ds[pressure] = (ds[pressure].rolling(time=smooth_height + 4, min_periods=2, center=True).mean())

@AdamTheisen
Copy link
Collaborator

As a note, I'm running into unexpected errors with Skew-T plots so we are looking into potential dependency changes

@kenkehoe
Copy link
Contributor

Is this still an issue @AdamTheisen ?

@AdamTheisen
Copy link
Collaborator

Yes, should have closed out with #436

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants