Skip to content

Commit

Permalink
DOC: Pass static_stability in QVector example
Browse files Browse the repository at this point in the history
Helps make clear that this is an option for this calculation. Addresses
part of Unidata#3689.
  • Loading branch information
dopplershift committed Jan 2, 2025
1 parent c4a8f03 commit 48b6dd5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/calculations/QVector.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
# Calculate the temperature advection of the flow
tadv = mpcalc.advection(ds.temperature, ds.uwind, ds.vwind)

# Calculate the q-vectors
u_qvect, v_qvect = mpcalc.q_vector(ds.uwind, ds.vwind, ds.temperature, 850 * units.hPa)
# Calculate the q-vectors. Passing in a fixe value of static stability, but could also
# use `mpcalc.static_stability()`.
u_qvect, v_qvect = mpcalc.q_vector(ds.uwind, ds.vwind, ds.temperature, 850 * units.hPa,
static_stability=0.02 * units('J / Kg / Pa^2'))

# start figure and set axis
fig, ax = plt.subplots(figsize=(5, 5))
Expand Down

0 comments on commit 48b6dd5

Please sign in to comment.