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
Limit shading of CIN #1139
Limit shading of CIN #1139
Conversation
788fdc7
to
eac9bfa
Compare
Changing to make dewpoint required is an API change, so we're going to need to ponder this a bit further on if there are ways to make it non-breaking. |
Yeah I though that might be an issue. I only added the dewpoint requirement to get the LCL trimming. The EL could be found with finding the final intersection between the temperature and profile paths. But CIN is not calculated below the LCL, so it doesn't make sense to shade below that. |
419e5ed
to
fd0887f
Compare
d13b007
to
4fd050c
Compare
dba88ac
to
ccc917b
Compare
8f8b5f4
to
90ecf50
Compare
Could we use potential temperature to help us find the LCL? We would have to assume that initial ascent is dry adiabatic so computed potential temperature from the prof variable should yield the same value until saturated rising occurs. It wouldn't perfectly get to the LCL as they could occur between layers, but could be a way not to break the API. |
As I have been thinking more about this, I'm wondering if we need to change the output of Then we would be able to use Potential Temperature in helping to shade CIN as desired, since the LCL would be explicit inherent in the data itself. |
I agree that the current Would your suggestion mean that we deprecate the name |
Yes, I think so. And somehow I missed that function going in the 0.9 release. |
Pitching this over to @dopplershift - is there any remaining purpose for the In the meantime, not sure what happens with this PR. Can be closed and @kgoebber if you want to do the potential temperature version of this at some point, that could work. Not sure if my timeline is going to work to keep this updated with the proposed changes. |
So regarding On the limits, what I don't like is that we have add a required argument that is only used if we pass |
…e a realistic, complicated profile to aid in future development
And maybe most importantly, by putting dewpoint as a trailing argument, this is no longer an API break. |
Make dewpoint the optional last argument, and use its presence to enable the limiting behavior. This preserves the previous API, keeps things symmetric with shade_cape(), and keeps us from requiring passing dewpoint when we don't need or use it.
90ecf50
to
207bcce
Compare
And since this is no longer an API break that I want to start in 0.12, I'm going to push to 1.0 to allow some time for comments. |
Description Of Changes
Adds default limits to shading for CIN to not shade below the LCL or above the EL. As a result of the default being True, dewpoint is now a required input variable, in order to calculate LCL and EL.
Also, a more realistic (and somewhat complicated) test profile was added to allow for easier identification of edge cases in future development. The previous one didn't include dewpoint, which is now needed.
Checklist