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/2016/dev_r6325_SIMPLIF_1/DOC/TexFiles/Chapters – NEMO

source: branches/2016/dev_r6325_SIMPLIF_1/DOC/TexFiles/Chapters/Chap_STO.tex @ 6347

Last change on this file since 6347 was 6347, checked in by gm, 8 years ago

#1683: SIMPLIF-1 : Phase with the v3.6_Stable (DOC+ZDF+traqsr+lbedo)

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