-
Notifications
You must be signed in to change notification settings - Fork 415
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
Add CAP Strength Calculation to MetPy #3452
Comments
I'd be happy for someone to contribute either/both of those methods. Someone would definitely need to do a literature review to understand what SharpPy is doing. |
@dopplershift I have searched extensively for an article or paper that could have served as the basis for the calculation, with no success. There is a SharpPy issue calling the SharpPy CAP strength code into question, but it has been open since 2021. There is a difference between the SharpPy params.py code and GEMPAK NSHARP skparams.c code, so if the GEMPAK version should be considered authoritative, the implication is that the SharpPy code has a bug. I don't mind taking a crack at it, but if someone with better Python skills would prefer to do it, I would defer to them. |
The code in SharpPy looks buggy. The code in NSHARP looks straightforward: loop over the profile and compute the max difference between the environment and the parcel temp. A citation for that would be nice, but it's simple enough that we can live with it (though helpful if we could at least link to NSHARP docs somewhere). |
Since the algorithm assumes a lifted parcel level as input, and a bounded layer for the calculation (presumably to limit the CAP output value, for instance, if the LFC is absent), there are details related to "common usage" that would be nice to know. I'm motivated to look into this in the meantime. |
In the absence of a literature reference, I am using the College of DuPage (CoD) graphic sounding analysis output as check on my code to reproduce the gempak cap_strength algorithm. I am pretty sure gempak is what CoD is running but they have not yet responded to my inquiry, so I cannot be 100% certain. For now, that is the closest to an authoritative check that I know.
Empirically, I have determined that CoD is using a mixed parcel representing the lowest 100mb, and terminating the check at 500mb (lower=-1,upper=500 in the function inputs.)
The problem is that the value of cap_strength, when LFC is not found, depends on the value of “upper”, and can increase without bound, depending on the environmental lapse rate. I would prefer to limit the CAP value based on details of the sounding near any capping inversion. If you think about it, the CAP strength determined by “finding the maximum difference in an interval” is not too far from computing CIN over that interval. Certainly the actual CIN integral over the interval [lower,upper] is limited by the cap_strength value multiplied by interval length.
|
What should we add?
It would be useful to add some measure of cap strength to sounding analysis in MetPy. In my application, I compute Carlson's Lid Strength Index, but occasionally I would like to check my value of the Lid Strength term against SharpPy's CAP value. (Trying to port SharpPy's algorithm to MetPy is giving me some odd results so for the one-off check on Lid Strength, I just get the CAP directly from SharpPy.)
Failing this, a literature reference to the specific method used in SharpPy would allow me to develop my own.
Thank you.
Reference
No response
The text was updated successfully, but these errors were encountered: