The first routine (sto_par) is a direct implementation of Eq. (14.3), applied at each model grid point (in 2D or 3D), and called at each model time step () to update every autoregressive process ( ). This routine also includes a filtering operator, applied to , to introduce a spatial correlation between the stochastic processes.
The second routine (sto_par_init) is an initialization routine mainly dedicated to the computation of parameters for each autoregressive process, as a function of the statistical properties required by the model user (mean, standard deviation, time correlation, order of the process,...). Parameters for the processes can be specified through the following namelist parameters:
nn_sto_eos = 1 ! number of independent random walks
rn_eos_stdxy = 1.4 ! random walk horz. standard deviation (in grid points)
rn_eos_stdz = 0.7 ! random walk vert. standard deviation (in grid points)
rn_eos_tcor = 1440.0 ! random walk time correlation (in timesteps)
nn_eos_ord = 1 ! order of autoregressive processes
nn_eos_flt = 0 ! passes of Laplacian filter
rn_eos_lim = 2.0 ! limitation factor (default = 3.0)
The third routine (sto_rst_write) writes a “restart file” with the current value of all autoregressive processes to allow restarting a simulation from where it has been interrupted. This file also contains the current state of the random number generator. In case of a restart, this file is then read by the initialization routine (sto_par_init), so that the simulation can continue exactly as if it was not interrupted. Restart capabilities of the module are driven by the following namelist parameters:
ln_rststo = .false. ! start from mean parameter (F) or from restart file (T)
ln_rstseed = .true. ! read seed of RNG from restart file
cn_storst_in = "restart_sto" ! suffix of stochastic parameter restart file (input)
cn_storst_out = "restart_sto" ! suffix of stochastic parameter restart file (output)
In the particular case of the stochastic equation of state, there is also an additional module (sto_pts) implementing Eq 14.2 and specific piece of code in the equation of state implementing Eq 14.1.
Gurvan Madec and the NEMO Team
NEMO European Consortium2017-02-17