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

MU Parcel Optimizations #25

Open
tsupinie opened this issue Dec 13, 2024 · 1 comment
Open

MU Parcel Optimizations #25

tsupinie opened this issue Dec 13, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@tsupinie
Copy link
Contributor

I don't have any code, but a thought occurred to me, so I'm opening this issue to discuss optimizations to the most unstable parcel finding.

I think one way to optimize finding the most unstable parcel is to find all the local maxima in theta-e in the search depth and only check the CAPE for those parcels. The lower bound is considered a local maximum if dthetae/dz is negative at the lower bound, and the upper bound is considered a local maxima if dthetae/dz is positive at the upper bound. (In most cases, I think if dthetae/dz at the upper bound is positive, that parcel has no CAPE. But I can conceive a scenario where that parcel does have CAPE, so it should be checked.)

In the absolute worst case, alternating data points in the search depth are local maxima, so you'd have to search half of the parcels. But that's better than all the parcels in the search depth. And the vast majority of cases, you'd probably only have to check a couple parcels at most.

The underlying assumption here is that a local maximum in theta-e is also a local maximum in CAPE, which seems to be the assumption behind the "max-theta-e" method. So I think that's a reasonable assumption, and makes physical sense to me. The only thing I can think of that could violate that is the CM1 lifter's accounting for ice in the parcel lifting. I could potentially see some weirdness for parcels that originate around where it starts to account for ice. But that would be an extreme edge case, and I'm having a hard time coming up with a physically realistic scenario where that would break it.

@keltonhalbert keltonhalbert self-assigned this Dec 14, 2024
@keltonhalbert keltonhalbert added the enhancement New feature or request label Dec 14, 2024
@keltonhalbert
Copy link
Owner

I'm definitely in favor of a more efficient search algorithm than brute-force lifting every single parcel to find the parcel with maximum CAPE, especially as we move towards raw resolution radiosonde data. I do agree with your assessment that there are some curiosities to beware, especially when dealing with the CM1 parcel lifter.

The local maxima seems like a reasonable approach, though sometimes there can be noise with dewpoint sensors that could result in many local maxima. It would still be better than the brute-force, approach though.

My current thinking is this:
I don't really have much of a conceptual model for the scenarios in which the most unstable parcel is not the parcel with the max Theta-E. I think before designing a more efficient search algorithm blindly, maybe we should run on a whole bunch of test soundings (the 200k TORDAT soundings for model data, and the 1s radiosonde archive) to flag profiles where the max Theta-E parcel has less cape than the brute force mechanism. Then maybe it'll help shed some light on what's actually causing the difference. Perhaps it could be as simple as check the surface parcel, and then check the max Theta-E parcel, +/- some vertical delta?

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

No branches or pull requests

2 participants