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

Enhancement: add optional height scale for SkewT #6

Open
peters77 opened this issue Jan 19, 2019 · 0 comments
Open

Enhancement: add optional height scale for SkewT #6

peters77 opened this issue Jan 19, 2019 · 0 comments

Comments

@peters77
Copy link

peters77 commented Jan 19, 2019

Nice to have enhancement: an additional height scale derived from the pressure.
Example found in Metpy:

heights = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) * units.km
std_pressures = mpcalc.height_to_pressure_std(heights)
for height_tick, p_tick in zip(heights, std_pressures):
    trans, _, _ = skew.ax.get_yaxis_text1_transform(0)
    skew.ax.text(0.02, p_tick, '---{:~d}'.format(height_tick), transform=trans)

bildschirmfoto 2019-01-19 um 16 03 29

Another idea could be adding hardcoded standard heights like this at the labeld isobares (taken from pymeteo):

def label_std_heights(axes):
"""Plot heights of standard pressure levels
:paramter axes: The axes to draw on
:type axes: :py:class:matplotlib.axes
"""
xpos = Tmin+1.5
std_heights = [(1000,111),(925,2512),(850,1457),(700,3012),(500,5574),(400,7185),
(300,9164),(250,10363),(200,11784),(150,13608)]#,(100,16180)]
for p,z in std_heights:
label(xpos, p, str(z), 'black', 0, axes)

bildschirmfoto 2019-01-21 um 16 31 04

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