Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gcm parameterization notebook update #84

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions notebooks/L96-two-scale-description.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In 1996, Lorenz proposed a two-time scale dynamical system, referred to as the Lorenz-96 model (L96), whose behavior mimics the non-linear dynamics of the extratropical atmosphere with simplified representation of multiscale interactions and nonlinear advection [Lorenz (1996)](https://www.ecmwf.int/en/elibrary/10829-predictability-problem-partly-solved). The L96 model consists of two sets of equations coupling two sets of variables ($X_k$ and $Y_j,k$), which evolve over two (slow and fast) timescales and are arranged around a latitude circle as shown in Fig. 1. The equations comprising L96 are:\n",
"In 1996, Lorenz proposed a two-time scale dynamical system, referred to as the Lorenz-96 model (L96), whose behavior mimics the non-linear dynamics of the extratropical atmosphere with simplified representation of multiscale interactions and nonlinear advection [Lorenz (1996)](https://www.ecmwf.int/en/elibrary/10829-predictability-problem-partly-solved). The L96 model consists of two sets of equations coupling two sets of variables ($X_k$ and $Y_{j,k}$), which evolve over two (slow and fast) timescales and are arranged around a latitude circle as shown in Fig. 1. The equations comprising L96 are:\n",
"\\begin{align}\n",
"\\frac{d}{dt} X_k\n",
"&= - X_{k-1} \\left( X_{k-2} - X_{k+1} \\right) - X_k + F - \\left( \\frac{hc}{b} \\right) \\sum_{j=0}^{J-1} Y_{j,k},\n",
Expand All @@ -23,7 +23,7 @@
"&= - cbY_{j+1,k} \\left( Y_{j+2,k} - Y_{j-1,k} \\right) - c Y_{j,k} + \\frac{hc}{b} X_k\n",
"\\end{align}\n",
"\n",
"where $X_k$, $k=1,\\ldots,K$, denotes $K$ slow (or low-frequency) variables and $Y_{j,k}$ , $j=1,\\ldots,J$ denotes $J*K$ fast (or high-frequency) variables. Each slow $X_k$ is coupled with $J$ fast $Y_{j,k}$ variables. The slow equations are coupled to the fast equations via a coupling term, $\\sum_{j=0}^{J-1} Y_{j,k}$, which sums over the $J$ fast variables corresponding to a particular $k$. On the other hand, each fast equation is forced by the a coupling term, \\frac{hc}{b} X_k, that depends on the slow variable corresponding that particular $k$. The coupling and the fast time-scale equations depends on three key parameters: $b$, $c$ and $h$. Here $b$ determines the magnitude of the nonlinear interactions among the fast variables, $c$ controls how rapidly the fast variables fluctuate compared to the slow variables and, and $h$ governs the strength of the coupling between the slow and fast variables. Also, the slow time-scale equation is forced by $F$, e.g. [Wilks (2005)](http://rmets.onlinelibrary.wiley.com/doi/abs/10.1256/qj.04.03).\n",
"where $X_k$, $k=1,\\ldots,K$, denotes $K$ slow (or low-frequency) variables and $Y_{j,k}$ , $j=1,\\ldots,J$ denotes $J*K$ fast (or high-frequency) variables. Each slow $X_k$ is coupled with $J$ fast $Y_{j,k}$ variables. The slow equations are coupled to the fast equations via a coupling term, $\\sum_{j=0}^{J-1} Y_{j,k}$, which sums over the $J$ fast variables corresponding to a particular $k$. On the other hand, each fast equation is forced by a coupling term, $\\frac{hc}{b} X_k$, that depends on the slow variable corresponding that particular $k$. The coupling term and the fast time-scale equation depend on three key parameters: $b$, $c$ and $h$. Here $b$ determines the magnitude of the nonlinear interactions among the fast variables, $c$ controls how rapidly the fast variables fluctuate compared to the slow variables and, $h$ governs the strength of the coupling between the slow and fast variables. Moreover, the slow time-scale equation is forced by the parameter $F$, whose value determines the chaotic behaviour of the system. E.g. [Wilks (2005)](http://rmets.onlinelibrary.wiley.com/doi/abs/10.1256/qj.04.03).\n",
"\n",
"The chaotic dynamical system L96 is very useful for testing different numerical methods in atmospheric modeling thanks to its transparency, low computational cost and simplicity compared to Global Climate Models (GCM). The interaction between variables of different scales makes the L96 model of particular interest when evaluating new parameterization methodologies. As such, it was used in assessing different techniques that were later incorporated into GCMs ([Crommelin (2008)](https://journals.ametsoc.org/view/journals/atsc/65/8/2008jas2566.1.xml), [Dorrestijn (2013)](https://royalsocietypublishing.org/doi/10.1098/rsta.2012.0374)).\n",
"\n",
Expand Down Expand Up @@ -105,7 +105,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"An example of how to use `integrate_L96_2t` is shown below. Here we choose $K=36$ and $J=10$ (i.e. 36 values of $X$ and 10 values of $Y$ per value of $X$). Also, in accordance with previous studies, we set $h=1$, $c=10$, and $b=10$. The initial condition for $X$ is setup as $X(s)=s(s-1)(s+1)$, for $s=-1\\ldots 1$, and the $Y$ is initialized with zeros. The value of $F$ is set to $10$, which is sufficient to obtain chaotic behavior. *Note: if you increase $F$, you may need to reduce $dt$ for numerical stability.* "
"An example of how to use `integrate_L96_2t` is shown below. Here we choose $K=36$ and $J=10$ (i.e. 36 values of $X$ and 10 values of $Y$ per value of $X$). Also, in accordance with previous studies, we set $h=1$, $c=10$, and $b=10$. The initial condition for $X$ is setup as $X(s)=s(s-1)(s+1)$, for $s=-1\\ldots 1$, and the $Y$ is initialized with zeros. The value of $F$ is set to $10$, which is sufficient to obtain chaotic behavior.\n",
"\n",
"*Note: if you increase $F$, you may need to reduce $dt$ for numerical stability.* "
]
},
{
Expand Down Expand Up @@ -166,23 +168,23 @@
"metadata": {},
"outputs": [],
"source": [
"plt.figure(figsize=(12, 10))\n",
"plt.figure(figsize=(12, 10), dpi=150)\n",
"plt.subplot(221)\n",
"\n",
"# Snapshot of X[k]\n",
"plt.plot(k, X[-1], label=\"$X_k(t=n_t dt)$\")\n",
"plt.plot(j / J, Y[-1], label=\"$Y_{j,k}(t=n_t dt)$\")\n",
"plt.plot(k, Xinit, \"k:\", label=\"$X_k(t=0)$\")\n",
"plt.plot(j / J, Yinit, \"k:\", label=\"$Y_{j,k}(t=0)$\")\n",
"plt.legend()\n",
"plt.plot(k, X_init, \"k:\", label=\"$X_k(t=0)$\")\n",
"plt.plot(j / J, Y_init, \"k:\", label=\"$Y_{j,k}(t=0)$\")\n",
"plt.legend(fontsize=7)\n",
"plt.xlabel(\"k, k + j/J\")\n",
"plt.title(\"$X_k, Y_{j,k}$\")\n",
"plt.subplot(222)\n",
"\n",
"# Sample time-series X[0](t), Y[0](t)\n",
"plt.plot(t, X[:, 0], label=\"$X_0(t)$\")\n",
"plt.plot(t, Y[:, 0], label=\"$Y_{0,0}(t)$\")\n",
"plt.legend()\n",
"plt.legend(fontsize=7)\n",
"plt.xlabel(\"t\")\n",
"plt.subplot(223)\n",
"\n",
Expand Down Expand Up @@ -336,7 +338,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
"version": "3.8.13"
}
},
"nbformat": 4,
Expand Down
Loading