Skip to content
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

Stratospheric water vapor inaccurate #11

Closed
danielkoll opened this issue Aug 21, 2020 · 0 comments
Closed

Stratospheric water vapor inaccurate #11

danielkoll opened this issue Aug 21, 2020 · 0 comments

Comments

@danielkoll
Copy link
Owner

Old calculation in verticalstructure.py

    # v1: pick highest pressure level in strat, assume q is uniform at that value
    # mask = T_adiabat < Tstrat
    # T = T_adiabat
    # T[mask] = Tstrat

    # q = q_adiabat
    # q[mask] = q_adiabat[p==(p[mask].max())]

New calculation in verticalstructure.py
# v2, more accurate: use interpolation to find p_trop, where T=Tstrat. Then compute q at that level.
# Note: at insufficient res, interpolation will produce p_trop=min(p)!
p_trop = np.interp(Tstrat,T_adiabat,p)
q_trop = get_q(Tstrat,p_trop,params,RH=RH) # analytically ..
mask = p<=p_trop

    T = T_adiabat
    T[mask] = Tstrat
    
    q = q_adiabat
    q[mask] = q_trop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant