From 799250348cbdc5151638376774bbec9e18dfb108 Mon Sep 17 00:00:00 2001 From: Ryan May Date: Thu, 2 Jan 2025 16:47:38 -0700 Subject: [PATCH] DOC: Pass static_stability in QVector example Helps make clear that this is an option for this calculation. Addresses part of #3689. --- examples/calculations/QVector.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/calculations/QVector.py b/examples/calculations/QVector.py index b019afdf4e5..f7a1068a8c7 100644 --- a/examples/calculations/QVector.py +++ b/examples/calculations/QVector.py @@ -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 fixed 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))