33 REAL(KIND=8),
DIMENSION(:),
ALLOCATABLE ::
anoise 36 REAL(KIND=8),
DIMENSION(:,:),
ALLOCATABLE ::
x1 37 REAL(KIND=8),
DIMENSION(:,:),
ALLOCATABLE ::
x2 44 INTEGER :: AllocStat,i
48 print*,
'Initializing the integrator ...' 50 IF (
mode.ne.
'ures')
THEN 51 print*,
'*** Mode set to ',
mode,
' in stoch_params.nml ***' 52 print*,
'*** WL configuration only support unresolved mode ***' 53 stop
"*** Please change to 'ures' and perform the configuration again ! ***" 57 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 60 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 63 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 66 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 83 print*,
'Initializing the MARs ...' 106 REAL(KIND=8),
DIMENSION(0:ndim),
INTENT(IN) :: y
115 REAL(KIND=8),
DIMENSION(0:ndim),
INTENT(IN) :: y
131 SUBROUTINE step(y,t,dt,dtn,res,tend)
132 REAL(KIND=8),
DIMENSION(0:ndim),
INTENT(IN) :: y
133 REAL(KIND=8),
INTENT(INOUT) :: t
134 REAL(KIND=8),
INTENT(IN) :: dt,dtn
135 REAL(KIND=8),
DIMENSION(0:ndim),
INTENT(OUT) :: res,tend
138 IF (mod(t,
muti)<dt)
THEN 185 REAL(KIND=8),
DIMENSION(0:ndim),
INTENT(IN) :: y
186 REAL(KIND=8),
INTENT(INOUT) :: t
187 REAL(KIND=8),
INTENT(IN) :: dt,dtn
188 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.
subroutine, public mar_step(x)
Routine to generate one step of the MAR.
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...
real(kind=8), dimension(:,:), allocatable x1
Buffer holding the subsequent states of the first MAR.
real(kind=8) muti
Memory update time interval.
real(kind=8), dimension(:), allocatable buf_m
Dummy vector.
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.
type(coolist), dimension(:), allocatable, public m12
Second component of the M1 term.
subroutine, public stoch_atm_res_vec(dW)
routine to fill the resolved atmospheric component of a vector with standard gaussian noise process v...
procedure(ss_step), pointer step
Procedural pointer pointing on the resolved dynamics step routine.
real(kind=8), dimension(:), allocatable dwor
Standard gaussian noise buffers.
The equation tensor for the coupled ocean-atmosphere model with temperature which allows for an exten...
real(kind=8), dimension(:,:), allocatable x2
Buffer holding the subsequent states of the second MAR.
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.
real(kind=8), dimension(:), allocatable buf_f1
Integration buffers.
real(kind=8), dimension(:), allocatable buf_f0
Module with the stochastic uncoupled resolved nonlinear and tangent linear rk2 dynamics integration r...
real(kind=8), dimension(:), allocatable buf_m3
Dummy vector to store the integrand.
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 m22
Second tensor of the M2 term.
real(kind=8), dimension(:), allocatable dwar
real(kind=8), dimension(:), allocatable buf_m3s
Dummy buffers holding the terms /f$M_i.
subroutine, public init_integrator
Subroutine that initialize the MARs, the memory unit and the integration buffers. ...
real(kind=8) q_ou
Oceanic unresolved component noise amplitude.
The WL tensors used to integrate the model.
subroutine compute_m2(y)
Routine to compute the term.
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.
integer natm
Number of atmospheric basis functions.
real(kind=8), dimension(:), allocatable buf_m2
real(kind=8), dimension(:), allocatable buf_y1
real(kind=8) dtsn
Square root of the intrisic resolved dynamics time step.
subroutine, public sparse_mul2_k(coolist_ijk, arr_k, res)
Sparse multiplication of a rank-3 sparse tensor coolist with a vector: .
subroutine, public init_memory
Subroutine to initialise the memory.
Module with the WL rk2 integration routines.
The model parameters module.
Utility module containing the stochastic related routines.
subroutine, public compute_m3(y, dt, dtn, savey, save_ev, evolve, inter, h_int)
Compute the integrand of at each time in the past and integrate to get the memory term...
real(kind=8), dimension(:), allocatable anoise
Additive noise term.
Multidimensional Autoregressive module to generate the correlation for the WL parameterization.
Module that compute the memory term of the WL parameterization.
real(kind=8), dimension(:), allocatable buf_m1
type(coolist), dimension(:), allocatable, public aotensor
- Tensor representation of the tendencies.
character(len=4) mode
Stochastic mode parameter.
real(kind=8), dimension(:), allocatable dwou
Standard gaussian noise buffers.
real(kind=8) q_ar
Atmospheric resolved component noise amplitude.
type(coolist), dimension(:), allocatable, public m21
First tensor of the M2 term.
integer, public ms
order of the MAR
subroutine, public init_mar
Subroutine to initialise the MAR.
real(kind=8), dimension(:), allocatable dwau
real(kind=8), dimension(:), allocatable, public m1tot
Total vector.
real(kind=8) dts
Intrisic resolved dynamics time step.
subroutine compute_m1(y)
Routine to compute the term.