31 REAL(KIND=8),
DIMENSION(:),
ALLOCATABLE ::
dw,
dwmult 34 REAL(KIND=8),
DIMENSION(:),
ALLOCATABLE ::
noisemult 35 REAL(KIND=8),
DIMENSION(:),
ALLOCATABLE ::
g 36 REAL(KIND=8),
DIMENSION(:),
ALLOCATABLE ::
buf_g 42 REAL(KIND=8),
PARAMETER ::
sq2 = sqrt(2.d0)
55 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 61 print*,
'Initializing the integrator ...' 71 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 74 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 77 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 99 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 105 REAL(KIND=8),
DIMENSION(0:ndim),
INTENT(IN) :: y
123 SUBROUTINE step(y,t,dt,dtn,res,tend)
124 REAL(KIND=8),
DIMENSION(0:ndim),
INTENT(IN) :: y
125 REAL(KIND=8),
INTENT(INOUT) :: t
126 REAL(KIND=8),
INTENT(IN) :: dt,dtn
127 REAL(KIND=8),
DIMENSION(0:ndim),
INTENT(OUT) :: res,tend
170 REAL(KIND=8),
DIMENSION(0:ndim),
INTENT(IN) :: y
171 REAL(KIND=8),
INTENT(INOUT) :: t
172 REAL(KIND=8),
INTENT(IN) :: dt,dtn
173 REAL(KIND=8),
DIMENSION(0:ndim),
INTENT(OUT) :: res
The stochastic models parameters module.
subroutine, public stoch_oc_unres_vec(dW)
routine to fill the unresolved oceanic component of a vector with standard gaussian noise process val...
real(kind=8) q_au
Atmospheric unresolved component noise amplitude.
integer ndim
Number of variables (dimension of the model)
subroutine, public stoch_atm_unres_vec(dW)
routine to fill the unresolved atmospheric component of a vector with standard gaussian noise process...
The MTV tensors used to integrate the MTV model.
subroutine, public init_sigma(mult, Q1fill)
Subroutine to initialize the sigma matices.
real(kind=8), dimension(:), allocatable anoise
subroutine init_noise
Routine to initialize the noise vectors and buffers.
logical mult
Logical indicating if the sigma1 matrix must be computed for every state change.
subroutine, public tendencies(t, y, res)
Routine computing the tendencies of the uncoupled resolved model.
real(kind=8) q_or
Oceanic resolved component noise amplitude.
subroutine init_g
Routine to initialize the G term.
subroutine, public init_integrator
Subroutine to initialize the MTV rk2 integrator.
subroutine, public step(y, t, dt, dtn, res, tend)
Routine to perform an integration step (Heun algorithm) of the MTV system. The incremented time is re...
real(kind=8), dimension(:), allocatable dwmult
Standard gaussian noise buffers.
subroutine, public stoch_atm_res_vec(dW)
routine to fill the resolved atmospheric component of a vector with standard gaussian noise process v...
type(coolist4), dimension(:), allocatable, public mtot
Tensor for the cubic terms.
subroutine, public full_step(y, t, dt, dtn, res)
Routine to perform an integration step (Heun algorithm) of the full stochastic system. The incremented time is returned.
The equation tensor for the coupled ocean-atmosphere model with temperature which allows for an exten...
subroutine, public sparse_mul3(coolist_ijk, arr_j, arr_k, res)
Sparse multiplication of a tensor with two vectors: .
subroutine, public init_ss_integrator
Subroutine to initialize the uncoupled resolved rk2 integrator.
The MTV noise sigma matrices used to integrate the MTV model.
subroutine, public compute_mult_sigma(y)
Routine to actualize the matrix based on the state y of the MTV system.
Module with the stochastic uncoupled resolved nonlinear and tangent linear rk2 dynamics integration r...
type(coolist), dimension(:), allocatable, public btot
Total quadratic tensor.
real(kind=8), dimension(:), allocatable buf_y1
real(kind=8), dimension(:), allocatable, public htot
Total constant vector.
Module with the MTV rk2 integration routines.
subroutine, public stoch_oc_res_vec(dW)
routine to fill the resolved oceanic component of a vector with standard gaussian noise process value...
type(coolist), dimension(:), allocatable, public ltot
Total linear tensor.
real(kind=8), dimension(:,:), allocatable, public sig1
state-dependent noise matrix
real(kind=8), dimension(:), allocatable dwau
real(kind=8), dimension(:), allocatable dwou
Standard gaussian noise buffers.
real(kind=8) q_ou
Oceanic unresolved component noise amplitude.
logical compute_mult
Logical indicating if the Gaussian noise for the multiplicative noise must be computed.
real(kind=8), parameter sq2
Hard coded square root of 2.
subroutine, public stoch_vec(dW)
Routine to fill a vector with standard Gaussian noise process values.
logical q1fill
Logical indicating if the matrix Q1 is non-zero.
subroutine, public sparse_mul2_k(coolist_ijk, arr_k, res)
Sparse multiplication of a rank-3 sparse tensor coolist with a vector: .
The model parameters module.
Utility module containing the stochastic related routines.
real(kind=8), dimension(:), allocatable buf_g
Buffer for the G term computation.
real(kind=8), dimension(:,:), allocatable, public sig2
state-independent noise matrix
subroutine compg(y)
Routine to actualize the G term based on the state y of the MTV system.
real(kind=8), dimension(:), allocatable buf_f0
real(kind=8), dimension(:), allocatable buf_f1
Integration buffers.
subroutine, public sparse_mul4(coolist_ijkl, arr_j, arr_k, arr_l, res)
Sparse multiplication of a rank-4 tensor coolist with three vectors: .
type(coolist), dimension(:), allocatable, public aotensor
- Tensor representation of the tendencies.
real(kind=8), dimension(:), allocatable dwar
real(kind=8), dimension(:), allocatable dwor
real(kind=8), dimension(:), allocatable noise
Additive noise term.
real(kind=8), dimension(:), allocatable dw
real(kind=8), dimension(:), allocatable g
G term of the MTV tendencies.
real(kind=8) mnuti
Multiplicative noise update time interval.
real(kind=8) q_ar
Atmospheric resolved component noise amplitude.
real(kind=8), dimension(:), allocatable noisemult
Multiplicative noise term.