-
Notifications
You must be signed in to change notification settings - Fork 11
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 Support for a calculation of LCL #14
Comments
I have this code. It should be easy to wrap it with my loops for model lev, pressure lev, and pressure lev 1d and then keep wrapping it in the same structure. |
The problem will be to define tests. do we have ways to test this outside of our codes? metpy? |
Does it need to be H or AGLH? right now i simply calculate AGLH, by fixing the surface height to 2m |
Should be AGL heights. |
1 similar comment
Should be AGL heights. |
For the SB parcel one can just use the Stull (2000) approximation:
SBLCL= 125.*(((T[0,:,:]+T[1,:,:])/2)-Td[0,:,:])
For the ML case - you need to mix the parcel (e.g. take the mean of the layer characteristics)
MLLCL_50mb = np.zeros((ny,nx)) MLLCL_100mb = np.zeros((ny,nx)) for i in range(0,nx): for j in range(0,ny): P_in = P[:,j,i] T_in = T[:,j,i] Td_in = Td[:,j,i] MU = int(MUlvl[j,i]) MLLCL_50mb[j,i],Q_ML50[j,i],avgt50[j,i],avgtd50[j,i],avgq50[j,i],avgp50[j,i]= MLLCL.getmllcl(p_in=P_in,t_in=T_in,td_in=Td_in,ml_depth=1000.0,nk=nz) MLLCL_100mb[j,i],Q_ML100[j,i],avgt100[j,i],avgtd100[j,i],avgq100[j,i],avgp100[j,i]= MLLCL.getmllcl(p_in=P_in,t_in=T_in,td_in=Td_in,ml_depth=1000.0,nk=nz) Q_MU[j,i]=Q[MU,j,i] H_MU[j,i]=H[MU,j,i] P_MU[j,i]=P[MU,j,i]
Though this was for consistency and pure convenience using a stripped back version of George's code. In any case, you calculate the LCL using the same calculation as above, just for the mixed properties.
There is also an analytical python/fortran solution by David Romps:
I'll try to implement this - but the Stull approximate will do in a pinch.
The text was updated successfully, but these errors were encountered: