04 — Single-Variable Composite Explorer

Interactive notebook for exploring any variable (or sum of variables) from the composite-blocking NPZ archive.

Two modes:

  1. 2-panel (default): composite mean + bootstrap significance (hatched non-sig)

  2. 6-panel (projection=True): adds 2×2 projection onto dh−1 orthogonal basis (INT, PRP, DEF, Residual) using only significant grid points, with β, αx, αy, γ in the subtitle.

Data: /net/flood/data2/users/x_yan/composite_blocking_tempest/onset

[1]:
import numpy as np
import matplotlib.pyplot as plt
import os
from functools import partial

from pvtend.plotting import (
    plot_var as _plot_var_src,
    get_field,
    load_events as _load_events_src,
    bootstrap_sig,
)

1 Configuration & available fields

[2]:
DATA_ROOT  = "/net/flood/data2/users/x_yan/composite_blocking_tempest"
STAGE      = "onset"
LEVEL      = 200 #"wavg"            # "wavg" or int hPa (e.g. 200, 250)
SMOOTH_DEG = 3.0
GRID_SP    = 1.5
N_BOOT     = 500
ALPHA      = 0.05
SEED       = 42
PV_CONTOUR = - 0 * 0.5e-6     # PV anomaly contour for mask boundary
N_CONTOUR  = 21          # number of contourf levels

# ═══════════════════════════════════════════════════════════
#  Projection masking config (toggle on/off)
# ═══════════════════════════════════════════════════════════
USE_SIG_MASK    = True   # zero out non-significant pixels before projection
MASK_SPEC = "< 0"   # restrict basis to q' < 0 region (mask)

# ── Discover available fields and levels from a sample NPZ ──
_sample = np.load(f"{DATA_ROOT}/{STAGE}/dh=+0/" +
                  sorted(os.listdir(f"{DATA_ROOT}/{STAGE}/dh=+0"))[0])
levels_hpa = _sample["levels"]          # isobaric levels
wavg_levels = _sample["wavg_levels"]    # levels used for wavg

# Separate 2D (wavg) vs 3D fields
_all_keys = sorted(_sample.keys())
_meta = {"X_rel", "Y_rel", "levels", "wavg_levels", "center_lat", "center_lon",
         "center_mode", "dh", "lat0", "lat_vec", "lon0", "lon_vec_unwrapped",
         "track_id", "ts", "G0", "H_SCALE"}
fields_wavg = sorted(k for k in _all_keys
                     if _sample[k].ndim == 2 and not k.endswith("_3d") and k not in _meta)
fields_3d   = sorted(k for k in _all_keys if k.endswith("_3d"))

print(f"LEVEL = {LEVEL}")
print(f"Isobaric levels (hPa): {levels_hpa}")
print(f"Wavg levels   (hPa) : {wavg_levels}")
print(f"\n── 2D wavg fields ({len(fields_wavg)}) ──")
for f in fields_wavg:
    print(f"  {f}")
print(f"\n── 3D isobaric fields ({len(fields_3d)}) ──")
for f in fields_3d[:10]:
    print(f"  {f}")
print(f"  ... ({len(fields_3d)} total)")
print(f"\n  USE_SIG_MASK={USE_SIG_MASK}  USE_NEG_PV_MASK={USE_NEG_PV_MASK}")

del _sample
LEVEL = 200
Isobaric levels (hPa): [1000  850  700  500  400  300  250  200  100]
Wavg levels   (hPa) : [300 250 200]

── 2D wavg fields (109) ──
  Q
  pv
  pv_anom
  pv_anom_dp
  pv_anom_dt
  pv_anom_dx
  pv_anom_dy
  pv_bar
  pv_bar_dp
  pv_bar_dt
  pv_bar_dx
  pv_bar_dy
  pv_dp
  pv_dx
  pv_dy
  q
  t
  t_dt
  theta
  theta_dot
  theta_dt
  u
  u_anom
  u_anom_pv_anom_dx
  u_anom_pv_bar_dx
  u_bar
  u_bar_pv_anom_dx
  u_bar_pv_bar_dx
  u_div
  u_div_anom
  u_div_anom_pv_anom_dx
  u_div_anom_pv_bar_dx
  u_div_bar
  u_div_bar_pv_anom_dx
  u_div_bar_pv_bar_dx
  u_div_dry
  u_div_dry_pv_anom_dx
  u_div_dry_pv_bar_dx
  u_div_emanuel_moist
  u_div_emanuel_moist_pv_anom_dx
  u_div_emanuel_moist_pv_bar_dx
  u_div_moist
  u_div_moist_pv_anom_dx
  u_div_moist_pv_bar_dx
  u_div_qg_moist
  u_div_qg_moist_pv_anom_dx
  u_div_qg_moist_pv_bar_dx
  u_har_anom
  u_rot
  u_rot_anom
  u_rot_anom_pv_anom_dx
  u_rot_anom_pv_bar_dx
  u_rot_bar
  u_rot_bar_pv_anom_dx
  u_rot_bar_pv_bar_dx
  v
  v_anom
  v_anom_pv_anom_dy
  v_anom_pv_bar_dy
  v_bar
  v_bar_pv_anom_dy
  v_bar_pv_bar_dy
  v_div
  v_div_anom
  v_div_anom_pv_anom_dy
  v_div_anom_pv_bar_dy
  v_div_bar
  v_div_bar_pv_anom_dy
  v_div_bar_pv_bar_dy
  v_div_dry
  v_div_dry_pv_anom_dy
  v_div_dry_pv_bar_dy
  v_div_emanuel_moist
  v_div_emanuel_moist_pv_anom_dy
  v_div_emanuel_moist_pv_bar_dy
  v_div_moist
  v_div_moist_pv_anom_dy
  v_div_moist_pv_bar_dy
  v_div_qg_moist
  v_div_qg_moist_pv_anom_dy
  v_div_qg_moist_pv_bar_dy
  v_har_anom
  v_rot
  v_rot_anom
  v_rot_anom_pv_anom_dy
  v_rot_anom_pv_bar_dy
  v_rot_bar
  v_rot_bar_pv_anom_dy
  v_rot_bar_pv_bar_dy
  w
  w_anom
  w_anom_pv_anom_dp
  w_anom_pv_bar_dp
  w_bar
  w_bar_pv_anom_dp
  w_bar_pv_bar_dp
  w_dry
  w_dry_pv_anom_dp
  w_dry_pv_bar_dp
  w_emanuel_moist
  w_emanuel_moist_pv_anom_dp
  w_emanuel_moist_pv_bar_dp
  w_moist
  w_moist_pv_anom_dp
  w_moist_pv_bar_dp
  w_qg_moist
  w_qg_moist_pv_anom_dp
  w_qg_moist_pv_bar_dp
  z

── 3D isobaric fields (108) ──
  Q_3d
  pv_3d
  pv_anom_3d
  pv_anom_dp_3d
  pv_anom_dt_3d
  pv_anom_dx_3d
  pv_anom_dy_3d
  pv_bar_3d
  pv_bar_dp_3d
  pv_bar_dt_3d
  ... (108 total)

  USE_SIG_MASK=True  USE_NEG_PV_MASK=True

2 Bind pvtend.plotting to notebook config

[3]:
# ═══════════════════════════════════════════════════════════
#  Bind notebook config to src functions — existing calls work unchanged
# ═══════════════════════════════════════════════════════════
plot_var = partial(
    _plot_var_src,
    data_root=DATA_ROOT, stage=STAGE, level=LEVEL,
    smooth_deg=SMOOTH_DEG, grid_sp=GRID_SP,
    n_boot=N_BOOT, alpha=ALPHA, seed=SEED,
    pv_contour=PV_CONTOUR, n_contour=N_CONTOUR,
    use_sig_mask=USE_SIG_MASK, mask=MASK_SPEC,
)
load_events = partial(_load_events_src, data_root=DATA_ROOT, stage=STAGE)

print("plot_var / load_events bound to notebook config via pvtend.plotting")
plot_var / load_events bound to notebook config via pvtend.plotting

3 plot_var ready

[4]:
# plot_var() now lives in pvtend.plotting.composite_explorer
# Bound to notebook config above — all example calls below work unchanged.
# Override any param per-call, e.g. plot_var(["u_bar"], dh=0, level=500)
print(f"plot_var ready — DATA_ROOT=...{DATA_ROOT[-30:]}, STAGE={STAGE}, LEVEL={LEVEL}")
plot_var ready — DATA_ROOT=...yan/composite_blocking_tempest, STAGE=onset, LEVEL=200

4 Examples

[5]:
plot_var(["w_moist"], dh=0, level=500, projection = False)
Computing bootstrap (N=1131, n_boot=500) ...
  26.6% significant at 95%
/net/flood/data2/users/x_yan/pvtend/src/pvtend/plotting/composite_explorer.py:384: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.
  fig.tight_layout()
../_images/notebooks_04_single_var_composite_9_2.png
[5]:
{'vmax': np.float64(0.033119889210576056)}
[6]:
# 6-panel: divergent outflow (no projection)
plot_var(["-u_div_moist_pv_anom_dx", "-u_div_dry_pv_anom_dx", "-v_div_moist_pv_anom_dy", "-v_div_dry_pv_anom_dy"], dh=0, level=200, projection=False)
Computing bootstrap (N=1136, n_boot=500) ...
  55.0% significant at 95%
../_images/notebooks_04_single_var_composite_10_1.png
[6]:
{'vmax': np.float64(3.609947688058841e-12)}
[22]:
# product-of-means: mean(u'_div) * mean(dq'/dx) + mean(v'_div) * mean(dq'/dy)
# differs from mean(u'_div * dq'/dx) by the covariance / eddy-eddy term
evs = load_events(dh=0)
_stack = lambda name: np.array([get_field(e, name, 200) for e in evs])
mean_u = np.nanmean(_stack("u_div_anom"), axis=0)
mean_v = np.nanmean(_stack("v_div_anom"), axis=0)
mean_dqdx = np.nanmean(_stack("pv_anom_dx"), axis=0)
mean_dqdy = np.nanmean(_stack("pv_anom_dy"), axis=0)
prod_of_means = -(mean_u * mean_dqdx + mean_v * mean_dqdy)

plot_var(
    lambda e: prod_of_means,   # constant — shows product-of-composite-means
    dh=0, level=200, projection=False,
    label=(r"$-\overline{u'_\chi}\,\overline{\partial_x q'}"
           r" - \overline{v'_\chi}\,\overline{\partial_y q'}$"
           "  (product of means)"),
)
Computing bootstrap (N=1221, n_boot=500) ...
  100.0% significant at 95%
../_images/notebooks_04_single_var_composite_11_1.png
[22]:
{'vmax': np.float64(1.5748915576736363e-12)}

Some horizontal wind fields

[8]:
# composite of individual divergent wind & PV gradient components
plot_var(["u_div_moist"], dh=0, level=200, projection=False)
plot_var(["v_div_moist"], dh=0, level=200, projection=False)
plot_var(["u_div_dry"], dh=0, level=200, projection=False)
plot_var(["v_div_dry"], dh=0, level=200, projection=False)
Computing bootstrap (N=1175, n_boot=500) ...
  75.1% significant at 95%
../_images/notebooks_04_single_var_composite_13_1.png
Computing bootstrap (N=1176, n_boot=500) ...
  88.5% significant at 95%
../_images/notebooks_04_single_var_composite_13_3.png
Computing bootstrap (N=1179, n_boot=500) ...
  83.8% significant at 95%
../_images/notebooks_04_single_var_composite_13_5.png
Computing bootstrap (N=1182, n_boot=500) ...
  89.4% significant at 95%
../_images/notebooks_04_single_var_composite_13_7.png
[8]:
{'vmax': np.float32(0.48102054)}
[9]:
# product-of-means: mean(u'_div) * mean(dq'/dx) + mean(v'_div) * mean(dq'/dy)
# differs from mean(u'_div * dq'/dx) by the covariance / eddy-eddy term
evs = load_events(dh=0)
_stack = lambda name: np.array([get_field(e, name, 200) for e in evs])
mean_u = np.nanmean(_stack("u_div_moist"), axis=0)
mean_v = np.nanmean(_stack("v_div_moist"), axis=0)
mean_dqdx = np.nanmean(_stack("pv_anom_dx"), axis=0)
mean_dqdy = np.nanmean(_stack("pv_anom_dy"), axis=0)
prod_of_means = -(mean_u * mean_dqdx + mean_v * mean_dqdy)

plot_var(
    lambda e: prod_of_means,   # constant — shows product-of-composite-means
    dh=0, level=200, projection=False,
    label=(r"$-\overline{u_\chi,m}\,\overline{\partial_x q'}"
           r" - \overline{v_\chi,m}\,\overline{\partial_y q'}$"
           "  (product of means)"),
)
Computing bootstrap (N=1187, n_boot=500) ...
  100.0% significant at 95%
../_images/notebooks_04_single_var_composite_14_1.png
[9]:
{'vmax': np.float64(1.4256906127740348e-12)}
[10]:
# product-of-means: x-component only
prod_of_means_x = -(mean_u * mean_dqdx)

plot_var(
    lambda e: prod_of_means_x,
    dh=0, level=200, projection=False,
    label=r"$-\overline{u_\chi,m}\,\overline{\partial_x q'}$  (product of means)",
)
Computing bootstrap (N=1189, n_boot=500) ...
  100.0% significant at 95%
../_images/notebooks_04_single_var_composite_15_1.png
[10]:
{'vmax': np.float64(7.816943197816497e-13)}
[11]:
# 6-panel: divergent outflow (no projection)
plot_var(["-u_div_moist_pv_anom_dx"], dh=0, level=200, projection=False)
Computing bootstrap (N=1189, n_boot=500) ...
  39.7% significant at 95%
../_images/notebooks_04_single_var_composite_16_1.png
[11]:
{'vmax': np.float64(1.3185723666662953e-12)}
[12]:
# product-of-means: y-component only
prod_of_means_y = -(mean_v * mean_dqdy)

plot_var(
    lambda e: prod_of_means_y,
    dh=0, level=200, projection=False,
    label=r"$-\overline{v_\chi,m}\,\overline{\partial_y q'}$  (product of means)",
)
Computing bootstrap (N=1191, n_boot=500) ...
  100.0% significant at 95%
../_images/notebooks_04_single_var_composite_17_1.png
[12]:
{'vmax': np.float64(1.1031796917318025e-12)}
[13]:
# 6-panel: divergent outflow (no projection)
plot_var(["-v_div_moist_pv_anom_dy"], dh=0, level=200, projection=False)
Computing bootstrap (N=1193, n_boot=500) ...
  36.9% significant at 95%
../_images/notebooks_04_single_var_composite_18_1.png
[13]:
{'vmax': np.float64(1.2785934748325685e-12)}
[14]:
# 6-panel: rotational eddy advection
plot_var(["-u_rot_anom_pv_anom_dx", "-v_rot_anom_pv_anom_dy"], dh=0, level=200, projection=True)
Computing bootstrap (N=1195, n_boot=500) ...
  11.5% significant at 95%
  ⚠ dh=-1: skipped 1 corrupt/incomplete NPZ files
  Projection (sig-only): β=7.847e-07  αx=-0.102  αy=0.307  γ=-5.606e+05
../_images/notebooks_04_single_var_composite_19_1.png
[14]:
{'vmax': np.float64(5.949428273959404e-12),
 'beta': 7.847314798025934e-07,
 'ax': -0.1015242214324694,
 'ay': 0.3068288326501711,
 'gamma': -560597.5406134662,
 'gamma_km2': -0.5605975406134662,
 'beta_raw': 7.847314798025933e-13,
 'ax_raw': -1.0152422143246941e-13,
 'ay_raw': 3.0682883265017105e-13,
 'gamma_raw': -5.605975406134662e-13,
 'prop': array([[-8.68857208e-14, -1.13303855e-13, -1.43733430e-13, ...,
         -1.91178396e-14, -1.72363526e-14, -1.70314711e-14],
        [-7.09384066e-14, -9.43468818e-14, -1.32114016e-13, ...,
         -1.00278116e-14, -7.24673287e-15, -5.16129751e-15],
        [-4.02122443e-14, -5.37038029e-14, -8.26641728e-14, ...,
         -1.54598652e-14, -8.85929102e-15, -2.38031445e-15],
        ...,
        [ 9.23314324e-14,  1.01722067e-13,  1.12805851e-13, ...,
         -9.65752243e-15,  4.59883157e-17,  1.12042639e-14],
        [ 1.01679851e-13,  1.04365732e-13,  1.07508825e-13, ...,
          2.08388032e-14,  1.59932044e-14,  2.18958674e-14],
        [ 9.39233440e-14,  1.00283261e-13,  1.03642619e-13, ...,
          3.49411060e-14,  1.62006506e-14,  9.21705904e-15]],
       shape=(29, 49)),
 'int': array([[8.86534427e-14, 1.09845526e-13, 1.19470282e-13, ...,
         3.99363760e-14, 3.89411597e-14, 3.76642332e-14],
        [1.25267227e-13, 1.53379102e-13, 1.77579818e-13, ...,
         3.95888913e-14, 3.73287359e-14, 3.70355363e-14],
        [1.61974435e-13, 1.95629736e-13, 2.32656702e-13, ...,
         4.01086953e-14, 3.72418296e-14, 3.44156268e-14],
        ...,
        [2.14658170e-13, 2.24736752e-13, 2.41836638e-13, ...,
         1.46532436e-13, 1.27843515e-13, 1.15622151e-13],
        [1.82328714e-13, 1.91729005e-13, 2.07986956e-13, ...,
         1.35151531e-13, 1.11476835e-13, 9.30805460e-14],
        [1.55680018e-13, 1.68156226e-13, 1.88764517e-13, ...,
         1.16899667e-13, 9.23920596e-14, 7.22189077e-14]], shape=(29, 49)),
 'def': array([[-2.99876745e-13, -6.12202652e-13, -6.29642938e-13, ...,
          6.66369212e-14,  5.71777065e-14,  8.75745318e-14],
        [-1.82863643e-13, -4.47572201e-13, -4.88272713e-13, ...,
          1.01309148e-14,  8.53417563e-14,  1.94124703e-13],
        [-4.10262634e-14, -2.15678085e-13, -2.76438534e-13, ...,
          9.52696302e-14,  2.00066820e-13,  2.88928572e-13],
        ...,
        [-1.48932572e-14,  6.73076392e-14,  6.92862754e-14, ...,
          2.18824156e-13,  3.77021167e-13,  2.45454012e-13],
        [-1.97076807e-13, -2.65710629e-13, -2.58821191e-13, ...,
          2.47537112e-14,  5.36900253e-14, -7.33504659e-14],
        [-1.91999648e-13, -4.53175794e-13, -4.76411500e-13, ...,
         -1.30952415e-13, -2.67391302e-13, -3.57376829e-13]],
       shape=(29, 49)),
 'resid': array([[nan, nan, nan, ..., nan, nan, nan],
        [nan, nan, nan, ..., nan, nan, nan],
        [nan, nan, nan, ..., nan, nan, nan],
        ...,
        [nan, nan, nan, ..., nan, nan, nan],
        [nan, nan, nan, ..., nan, nan, nan],
        [nan, nan, nan, ..., nan, nan, nan]], shape=(29, 49)),
 'recon': array([[-2.98109023e-13, -6.15660981e-13, -6.53906086e-13, ...,
          8.74554576e-14,  7.88825136e-14,  1.08207294e-13],
        [-1.28534823e-13, -3.88539981e-13, -4.42806912e-13, ...,
          3.96919945e-14,  1.15423759e-13,  2.25998942e-13],
        [ 8.07359271e-14, -7.37521515e-14, -1.26446005e-13, ...,
          1.19918460e-13,  2.28449359e-13,  3.20963884e-13],
        ...,
        [ 2.92096345e-13,  3.93766458e-13,  4.23928765e-13, ...,
          3.55699070e-13,  5.04910669e-13,  3.72280426e-13],
        [ 8.69317579e-14,  3.03841082e-14,  5.66745899e-14, ...,
          1.80744045e-13,  1.81160064e-13,  4.16259475e-14],
        [ 5.76037145e-14, -1.84736307e-13, -1.84004365e-13, ...,
          2.08883584e-14, -1.58798592e-13, -2.75940863e-13]],
       shape=(29, 49)),
 'rmse': 1.3528075032229087e-12}
[15]:
# 6-panel: rotational eddy advection
plot_var(["-u_rot_bar_pv_anom_dx"], dh=0, level=200, projection=False)
Computing bootstrap (N=1198, n_boot=500) ...
  60.4% significant at 95%
../_images/notebooks_04_single_var_composite_20_1.png
[15]:
{'vmax': np.float64(4.332861690922065e-11)}
[16]:
# 6-panel: rotational eddy advection
plot_var(["-u_div_bar_pv_anom_dx"], dh=0, level=200, projection=False)
Computing bootstrap (N=1204, n_boot=500) ...
  12.0% significant at 95%
../_images/notebooks_04_single_var_composite_21_1.png
[16]:
{'vmax': np.float64(6.028170383709334e-13)}
[17]:
# 2-panel: total tendency dq/dt (no projection)
plot_var(["pv_anom_dt", "pv_bar_dt"], dh=0, level = 200, projection=False)
Computing bootstrap (N=1205, n_boot=500) ...
  26.4% significant at 95%
../_images/notebooks_04_single_var_composite_22_1.png
[17]:
{'vmax': np.float64(1.7286494070074416e-11)}
[18]:
# 6-panel: planetary vorticity advection
plot_var(["-v_rot_anom_pv_bar_dy"], dh=0, level=200, projection=False)
Computing bootstrap (N=1206, n_boot=500) ...
  82.5% significant at 95%
../_images/notebooks_04_single_var_composite_23_1.png
[18]:
{'vmax': np.float64(1.8968734607289616e-11)}
[19]:
# 6-panel: planetary vorticity advection
plot_var(["-v_div_anom_pv_bar_dy"], dh=0, level=200, projection=False)
Computing bootstrap (N=1207, n_boot=500) ...
  79.0% significant at 95%
../_images/notebooks_04_single_var_composite_24_1.png
[19]:
{'vmax': np.float64(1.5331994661984185e-12)}
[20]:
plot_var(["-w_dry_pv_bar_dp"], dh=0, level=500, projection=True)
Computing bootstrap (N=1207, n_boot=500) ...
  37.3% significant at 95%
  Projection (sig-only): β=3.171e-07  αx=-3.161  αy=0.350  γ=-6.119e+04
../_images/notebooks_04_single_var_composite_25_1.png
[20]:
{'vmax': np.float64(5.739178439020383e-13),
 'beta': 3.170953900820078e-07,
 'ax': -3.161329832828103,
 'ay': 0.34976038677151666,
 'gamma': -61194.06688505115,
 'gamma_km2': -0.06119406688505115,
 'beta_raw': 3.170953900820078e-13,
 'ax_raw': -3.161329832828103e-12,
 'ay_raw': 3.4976038677151665e-13,
 'gamma_raw': -6.119406688505115e-14,
 'prop': array([[ 2.19906845e-13,  1.33166555e-13,  2.48464803e-14, ...,
         -1.22942910e-14, -2.61130073e-14, -1.89252421e-14],
        [ 2.45590382e-13,  8.83730866e-14, -5.75472141e-14, ...,
          3.81423916e-14,  2.67727737e-14, -9.96582339e-15],
        [ 2.06745708e-13,  9.58365170e-14, -4.16187784e-14, ...,
          1.95076105e-14,  6.45822339e-14,  1.16824235e-14],
        ...,
        [ 9.72492039e-14,  1.22222510e-13,  1.75616186e-13, ...,
         -1.62695586e-13, -3.06193752e-14,  7.40822899e-14],
        [-1.22146381e-13,  1.54933663e-14,  1.66937501e-13, ...,
         -2.02531398e-13, -5.75442591e-15,  1.20028910e-13],
        [-6.60310179e-14,  1.15360475e-13,  2.35568524e-13, ...,
         -2.00383380e-13, -1.48188708e-14,  8.33461755e-14]],
       shape=(29, 49)),
 'int': array([[ 4.72675656e-15,  6.10902012e-15,  7.04852363e-15, ...,
          8.36539684e-16,  4.39429555e-16,  3.29902501e-16],
        [ 6.37473645e-15,  7.73113633e-15,  7.44692509e-15, ...,
          3.11378234e-16,  8.94816627e-16,  1.16994763e-15],
        [ 6.05390138e-15,  7.68298158e-15,  7.71763881e-15, ...,
         -8.78652147e-16,  2.39635917e-16,  9.84547909e-16],
        ...,
        [ 9.41355202e-15,  9.24169468e-15,  9.91457408e-15, ...,
          2.42926900e-15,  1.88999613e-15,  2.02111258e-15],
        [ 6.62533899e-15,  6.12919784e-15,  6.68814870e-15, ...,
          2.26529896e-15,  1.95546148e-15,  2.31516810e-15],
        [ 4.19773932e-15,  4.22672002e-15,  5.14683001e-15, ...,
          2.74915934e-15,  2.62852692e-15,  3.19896105e-15]],
       shape=(29, 49)),
 'def': array([[-7.01979167e-15,  1.52130581e-14,  2.27025833e-14, ...,
         -1.12695260e-14, -5.61673423e-15,  1.63093156e-15],
        [ 1.98875359e-17,  6.23457461e-15,  8.70795272e-15, ...,
         -3.91090863e-15, -5.32124937e-15, -6.86203828e-16],
        [ 7.33745343e-15,  9.02875534e-16, -4.16373681e-15, ...,
          5.58302434e-15,  1.43844199e-15, -1.84474819e-15],
        ...,
        [ 1.86866937e-14,  1.11568384e-14, -1.23223214e-15, ...,
          6.46390910e-15,  4.23630650e-16, -3.12592403e-15],
        [-1.09916923e-15, -9.44789015e-15, -9.65514270e-15, ...,
          1.39559288e-15,  6.67808655e-16,  3.16707846e-15],
        [-4.07907594e-14, -4.04880552e-14, -2.49911272e-14, ...,
         -1.70725874e-15,  7.45931264e-15,  1.65654301e-14]],
       shape=(29, 49)),
 'resid': array([[            nan,             nan,             nan, ...,
                     nan,             nan,             nan],
        [            nan,             nan,             nan, ...,
                     nan,             nan,             nan],
        [            nan,             nan,             nan, ...,
         -2.32668954e-14,             nan,             nan],
        ...,
        [            nan,             nan,             nan, ...,
                     nan,             nan,             nan],
        [            nan,             nan,             nan, ...,
                     nan,             nan,             nan],
        [            nan,             nan,             nan, ...,
                     nan,             nan,             nan]],
       shape=(29, 49)),
 'recon': array([[ 2.17613810e-13,  1.54488633e-13,  5.45975872e-14, ...,
         -2.27272773e-14, -3.12903119e-14, -1.69644081e-14],
        [ 2.51985006e-13,  1.02338798e-13, -4.13923363e-14, ...,
          3.45428612e-14,  2.23463409e-14, -9.48207959e-15],
        [ 2.20137063e-13,  1.04422374e-13, -3.80648764e-14, ...,
          2.42119827e-14,  6.62603118e-14,  1.08222232e-14],
        ...,
        [ 1.25349450e-13,  1.42621043e-13,  1.84298528e-13, ...,
         -1.53802408e-13, -2.83057484e-14,  7.29774784e-14],
        [-1.16620211e-13,  1.21746740e-14,  1.63970507e-13, ...,
         -1.98870506e-13, -3.13115578e-15,  1.25511156e-13],
        [-1.02624038e-13,  7.90991395e-14,  2.15724226e-13, ...,
         -1.99341479e-13, -4.73103121e-15,  1.03110567e-13]],
       shape=(29, 49)),
 'rmse': 1.2049991788576175e-13}
[21]:
plot_var(["-w_qg_moist_pv_bar_dp"], dh=0, level=500, projection=True)
Computing bootstrap (N=1213, n_boot=500) ...
  10.4% significant at 95%
  Projection (sig-only): β=7.799e-08  αx=-0.190  αy=0.128  γ=3.399e+04
../_images/notebooks_04_single_var_composite_26_1.png
[21]:
{'vmax': np.float64(2.9207260455106834e-13),
 'beta': 7.799209920330211e-08,
 'ax': -0.19018986617976386,
 'ay': 0.1280239601418067,
 'gamma': 33994.576443731414,
 'gamma_km2': 0.03399457644373141,
 'beta_raw': 7.799209920330211e-14,
 'ax_raw': -1.9018986617976386e-13,
 'ay_raw': 1.2802396014180668e-13,
 'gamma_raw': 3.399457644373141e-14,
 'prop': array([[ 1.11972792e-14,  5.55331396e-15,  3.85969282e-16, ...,
         -1.99469275e-15, -3.63172936e-15, -2.73903835e-15],
        [ 1.45723179e-14,  4.21886968e-15, -4.46225246e-15, ...,
          3.63410860e-15,  1.56400324e-15, -1.24401093e-15],
        [ 1.41687374e-14,  7.38869746e-15, -2.18221039e-15, ...,
          1.80777638e-15,  5.12542618e-15,  1.92213029e-15],
        ...,
        [ 8.18229164e-15,  1.10076600e-14,  1.51863676e-14, ...,
         -1.10196161e-14, -3.04061281e-15,  3.32178295e-15],
        [-1.57298163e-16,  7.29229205e-15,  1.56295960e-14, ...,
         -1.32110706e-14, -2.00911782e-15,  5.26637238e-15],
        [ 3.43318550e-15,  1.30841866e-14,  1.84530552e-14, ...,
         -1.48005027e-14, -4.96038820e-15,  7.77045791e-16]],
       shape=(29, 49)),
 'int': array([[ 1.13708873e-15,  1.47778831e-15,  1.70860057e-15, ...,
          2.31833373e-16,  1.15876165e-16,  6.84670997e-17],
        [ 1.53560867e-15,  1.87189711e-15,  1.80479926e-15, ...,
          1.01983615e-16,  2.30495852e-16,  2.80097650e-16],
        [ 1.44988999e-15,  1.85208290e-15,  1.86473586e-15, ...,
         -2.05487574e-16,  6.54179080e-17,  2.40524369e-16],
        ...,
        [ 2.42146844e-15,  2.34753220e-15,  2.47205991e-15, ...,
          5.76733050e-16,  4.44554122e-16,  4.70060546e-16],
        [ 1.72137786e-15,  1.59479671e-15,  1.70371378e-15, ...,
          5.57284788e-16,  4.74148395e-16,  5.54708984e-16],
        [ 1.06811506e-15,  1.09949674e-15,  1.32119502e-15, ...,
          6.91937095e-16,  6.50502707e-16,  7.84701715e-16]],
       shape=(29, 49)),
 'def': array([[ 3.85897287e-15, -8.39801918e-15, -1.24879983e-14, ...,
          6.40678261e-15,  3.24335124e-15, -5.34463315e-16],
        [-5.27222861e-17, -3.44359796e-15, -4.75454430e-15, ...,
          2.30591409e-15,  3.08206785e-15,  5.32536278e-16],
        [-4.11207568e-15, -5.36196206e-16,  2.31565955e-15, ...,
         -2.97507604e-15, -6.47989495e-16,  1.05352449e-15],
        ...,
        [-9.50730386e-15, -5.77912059e-15,  6.32138376e-16, ...,
         -3.82638310e-15, -4.38728053e-16,  1.50409864e-15],
        [ 1.65785335e-15,  6.27509368e-15,  5.97989871e-15, ...,
         -1.02618970e-15, -3.89398028e-16, -1.61313304e-15],
        [ 2.33808410e-14,  2.36793687e-14,  1.48849000e-14, ...,
          7.44947242e-16, -4.04353887e-15, -8.79455897e-15]],
       shape=(29, 49)),
 'resid': array([[            nan,             nan,             nan, ...,
                     nan,             nan,             nan],
        [            nan,             nan,             nan, ...,
                     nan,             nan,             nan],
        [            nan,             nan,             nan, ...,
         -5.39046671e-14,             nan,             nan],
        ...,
        [            nan,             nan,             nan, ...,
                     nan,             nan,             nan],
        [            nan,             nan,             nan, ...,
                     nan,             nan,             nan],
        [            nan,             nan,             nan, ...,
                     nan,             nan,             nan]],
       shape=(29, 49)),
 'recon': array([[ 1.61933408e-14, -1.36691691e-15, -1.03934284e-14, ...,
          4.64392323e-15, -2.72501956e-16, -3.20503457e-15],
        [ 1.60552043e-14,  2.64716883e-15, -7.41199750e-15, ...,
          6.04200630e-15,  4.87656694e-15, -4.31377002e-16],
        [ 1.15065517e-14,  8.70458415e-15,  1.99818502e-15, ...,
         -1.37278724e-15,  4.54285460e-15,  3.21617915e-15],
        ...,
        [ 1.09645623e-15,  7.57607158e-15,  1.82905659e-14, ...,
         -1.42692662e-14, -3.03478674e-15,  5.29594214e-15],
        [ 3.22193304e-15,  1.51621824e-14,  2.33132085e-14, ...,
         -1.36799755e-14, -1.92436745e-15,  4.20794833e-15],
        [ 2.78821415e-14,  3.78630521e-14,  3.46591502e-14, ...,
         -1.33636183e-14, -8.35342437e-15, -7.23281146e-15]],
       shape=(29, 49)),
 'rmse': 4.3661561576724523e-14}