Skip to content

Commit

Permalink
Merge pull request #114 from m2lines/textual_changes
Browse files Browse the repository at this point in the history
updated the first few notebooks on gcm analogues and parameterization.
  • Loading branch information
dhruvbalwada authored May 29, 2023
2 parents 8ec5382 + 9a2115c commit 1d97ed4
Show file tree
Hide file tree
Showing 7 changed files with 2,209 additions and 726 deletions.
234 changes: 0 additions & 234 deletions notebooks/L96-description.ipynb

This file was deleted.

20 changes: 14 additions & 6 deletions notebooks/L96-two-scale-description.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
"&= - 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 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. {cite:p}`Wilks2005`.\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. \n",
"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 to that particular $k$. \n",
"\n",
"The evolution of this two-time scale system 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. {cite:p}`Wilks2005`.\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 ({cite}`Crommelin2008`, {cite}`Dorrestijn2013`).\n",
"\n",
Expand Down Expand Up @@ -290,7 +293,14 @@
"# (Re-running this cell will give different answers after the first run)\n",
"X2, Y2, t = M.run(0.005, 5, store=True)\n",
"\n",
"print(\"Mean absolute difference =\", np.abs(X2 - X).mean() + np.abs(Y2 - Y).mean())"
"print(\n",
" \"Mean absolute difference 1st run=\", np.abs(X2 - X).mean() + np.abs(Y2 - Y).mean()\n",
")\n",
"\n",
"X2, Y2, t = M.run(0.005, 5, store=True)\n",
"print(\n",
" \"Mean absolute difference 2nd run=\", np.abs(X2 - X).mean() + np.abs(Y2 - Y).mean()\n",
")"
]
},
{
Expand All @@ -310,9 +320,7 @@
" L96(36, 10, F=10, dt=0.005)\n",
" .set_state(s(M.k, M.K) * (s(M.k, M.K) - 1) * (s(M.k, M.K) + 1), 0 * M.j)\n",
" .run(0.005, 5)\n",
")\n",
"\n",
"print(\"Mean absolute difference =\", np.abs(X3 - X).mean() + np.abs(Y3 - Y).mean())"
")"
]
}
],
Expand All @@ -332,7 +340,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
"version": "3.10.9"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion notebooks/estimating-gcm-parameters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
"version": "3.10.9"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 1d97ed4

Please sign in to comment.