Note
Go to the end to download the full example code.
Gill Model: Symmetric Heating with Gaussian Zonal Structure¶
This experiment applies equatorially symmetric heating with a Gaussian zonal envelope. The plots reveal how the localized forcing shapes the horizontal response and its vertical diagnostics.
import numpy as np
from easyclimate.field.simulation.gill import (
simulate,
plot_snapshot,
plot_cross_sections,
)
Run the symmetric-heating experiment with a Gaussian zonal envelope.
result_symmetric_gaussian_x = simulate(case = "gill_sym_gaussian_x")
result_symmetric_gaussian_x
<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 1.698e-41 6.583e-40 ... 3.583e-141
eta (y, x) float64 62kB -1.878e-06 -1.943e-06 ... -1.816e-06
u (y, x) float64 62kB 1.164e-06 1.159e-06 ... 1.165e-06 1.166e-06
v (y, x) float64 62kB 2.666e-08 2.897e-08 ... -2.45e-08
v_staggered (y_staggered, x) float64 61kB 5.331e-08 5.793e-08 ... -4.9e-08
Attributes: (12/17)
case: gill_sym_gaussian_x
case_label: Gill: symmetric heating with Gaussian shape in zonal direction
short_name: Gill_sym_2
t: 50.0
nt: 500
nx: 128
... ...
damping: 0.1
kernel: reyon
dt: 0.1
dx: 0.2945243112740431
dy: 0.25750759455654043
dz: 0.16534698176788384xarray.Dataset
- y: 61
- x: 128
- y_staggered: 60
- z: 20
- y(y)float64-7.725 -7.468 -7.21 ... 7.468 7.725
array([-7.725228, -7.46772 , -7.210213, -6.952705, -6.695197, -6.43769 , -6.180182, -5.922675, -5.665167, -5.407659, -5.150152, -4.892644, -4.635137, -4.377629, -4.120122, -3.862614, -3.605106, -3.347599, -3.090091, -2.832584, -2.575076, -2.317568, -2.060061, -1.802553, -1.545046, -1.287538, -1.03003 , -0.772523, -0.515015, -0.257508, 0. , 0.257508, 0.515015, 0.772523, 1.03003 , 1.287538, 1.545046, 1.802553, 2.060061, 2.317568, 2.575076, 2.832584, 3.090091, 3.347599, 3.605106, 3.862614, 4.120122, 4.377629, 4.635137, 4.892644, 5.150152, 5.407659, 5.665167, 5.922675, 6.180182, 6.43769 , 6.695197, 6.952705, 7.210213, 7.46772 , 7.725228]) - x(x)float64-12.57 -12.27 ... 24.54 24.84
array([-12.566371, -12.271846, -11.977322, -11.682798, -11.388273, -11.093749, -10.799225, -10.5047 , -10.210176, -9.915652, -9.621128, -9.326603, -9.032079, -8.737555, -8.44303 , -8.148506, -7.853982, -7.559457, -7.264933, -6.970409, -6.675884, -6.38136 , -6.086836, -5.792311, -5.497787, -5.203263, -4.908739, -4.614214, -4.31969 , -4.025166, -3.730641, -3.436117, -3.141593, -2.847068, -2.552544, -2.25802 , -1.963495, -1.668971, -1.374447, -1.079922, -0.785398, -0.490874, -0.19635 , 0.098175, 0.392699, 0.687223, 0.981748, 1.276272, 1.570796, 1.865321, 2.159845, 2.454369, 2.748894, 3.043418, 3.337942, 3.632467, 3.926991, 4.221515, 4.516039, 4.810564, 5.105088, 5.399612, 5.694137, 5.988661, 6.283185, 6.57771 , 6.872234, 7.166758, 7.461283, 7.755807, 8.050331, 8.344855, 8.63938 , 8.933904, 9.228428, 9.522953, 9.817477, 10.112001, 10.406526, 10.70105 , 10.995574, 11.290099, 11.584623, 11.879147, 12.173672, 12.468196, 12.76272 , 13.057244, 13.351769, 13.646293, 13.940817, 14.235342, 14.529866, 14.82439 , 15.118915, 15.413439, 15.707963, 16.002488, 16.297012, 16.591536, 16.886061, 17.180585, 17.475109, 17.769633, 18.064158, 18.358682, 18.653206, 18.947731, 19.242255, 19.536779, 19.831304, 20.125828, 20.420352, 20.714877, 21.009401, 21.303925, 21.598449, 21.892974, 22.187498, 22.482022, 22.776547, 23.071071, 23.365595, 23.66012 , 23.954644, 24.249168, 24.543693, 24.838217]) - y_staggered(y_staggered)float64-7.725 -7.468 -7.21 ... 7.21 7.468
array([-7.725228, -7.46772 , -7.210213, -6.952705, -6.695197, -6.43769 , -6.180182, -5.922675, -5.665167, -5.407659, -5.150152, -4.892644, -4.635137, -4.377629, -4.120122, -3.862614, -3.605106, -3.347599, -3.090091, -2.832584, -2.575076, -2.317568, -2.060061, -1.802553, -1.545046, -1.287538, -1.03003 , -0.772523, -0.515015, -0.257508, 0. , 0.257508, 0.515015, 0.772523, 1.03003 , 1.287538, 1.545046, 1.802553, 2.060061, 2.317568, 2.575076, 2.832584, 3.090091, 3.347599, 3.605106, 3.862614, 4.120122, 4.377629, 4.635137, 4.892644, 5.150152, 5.407659, 5.665167, 5.922675, 6.180182, 6.43769 , 6.695197, 6.952705, 7.210213, 7.46772 ]) - z(z)float640.0 0.1653 0.3307 ... 2.976 3.142
array([0. , 0.165347, 0.330694, 0.496041, 0.661388, 0.826735, 0.992082, 1.157429, 1.322776, 1.488123, 1.65347 , 1.818817, 1.984164, 2.149511, 2.314858, 2.480205, 2.645552, 2.810899, 2.976246, 3.141593])
- q(y, x)float641.698e-41 6.583e-40 ... 3.583e-141
array([[1.69785777e-041, 6.58313841e-040, 2.34041018e-038, ..., 6.80814558e-135, 5.15791887e-138, 3.58300563e-141], [4.51516712e-041, 1.75067492e-039, 6.22392715e-038, ..., 1.81051179e-134, 1.37166175e-137, 9.52840073e-141], [1.16157507e-040, 4.50379862e-039, 1.60117188e-037, ..., 4.65773537e-134, 3.52874669e-137, 2.45128308e-140], ..., [1.16157507e-040, 4.50379862e-039, 1.60117188e-037, ..., 4.65773537e-134, 3.52874669e-137, 2.45128308e-140], [4.51516712e-041, 1.75067492e-039, 6.22392715e-038, ..., 1.81051179e-134, 1.37166175e-137, 9.52840073e-141], [1.69785777e-041, 6.58313841e-040, 2.34041018e-038, ..., 6.80814558e-135, 5.15791887e-138, 3.58300563e-141]], shape=(61, 128)) - eta(y, x)float64-1.878e-06 ... -1.816e-06
array([[-1.87776586e-06, -1.94250085e-06, -2.00991325e-06, ..., -1.69874141e-06, -1.75597498e-06, -1.81562002e-06], [-1.51165454e-06, -1.61890508e-06, -1.73460337e-06, ..., -1.23566363e-06, -1.32050186e-06, -1.41234655e-06], [-2.78505148e-06, -3.04040729e-06, -3.31790727e-06, ..., -2.13840598e-06, -2.33532362e-06, -2.55045882e-06], ..., [-2.78505148e-06, -3.04040729e-06, -3.31790727e-06, ..., -2.13840598e-06, -2.33532362e-06, -2.55045882e-06], [-1.51165454e-06, -1.61890508e-06, -1.73460337e-06, ..., -1.23566363e-06, -1.32050186e-06, -1.41234655e-06], [-1.87776586e-06, -1.94250085e-06, -2.00991325e-06, ..., -1.69874141e-06, -1.75597498e-06, -1.81562002e-06]], shape=(61, 128)) - u(y, x)float641.164e-06 1.159e-06 ... 1.166e-06
array([[ 1.16397533e-06, 1.15859834e-06, 1.14968159e-06, ..., 1.16181000e-06, 1.16530762e-06, 1.16611731e-06], [-4.39809204e-07, -5.22453890e-07, -6.13424445e-07, ..., -2.36477345e-07, -2.97326037e-07, -3.64939621e-07], [-2.27902501e-06, -2.51177174e-06, -2.76535426e-06, ..., -1.69302947e-06, -1.87086199e-06, -2.06580170e-06], ..., [-2.27902501e-06, -2.51177174e-06, -2.76535426e-06, ..., -1.69302947e-06, -1.87086199e-06, -2.06580170e-06], [-4.39809204e-07, -5.22453890e-07, -6.13424445e-07, ..., -2.36477345e-07, -2.97326037e-07, -3.64939621e-07], [ 1.16397533e-06, 1.15859834e-06, 1.14968159e-06, ..., 1.16181000e-06, 1.16530762e-06, 1.16611731e-06]], shape=(61, 128)) - v(y, x)float642.666e-08 2.897e-08 ... -2.45e-08
array([[ 2.66563438e-08, 2.89655427e-08, 3.14397645e-08, ..., 2.06253364e-08, 2.24946523e-08, 2.45023144e-08], [ 1.09091697e-07, 1.18513720e-07, 1.28607964e-07, ..., 8.44763083e-08, 9.21073327e-08, 1.00301557e-07], [ 3.02825465e-07, 3.28881920e-07, 3.56793249e-07, ..., 2.34725097e-07, 2.55842015e-07, 2.78512017e-07], ..., [-3.02825465e-07, -3.28881920e-07, -3.56793249e-07, ..., -2.34725097e-07, -2.55842015e-07, -2.78512017e-07], [-1.09091697e-07, -1.18513720e-07, -1.28607964e-07, ..., -8.44763083e-08, -9.21073327e-08, -1.00301557e-07], [-2.66563438e-08, -2.89655427e-08, -3.14397645e-08, ..., -2.06253364e-08, -2.24946523e-08, -2.45023144e-08]], shape=(61, 128)) - v_staggered(y_staggered, x)float645.331e-08 5.793e-08 ... -4.9e-08
array([[ 5.33126877e-08, 5.79310853e-08, 6.28795291e-08, ..., 4.12506729e-08, 4.49893046e-08, 4.90046288e-08], [ 1.64870706e-07, 1.79096355e-07, 1.94336399e-07, ..., 1.27701944e-07, 1.39225361e-07, 1.51598486e-07], [ 4.40780223e-07, 4.78667485e-07, 5.19250099e-07, ..., 3.41748250e-07, 3.72458669e-07, 4.05425547e-07], ..., [-4.40780223e-07, -4.78667485e-07, -5.19250099e-07, ..., -3.41748250e-07, -3.72458669e-07, -4.05425547e-07], [-1.64870706e-07, -1.79096355e-07, -1.94336399e-07, ..., -1.27701944e-07, -1.39225361e-07, -1.51598486e-07], [-5.33126876e-08, -5.79310853e-08, -6.28795290e-08, ..., -4.12506729e-08, -4.49893046e-08, -4.90046287e-08]], shape=(60, 128))
- case :
- gill_sym_gaussian_x
- case_label :
- Gill: symmetric heating with Gaussian shape in zonal direction
- short_name :
- Gill_sym_2
- t :
- 50.0
- nt :
- 500
- nx :
- 128
- ny :
- 60
- nz :
- 20
- lx :
- 37.69911184307752
- ly :
- 15.707963267948966
- lz :
- 3.141592653589793
- damping :
- 0.1
- kernel :
- reyon
- dt :
- 0.1
- dx :
- 0.2945243112740431
- dy :
- 0.25750759455654043
- dz :
- 0.16534698176788384
Plot eta and the horizontal wind vector field.
plot_snapshot(
result_symmetric_gaussian_x,
quiver_kwargs={"scale": 10},
contourf_kwargs = {"levels": np.linspace(-2, 2, 21)}
)

<Axes: title={'center': 'Gill: symmetric heating with Gaussian shape in zonal direction\nt = 50.00'}, xlabel='x', ylabel='y'>
Plot the derived vertical cross-section diagnostics.
plot_cross_sections(
result_symmetric_gaussian_x,
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)}
)

<Figure size 800x800 with 6 Axes>
Total running time of the script: (0 minutes 6.976 seconds)