-
Notifications
You must be signed in to change notification settings - Fork 425
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 parcel path options #461
Comments
Constructing the parcel profile with the virtual temperature correction does not require the full dew point profile. (Only computing the virtual temperature of the environment requires the full profile.) For the parcel profile, you can determine the dewpoint, and hence the virtual temperature, from: |
Isn't really that the starting mixing ratio in both cases? Just that in the second case it starts as saturated. |
Well, as the parcel ascends above the LCL the saturation mixing ratio will decrease as water condenses out, but I figure you know that so I might be missing something. To put it another way, in that example code above, the line |
You're not missing anything, I was thinking too much as a software engineer and not enough as a meteorologist. |
Re-opening since we haven't added options, we only just forced the use of virtual temperature within |
I've started playing with this a little bit as I'm highly interested in getting it implemented. I forked metpy yesterday to add a "return_virt" kwarg for the parcel profile functions. I was about to PR that when I came across this issue with the class idea which I agree is better and if I end up PR'ing I'll use that...
I ended up doing basically this for my implementation: However I ran into something that bothers me a little bit. Below I have attached an observed profile with the parcel paths plotted using return_virt=False and return_virt=True. the moist lapse component of the virtual temperature trace is not parallel to the moist adiabatic lapse rate lines. Not sure what to think about that. |
code and data used to generate those figures: |
This is to be expected @wx4stg . The moist adiabatic lapse rate represents a temperature change, not a virtual temperature change. As the parcel ascends, it loses water vapor, so the virtual temperature converges to the actual temperature eventually. |
gotcha. It's been a while since I took thermodynamics and I couldn't remember if that was factored in to the moist adiabatic lapse rate or not. thanks for clarifying @sgdecker |
In trying to implement a robust CAPE/CIN calculation, we've discovered that the complication really should lie in the parcel path calculation. Currently the parcel path calculation function call looks like this:
Only the starting temperature and dew point are needed and the pressures at which the path is wanted. Ideally we need to implement the following options:
Virtual Temperature
Moist Adiabats
The virtual temperature should be implemented now. A hook for adiabats can be put in, but only have the option of pseudoadiabats for now.
Here's a simple sketch of what a path assumptions object could look like:
The function would then use the default options from
__init__
.The biggest complication I see here is that for the virtual temperature correction (assuming I understand it correctly) we'll be needing the full dew point profile from the sounding. Then
parcel_profile
could be modified something like:Discussion on how to tweak the API on this would be useful. I don't like the idea of
dewpt_prof
being a kwarg really, but it doesn't belong in the assumptions object either.The text was updated successfully, but these errors were encountered: