Repository navigation
FIX: Use actual parcel temperature for LCL determination in lfc/el - #4176
Closed
thaliamontreux wants to merge 1 commit into
Closed
thaliamontreux wants to merge 1 commit into
thaliamontreux wants to merge 1 commit into
Conversation
cape_cin converts the parcel and environment profiles to virtual temperature, then passes them to lfc/el, which computed the LCL from the virtual temperature as though it were air temperature. Virtual temperature is always >= actual temperature, so the LCL came out too low in pressure (too high in altitude), which could push the LFC/EL too high as well. Adds an optional parcel_temperature_start keyword (paired with the existing dewpoint_start) to both lfc and el, used only for the LCL determination. cape_cin now passes the parcel's true starting temperature, keeping the buoyancy comparisons in virtual-temperature space while constraining the LCL with real thermodynamic quantities. On the Unidata#1190 regression sounding this corrects the LCL/LFC from 866.9 to 900.1 hPa and CAPE from 2161.9 to 2206.7 J/kg.
Contributor
Author
|
Closing as a duplicate of #4067, which fixes #3857 via a different approach ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #3857.
cape_cinconverts the parcel and environment profiles to virtual temperature, then passes them tolfc/el, which computed the LCL from that virtual temperature as though it were air temperature. Since Tv >= T, the LCL came out at too low a pressure (too high an altitude), which could in turn push the LFC and EL too high.Adds an optional keyword-only
parcel_temperature_startparameter to bothlfcandel(paired with the existingdewpoint_start), used only for the LCL determination; defaults preserve existing behavior (parcel_temperature_profile[0]forlfc,temperature[0]forel).cape_cinnow passes the parcel's true starting temperature, keeping the buoyancy comparisons in virtual-temperature space while constraining the LCL correctly.On the #1190 regression sounding this corrects the LCL/LFC from 866.9 to 900.1 hPa and CAPE from 2161.9 to 2206.7 J/kg. The one updated expected value (
test_cape_cin_value_error) was verified against the physical mechanism.Checklist
test_lfc_parcel_temperature_start) and the cape_cin ValueError: zero-size array to reduction operation minimum which has no identity #1190 regression value updated