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