Gill Model: Symmetric Heating

This example simulates the steady linear response to heating that is symmetric about the equator. The horizontal snapshot shows the geopotential-height perturbation and horizontal circulation; the cross sections diagnose the corresponding vertical structure.

import numpy as np
from easyclimate.field.simulation.gill import (
    simulate,
    plot_snapshot,
    plot_cross_sections,
)

Run the symmetric Gill-heating experiment. The returned xarray Dataset holds the final horizontal fields and the coordinates needed by the plotting helpers.

<xarray.Dataset> Size: 313kB
Dimensions:      (y: 61, x: 128, y_staggered: 60, z: 20)
Coordinates:
  * y            (y) float64 488B -7.725 -7.468 -7.21 ... 7.21 7.468 7.725
  * x            (x) float64 1kB -12.57 -12.27 -11.98 ... 24.25 24.54 24.84
  * y_staggered  (y_staggered) float64 480B -7.725 -7.468 -7.21 ... 7.21 7.468
  * z            (z) float64 160B 0.0 0.1653 0.3307 0.496 ... 2.811 2.976 3.142
Data variables:
    q            (y, x) float64 62kB 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0
    eta          (y, x) float64 62kB -1.904e-06 -1.969e-06 ... -1.841e-06
    u            (y, x) float64 62kB 1.187e-06 1.183e-06 ... 1.188e-06 1.189e-06
    v            (y, x) float64 62kB 2.706e-08 2.894e-08 ... -2.446e-08
    v_staggered  (y_staggered, x) float64 61kB 5.411e-08 ... -4.892e-08
Attributes: (12/17)
    case:        gill_sym
    case_label:  Gill: symmetric heating
    short_name:  Gill_sym
    t:           50.0
    nt:          500
    nx:          128
    ...          ...
    damping:     0.1
    kernel:      reyon
    dt:          0.1
    dx:          0.2945243112740431
    dy:          0.25750759455654043
    dz:          0.16534698176788384


Plot eta as filled contours with the horizontal wind vector field.

plot_snapshot(
    result_symmetric_heating,
    quiver_kwargs={"scale": 30},
)
Gill: symmetric heating t = 50.00
<Axes: title={'center': 'Gill: symmetric heating\nt = 50.00'}, xlabel='x', ylabel='y'>

Plot the derived u-w and v-w streamfunctions and the zonal-mean zonal wind.

plot_cross_sections(
    result_symmetric_heating,
    contourf_uw_kwargs = {"levels": np.linspace(-0.2, 0.2, 21)},
    contourf_vw_kwargs = {"levels": np.linspace(-0.02, 0.02, 21)},
    contourf_u_kwargs = {"levels": np.linspace(-0.2, 0.2, 21)}
)
Gill: symmetric heating t = 50.00 u-w, v-w, u
<Figure size 800x800 with 6 Axes>

Total running time of the script: (0 minutes 8.915 seconds)