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

t0 parameter in plot_dry_adiabats and in plot_moist_adiabats #2867

Open
fabpan opened this issue Jan 4, 2023 · 0 comments
Open

t0 parameter in plot_dry_adiabats and in plot_moist_adiabats #2867

fabpan opened this issue Jan 4, 2023 · 0 comments
Labels
Area: Docs Affects documentation

Comments

@fabpan
Copy link

fabpan commented Jan 4, 2023

Currently, the parameter t0 is defined as "Initial temperature values ​​in Kelvin. ....".
As far as I understand, t0 is not the initial temperature value. In my opinion, a better definition could be:
"Temperature values ​​at a reference pressure of 1000 mbar. ...."
or
"Potential temperatures (temperature values ​​at a reference pressure of 1000 mbar) ...." for dry_adiabats
and
"Wet bulb potential temperatures (temperature values ​​at a reference pressure of 1000 mbar) ......" for moist_adiabats

The starting point is defined by the vertical range of the plotted line set by the pressure parameter.

This figure is the result of the code below which plots 2 dry adiabatic lines with starting point at 900 hPa defined by their potential temperatures in degC. Note that the reference points (the 2 dots) can be outside the plotted lines.

Proposal

import matplotlib.pyplot as plt
from metpy.units import units
from metpy.plots import SkewT
import numpy as np
# coordinate of the target point
T_rif=15*units.degC
fig = plt.figure(figsize=(9, 9))
skew = SkewT(fig, rotation=30)
skew.ax.set_xticks(range(-15,23,5))
skew.ax.set_yticks(range(600,1010,50))
skew.ax.set_ylim(1020, 650)
skew.ax.set_xlim(-13,18)
# plot the dry adibatic lines
pressure_levels=np.array([900,800,700])*units.hPa  # vertical range of the plots
skew.plot_dry_adiabats(pressure=pressure_levels,t0=np.array([T_rif.m,T_rif.m-5])*T_rif.units)
# plot the reference points of the two lines
skew.ax.scatter(np.array([T_rif.m,T_rif.m-5])*T_rif.units,np.array([1000,1000])*units.mbar,s=30)
@fabpan fabpan added the Area: Docs Affects documentation label Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Docs Affects documentation
Projects
None yet
Development

No branches or pull requests

1 participant