New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
chap_STO.tex in branches/2017/dev_merge_2017/DOC/texfiles/chapters – NEMO

source: branches/2017/dev_merge_2017/DOC/texfiles/chapters/chap_STO.tex @ 9376

Last change on this file since 9376 was 9376, checked in by nicolasmartin, 6 years ago

Global reorganisation of DOC directory: refactoring & cleaning of TeX source code for readability

File size: 8.1 KB
Line 
1\documentclass[NEMO_book]{subfiles}
2\begin{document}
3% ================================================================
4% Chapter stochastic parametrization of EOS (STO)
5% ================================================================
6\chapter{Stochastic parametrization of EOS (STO)}
7\label{STO}
8
9Authors: P.-A. Bouttier
10
11\minitoc
12
13\newpage
14
15
16The stochastic parametrization module aims to explicitly simulate uncertainties in the model.
17More particularly, \cite{Brankart_OM2013} has shown that,
18because of the nonlinearity of the seawater equation of state, unresolved scales represent
19a major source of uncertainties in the computation of the large scale horizontal density gradient
20(from T/S large scale fields), and that the impact of these uncertainties can be simulated
21by random processes representing unresolved T/S fluctuations.
22
23The stochastic formulation of the equation of state can be written as:
24\begin{equation}
25 \label{eq:eos_sto}
26  \rho = \frac{1}{2} \sum_{i=1}^m\{ \rho[T+\Delta T_i,S+\Delta S_i,p_o(z)] + \rho[T-\Delta T_i,S-\Delta S_i,p_o(z)] \}
27\end{equation}
28where $p_o(z)$ is the reference pressure depending on the depth and,
29$\Delta T_i$ and $\Delta S_i$ are a set of T/S perturbations defined as the scalar product
30of the respective local T/S gradients with random walks $\mathbf{\xi}$:
31\begin{equation}
32 \label{eq:sto_pert}
33 \Delta T_i = \mathbf{\xi}_i \cdot \nabla T \qquad \hbox{and} \qquad \Delta S_i = \mathbf{\xi}_i \cdot \nabla S
34\end{equation}
35$\mathbf{\xi}_i$ are produced by a first-order autoregressive processes (AR-1) with
36a parametrized decorrelation time scale, and horizontal and vertical standard deviations $\sigma_s$.
37$\mathbf{\xi}$ are uncorrelated over the horizontal and fully correlated along the vertical.
38
39
40\section{Stochastic processes}
41\label{STO_the_details}
42
43The starting point of our implementation of stochastic parameterizations
44in NEMO is to observe that many existing parameterizations are based
45on autoregressive processes, which are used as a basic source of randomness
46to transform a deterministic model into a probabilistic model.
47A generic approach is thus to add one single new module in NEMO,
48generating processes with appropriate statistics
49to simulate each kind of uncertainty in the model
50(see \cite{Brankart_al_GMD2015} for more details).
51
52In practice, at every model grid point, independent Gaussian autoregressive
53processes~$\xi^{(i)},\,i=1,\ldots,m$ are first generated
54using the same basic equation:
55
56\begin{equation}
57\label{eq:autoreg}
58\xi^{(i)}_{k+1} = a^{(i)} \xi^{(i)}_k + b^{(i)} w^{(i)} + c^{(i)}
59\end{equation}
60
61\noindent
62where $k$ is the index of the model timestep; and
63$a^{(i)}$, $b^{(i)}$, $c^{(i)}$ are parameters defining
64the mean ($\mu^{(i)}$) standard deviation ($\sigma^{(i)}$)
65and correlation timescale ($\tau^{(i)}$) of each process:
66
67\begin{itemize}
68\item for order~1 processes, $w^{(i)}$ is a Gaussian white noise,
69with zero mean and standard deviation equal to~1, and the parameters
70$a^{(i)}$, $b^{(i)}$, $c^{(i)}$ are given by:
71
72\begin{equation}
73\label{eq:ord1}
74\left\{
75\begin{array}{l}
76a^{(i)} = \varphi \\
77b^{(i)} = \sigma^{(i)} \sqrt{ 1 - \varphi^2 } 
78 \qquad\qquad\mbox{with}\qquad\qquad
79\varphi = \exp \left( - 1 / \tau^{(i)} \right) \\
80c^{(i)} = \mu^{(i)} \left( 1 - \varphi \right) \\
81\end{array}
82\right.
83\end{equation}
84
85\item for order~$n>1$ processes, $w^{(i)}$ is an order~$n-1$ autoregressive process,
86with zero mean, standard deviation equal to~$\sigma^{(i)}$; correlation timescale
87equal to~$\tau^{(i)}$; and the parameters $a^{(i)}$, $b^{(i)}$, $c^{(i)}$ are given by:
88
89\begin{equation}
90\label{eq:ord2}
91\left\{
92\begin{array}{l}
93a^{(i)} = \varphi \\
94b^{(i)} = \frac{n-1}{2(4n-3)} \sqrt{ 1 - \varphi^2 } 
95 \qquad\qquad\mbox{with}\qquad\qquad
96\varphi = \exp \left( - 1 / \tau^{(i)} \right) \\
97c^{(i)} = \mu^{(i)} \left( 1 - \varphi \right) \\
98\end{array}
99\right.
100\end{equation}
101
102\end{itemize}
103
104\noindent
105In this way, higher order processes can be easily generated recursively using
106the same piece of code implementing Eq.~(\ref{eq:autoreg}),
107and using succesively processes from order $0$ to~$n-1$ as~$w^{(i)}$.
108The parameters in Eq.~(\ref{eq:ord2}) are computed so that this recursive application
109of Eq.~(\ref{eq:autoreg}) leads to processes with the required standard deviation
110and correlation timescale, with the additional condition that
111the $n-1$ first derivatives of the autocorrelation function
112are equal to zero at~$t=0$, so that the resulting processes
113become smoother and smoother as $n$ is increased.
114
115Overall, this method provides quite a simple and generic way of generating
116a wide class of stochastic processes.
117However, this also means that new model parameters are needed to specify each of
118these stochastic processes. As in any parameterization of lacking physics,
119a very important issues then to tune these new parameters using either first principles,
120model simulations, or real-world observations.
121
122\section{Implementation details}
123\label{STO_thech_details}
124
125%---------------------------------------namsbc--------------------------------------------------
126\fortranfile{namelists/namsto}
127%--------------------------------------------------------------------------------------------------------------
128
129The computer code implementing stochastic parametrisations can be found in the STO directory.
130It involves three modules :
131\begin{description}
132\item[\mdl{stopar}] : define the Stochastic parameters and their time evolution.
133\item[\mdl{storng}] : a random number generator based on (and includes) the 64-bit KISS
134                      (Keep It Simple Stupid) random number generator distributed by George Marsaglia
135                      (see \href{https://groups.google.com/forum/#!searchin/comp.lang.fortran/64-bit$20KISS$20RNGs}{here})
136\item[\mdl{stopts}] : stochastic parametrisation associated with the non-linearity of the equation of seawater,
137 implementing Eq~\ref{eq:sto_pert} and specific piece of code in the equation of state implementing Eq~\ref{eq:eos_sto}.
138\end{description}
139
140The \mdl{stopar} module has 3 public routines to be called by the model (in our case, NEMO):
141
142The first routine (\rou{sto\_par}) is a direct implementation of Eq.~(\ref{eq:autoreg}),
143applied at each model grid point (in 2D or 3D),
144and called at each model time step ($k$) to update
145every autoregressive process ($i=1,\ldots,m$).
146This routine also includes a filtering operator, applied to $w^{(i)}$,
147to introduce a spatial correlation between the stochastic processes.
148
149The second routine (\rou{sto\_par\_init}) is an initialization routine mainly dedicated
150to the computation of parameters $a^{(i)}, b^{(i)}, c^{(i)}$
151for each autoregressive process, as a function of the statistical properties
152required by the model user (mean, standard deviation, time correlation,
153order of the process,\ldots).
154
155Parameters for the processes can be specified through the following \ngn{namsto} namelist parameters:
156\begin{description}
157   \item[\np{nn\_sto\_eos}]   : number of independent random walks
158   \item[\np{rn\_eos\_stdxy}] : random walk horz. standard deviation (in grid points)
159   \item[\np{rn\_eos\_stdz}]  : random walk vert. standard deviation (in grid points)
160   \item[\np{rn\_eos\_tcor}]  : random walk time correlation (in timesteps)
161   \item[\np{nn\_eos\_ord}]   : order of autoregressive processes
162   \item[\np{nn\_eos\_flt}]   : passes of Laplacian filter
163   \item[\np{rn\_eos\_lim}]   : limitation factor (default = 3.0)
164\end{description}
165This routine also includes the initialization (seeding) of the random number generator.
166
167The third routine (\rou{sto\_rst\_write}) writes a restart file (which suffix name is
168given by \np{cn\_storst\_out} namelist parameter) containing the current value of
169all autoregressive processes to allow restarting a simulation from where it has been interrupted.
170This file also contains the current state of the random number generator.
171When \np{ln\_rststo} is set to \textit{true}), the restart file (which suffix name is
172given by \np{cn\_storst\_in} namelist parameter) is read by the initialization routine
173(\rou{sto\_par\_init}). The simulation will continue exactly as if it was not interrupted
174only  when \np{ln\_rstseed} is set to \textit{true}, $i.e.$ when the state of
175the random number generator is read in the restart file.
176
177
178\end{document}
Note: See TracBrowser for help on using the repository browser.