[6997] | 1 | \documentclass[NEMO_book]{subfiles} |
---|
| 2 | \begin{document} |
---|
[5404] | 3 | % ================================================================ |
---|
| 4 | % Chapter stochastic parametrization of EOS (STO) |
---|
| 5 | % ================================================================ |
---|
| 6 | \chapter{Stochastic parametrization of EOS (STO)} |
---|
| 7 | \label{STO} |
---|
| 8 | |
---|
[6497] | 9 | Authors: P.-A. Bouttier |
---|
| 10 | |
---|
[5404] | 11 | \minitoc |
---|
| 12 | |
---|
[6497] | 13 | \newpage |
---|
[5404] | 14 | |
---|
[6497] | 15 | |
---|
| 16 | The stochastic parametrization module aims to explicitly simulate uncertainties in the model. |
---|
| 17 | More particularly, \cite{Brankart_OM2013} has shown that, |
---|
| 18 | because of the nonlinearity of the seawater equation of state, unresolved scales represent |
---|
| 19 | a 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 |
---|
| 21 | by 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 the scalar product |
---|
| 30 | 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{STO_the_details} |
---|
| 42 | |
---|
| 43 | The starting point of our implementation of stochastic parameterizations |
---|
| 44 | in NEMO is to observe that many existing parameterizations are based |
---|
| 45 | on autoregressive processes, which are used as a basic source of randomness |
---|
| 46 | to transform a deterministic model into a probabilistic model. |
---|
| 47 | A generic approach is thus to add one single new module in NEMO, |
---|
| 48 | generating processes with appropriate statistics |
---|
| 49 | to simulate each kind of uncertainty in the model |
---|
| 50 | (see \cite{Brankart_al_GMD2015} for more details). |
---|
| 51 | |
---|
| 52 | In practice, at every model grid point, independent Gaussian autoregressive |
---|
| 53 | processes~$\xi^{(i)},\,i=1,\ldots,m$ are first generated |
---|
| 54 | using 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 |
---|
| 62 | where $k$ is the index of the model timestep; and |
---|
| 63 | $a^{(i)}$, $b^{(i)}$, $c^{(i)}$ are parameters defining |
---|
| 64 | the mean ($\mu^{(i)}$) standard deviation ($\sigma^{(i)}$) |
---|
| 65 | and correlation timescale ($\tau^{(i)}$) of each process: |
---|
| 66 | |
---|
| 67 | \begin{itemize} |
---|
| 68 | \item for order~1 processes, $w^{(i)}$ is a Gaussian white noise, |
---|
| 69 | with 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} |
---|
| 76 | a^{(i)} = \varphi \\ |
---|
| 77 | b^{(i)} = \sigma^{(i)} \sqrt{ 1 - \varphi^2 } |
---|
| 78 | \qquad\qquad\mbox{with}\qquad\qquad |
---|
| 79 | \varphi = \exp \left( - 1 / \tau^{(i)} \right) \\ |
---|
| 80 | c^{(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, |
---|
| 86 | with zero mean, standard deviation equal to~$\sigma^{(i)}$; correlation timescale |
---|
| 87 | equal 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} |
---|
| 93 | a^{(i)} = \varphi \\ |
---|
| 94 | b^{(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) \\ |
---|
| 97 | c^{(i)} = \mu^{(i)} \left( 1 - \varphi \right) \\ |
---|
| 98 | \end{array} |
---|
| 99 | \right. |
---|
| 100 | \end{equation} |
---|
| 101 | |
---|
| 102 | \end{itemize} |
---|
| 103 | |
---|
| 104 | \noindent |
---|
| 105 | In this way, higher order processes can be easily generated recursively using |
---|
| 106 | the same piece of code implementing Eq.~(\ref{eq:autoreg}), |
---|
| 107 | and using succesively processes from order $0$ to~$n-1$ as~$w^{(i)}$. |
---|
| 108 | The parameters in Eq.~(\ref{eq:ord2}) are computed so that this recursive application |
---|
| 109 | of Eq.~(\ref{eq:autoreg}) leads to processes with the required standard deviation |
---|
| 110 | and correlation timescale, with the additional condition that |
---|
| 111 | the $n-1$ first derivatives of the autocorrelation function |
---|
| 112 | are equal to zero at~$t=0$, so that the resulting processes |
---|
| 113 | become smoother and smoother as $n$ is increased. |
---|
| 114 | |
---|
| 115 | Overall, this method provides quite a simple and generic way of generating |
---|
| 116 | a wide class of stochastic processes. |
---|
| 117 | However, this also means that new model parameters are needed to specify each of |
---|
| 118 | these stochastic processes. As in any parameterization of lacking physics, |
---|
| 119 | a very important issues then to tune these new parameters using either first principles, |
---|
| 120 | model simulations, or real-world observations. |
---|
| 121 | |
---|
| 122 | \section{Implementation details} |
---|
| 123 | \label{STO_thech_details} |
---|
| 124 | |
---|
[6289] | 125 | %---------------------------------------namsbc-------------------------------------------------- |
---|
| 126 | \namdisplay{namsto} |
---|
| 127 | %-------------------------------------------------------------------------------------------------------------- |
---|
| 128 | |
---|
[6497] | 129 | The computer code implementing stochastic parametrisations can be found in the STO directory. |
---|
| 130 | It 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} |
---|
[6289] | 139 | |
---|
[6497] | 140 | The \mdl{stopar} module has 3 public routines to be called by the model (in our case, NEMO): |
---|
| 141 | |
---|
| 142 | The first routine (\rou{sto\_par}) is a direct implementation of Eq.~(\ref{eq:autoreg}), |
---|
| 143 | applied at each model grid point (in 2D or 3D), |
---|
| 144 | and called at each model time step ($k$) to update |
---|
| 145 | every autoregressive process ($i=1,\ldots,m$). |
---|
| 146 | This routine also includes a filtering operator, applied to $w^{(i)}$, |
---|
| 147 | to introduce a spatial correlation between the stochastic processes. |
---|
| 148 | |
---|
| 149 | The second routine (\rou{sto\_par\_init}) is an initialization routine mainly dedicated |
---|
| 150 | to the computation of parameters $a^{(i)}, b^{(i)}, c^{(i)}$ |
---|
| 151 | for each autoregressive process, as a function of the statistical properties |
---|
| 152 | required by the model user (mean, standard deviation, time correlation, |
---|
| 153 | order of the process,\ldots). |
---|
| 154 | |
---|
| 155 | Parameters 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} |
---|
| 165 | This routine also includes the initialization (seeding) of the random number generator. |
---|
| 166 | |
---|
| 167 | The third routine (\rou{sto\_rst\_write}) writes a restart file (which suffix name is |
---|
| 168 | given by \np{cn\_storst\_out} namelist parameter) containing the current value of |
---|
| 169 | all autoregressive processes to allow restarting a simulation from where it has been interrupted. |
---|
| 170 | This file also contains the current state of the random number generator. |
---|
| 171 | When \np{ln\_rststo} is set to \textit{true}), the restart file (which suffix name is |
---|
| 172 | given 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 |
---|
| 174 | only when \np{ln\_rstseed} is set to \textit{true}, $i.e.$ when the state of |
---|
| 175 | the random number generator is read in the restart file. |
---|
[6997] | 176 | |
---|
| 177 | |
---|
| 178 | \end{document} |
---|