Configuration Options#

Every option tephpy.config carries, with the type it accepts and the default in force. The same options, as a commented file you can edit, come from tephpy config generate; see Configure tephpy From a File for how that file is found and applied, and Command Line for the commands that manage it.

This page is generated from the tables in the configuration module at build time, so it and the generated file always describe the same options.

isotherms#

tephpy.config.isotherms.color: str | None#

Matplotlib colour for the lines and their labels.

Default: dimgrey

tephpy.config.isotherms.linewidth: float | None#

Line width in points.

Default: 0.5

tephpy.config.isotherms.alpha: float | None#

Line and label opacity, 0 to 1.

Default: 1.0

tephpy.config.isotherms.labels: bool | str | tuple[str, ...] | None#

true, false, or the diagram edges to label (bottom, top, left, right), singly or as a list.

Listed edges label the members that reach them, and every member left over is labelled inline. true labels every member inline; false labels none.

Default: true

tephpy.config.isotherms.visible: bool | None#

Whether the family is drawn at all.

Default: true

tephpy.config.isotherms.emphasis: collections.abc.Mapping[float, collections.abc.Mapping[str, object]] | None#

Members drawn with a distinguishing style, keyed by temperature in degrees Celsius.

Each value is a mapping of style overrides – color, linewidth, linestyle and alpha – and an omitted key falls back to the family’s own style, so {20.0: {}} is the member at 20 in the family’s own units, drawn at the emphasis line width in the family’s own colour. An emphasised member is always drawn, whatever the zoom-adaptive ladder would otherwise select. An empty mapping emphasises nothing.

Default: {}

tephpy.config.isotherms.values: tuple[float, ...] | None#

Explicit member temperatures in degrees Celsius. Unset, the zoom-adaptive ladder selects them.

Default: unset

tephpy.config.isotherms.interval: float | None#

Member spacing in degrees Celsius. Unset, the zoom-adaptive ladder selects it.

Default: unset

isobars#

tephpy.config.isobars.color: str | None#

Matplotlib colour for the lines and their labels.

Default: tab:blue

tephpy.config.isobars.linewidth: float | None#

Line width in points.

Default: 0.5

tephpy.config.isobars.alpha: float | None#

Line and label opacity, 0 to 1.

Default: 1.0

tephpy.config.isobars.labels: bool | str | tuple[str, ...] | None#

true, false, or the diagram edges to label (bottom, top, left, right), singly or as a list.

Listed edges label the members that reach them, and every member left over is labelled inline. true labels every member inline; false labels none.

Default: true

tephpy.config.isobars.visible: bool | None#

Whether the family is drawn at all.

Default: true

tephpy.config.isobars.emphasis: collections.abc.Mapping[float, collections.abc.Mapping[str, object]] | None#

Members drawn with a distinguishing style, keyed by pressure in hPa.

Each value is a mapping of style overrides – color, linewidth, linestyle and alpha – and an omitted key falls back to the family’s own style, so {20.0: {}} is the member at 20 in the family’s own units, drawn at the emphasis line width in the family’s own colour. An emphasised member is always drawn, whatever the zoom-adaptive ladder would otherwise select. An empty mapping emphasises nothing.

Default: {}

tephpy.config.isobars.values: tuple[float, ...] | None#

Explicit member pressures in hPa. Unset, the zoom-adaptive ladder selects them.

Default: unset

tephpy.config.isobars.interval: float | None#

Member spacing in hPa. Unset, the zoom-adaptive ladder selects it.

Default: unset

dry_adiabats#

tephpy.config.dry_adiabats.color: str | None#

Matplotlib colour for the lines and their labels.

Default: darkgrey

tephpy.config.dry_adiabats.linewidth: float | None#

Line width in points.

Default: 0.5

tephpy.config.dry_adiabats.alpha: float | None#

Line and label opacity, 0 to 1.

Default: 1.0

tephpy.config.dry_adiabats.labels: bool | str | tuple[str, ...] | None#

true, false, or the diagram edges to label (bottom, top, left, right), singly or as a list.

Listed edges label the members that reach them, and every member left over is labelled inline. true labels every member inline; false labels none.

Default: true

tephpy.config.dry_adiabats.visible: bool | None#

Whether the family is drawn at all.

Default: true

tephpy.config.dry_adiabats.emphasis: collections.abc.Mapping[float, collections.abc.Mapping[str, object]] | None#

Members drawn with a distinguishing style, keyed by potential temperature in degrees Celsius.

Each value is a mapping of style overrides – color, linewidth, linestyle and alpha – and an omitted key falls back to the family’s own style, so {20.0: {}} is the member at 20 in the family’s own units, drawn at the emphasis line width in the family’s own colour. An emphasised member is always drawn, whatever the zoom-adaptive ladder would otherwise select. An empty mapping emphasises nothing.

Default: {}

tephpy.config.dry_adiabats.values: tuple[float, ...] | None#

Explicit member potential temperatures in degrees Celsius. Unset, the zoom-adaptive ladder selects them.

Default: unset

tephpy.config.dry_adiabats.interval: float | None#

Member spacing in degrees Celsius. Unset, the zoom-adaptive ladder selects it.

Default: unset

moist_adiabats#

tephpy.config.moist_adiabats.color: str | None#

Matplotlib colour for the lines and their labels.

Default: tab:orange

tephpy.config.moist_adiabats.linewidth: float | None#

Line width in points.

Default: 0.5

tephpy.config.moist_adiabats.alpha: float | None#

Line and label opacity, 0 to 1.

Default: 1.0

tephpy.config.moist_adiabats.labels: bool | str | tuple[str, ...] | None#

true, false, or the diagram edges to label (bottom, top, left, right), singly or as a list.

Listed edges label the members that reach them, and every member left over is labelled inline. true labels every member inline; false labels none.

Default: true

tephpy.config.moist_adiabats.visible: bool | None#

Whether the family is drawn at all.

Default: true

tephpy.config.moist_adiabats.emphasis: collections.abc.Mapping[float, collections.abc.Mapping[str, object]] | None#

Members drawn with a distinguishing style, keyed by wet-bulb potential temperature in degrees Celsius.

Each value is a mapping of style overrides – color, linewidth, linestyle and alpha – and an omitted key falls back to the family’s own style, so {20.0: {}} is the member at 20 in the family’s own units, drawn at the emphasis line width in the family’s own colour. An emphasised member is always drawn, whatever the zoom-adaptive ladder would otherwise select. An empty mapping emphasises nothing.

Default: {}

tephpy.config.moist_adiabats.values: tuple[float, ...] | None#

Explicit member wet-bulb potential temperatures in degrees Celsius. Unset, the zoom-adaptive ladder selects them.

Default: unset

tephpy.config.moist_adiabats.interval: float | None#

Member spacing in degrees Celsius. Unset, the zoom-adaptive ladder selects it.

Default: unset

tephpy.config.moist_adiabats.truncation: float | None#

Temperature in degrees Celsius below which a moist adiabat stops being drawn.

Default: -50.0

mixing_ratios#

tephpy.config.mixing_ratios.color: str | None#

Matplotlib colour for the lines and their labels.

Default: tab:green

tephpy.config.mixing_ratios.linewidth: float | None#

Line width in points.

Default: 0.5

tephpy.config.mixing_ratios.alpha: float | None#

Line and label opacity, 0 to 1.

Default: 1.0

tephpy.config.mixing_ratios.labels: bool | str | tuple[str, ...] | None#

true, false, or the diagram edges to label (bottom, top, left, right), singly or as a list.

Listed edges label the members that reach them, and every member left over is labelled inline. true labels every member inline; false labels none.

Default: true

tephpy.config.mixing_ratios.visible: bool | None#

Whether the family is drawn at all.

Default: true

tephpy.config.mixing_ratios.emphasis: collections.abc.Mapping[float, collections.abc.Mapping[str, object]] | None#

Members drawn with a distinguishing style, keyed by mixing ratio in g/kg.

Each value is a mapping of style overrides – color, linewidth, linestyle and alpha – and an omitted key falls back to the family’s own style, so {20.0: {}} is the member at 20 in the family’s own units, drawn at the emphasis line width in the family’s own colour. An emphasised member is always drawn, whatever the zoom-adaptive ladder would otherwise select. An empty mapping emphasises nothing.

Default: {}

tephpy.config.mixing_ratios.values: tuple[float, ...] | None#

Explicit member mixing ratios in g/kg. Unset, the zoom-adaptive ladder selects them.

Default: unset

diagram#

tephpy.config.diagram.extent: tuple[tuple[float, float], tuple[float, float]] | None#

Default view corners as [[pressure, temperature], [pressure, temperature]], in hPa and degrees Celsius.

Default: [[1050.0, -40.0], [200.0, 40.0]]

cursor#

tephpy.config.cursor.fields: tuple[str, ...] | None#

Cursor readout fields, in display order, from mixing_ratio, pressure, temperature, theta, theta_w.

Default: [pressure, temperature, theta]

Methods#

These entries exist so that prose can cross-reference them. The how-to Configure tephpy From a File covers tephpy.config.load() and tephpy.config.save(), the methods a configuration file involves; the rest act on the configuration already in memory.

tephpy.config.load(path=None)#

Load a configuration file over this configuration.

import tephpy

tephpy.config.load("tephpyrc.yaml")
print(tephpy.config.source)  # the file now in force
tephpy.config.save(path=None)#

Write the options set on this configuration to a file.

import tephpy

tephpy.config.isobars.interval = 25.0
path = tephpy.config.save("tephpyrc.yaml")  # only the options you set
tephpy.config.reset()#

Restore the pristine, hardwired configuration.

import tephpy

tephpy.config.isobars.interval = 25.0
tephpy.config.reset()  # back to the hardwired conventions
tephpy.config.context(**overrides)#

Temporarily override configuration sections.

import matplotlib.pyplot as plt

import tephpy  # registers the "tephigram" projection

with tephpy.config.context(isobars={"interval": 25.0}):
    fig, ax = plt.subplots(subplot_kw={"projection": "tephigram"})

# Outside the block the interval is whatever it was before.