29 REAL(KIND=8),
DIMENSION(:,:),
ALLOCATABLE ::
q 30 REAL(KIND=8),
DIMENSION(:,:),
ALLOCATABLE ::
qred 31 REAL(KIND=8),
DIMENSION(:,:),
ALLOCATABLE ::
rred 32 REAL(KIND=8),
DIMENSION(:,:,:),
ALLOCATABLE ::
w 33 REAL(KIND=8),
DIMENSION(:,:,:),
ALLOCATABLE ::
wred 34 REAL(KIND=8),
DIMENSION(:),
ALLOCATABLE ::
buf_y,
dw 45 INTEGER :: AllocStat,nf,i,info,info2
46 INTEGER,
DIMENSION(3) :: s
48 print*,
'Initializing the MAR integrator...' 50 print*,
'Loading the MAR config from files...' 52 OPEN(20,file=
'MAR_R_params.def',status=
'old')
54 IF (nf /=
n_unres) stop
"*** Dimension in files MAR_R_params.def and sf.nml do not correspond ! ***" 56 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 58 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 60 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 64 OPEN(20,file=
'MAR_W_params.def',status=
'old')
67 IF (nf /=
n_unres) stop
"*** Dimension in files MAR_W_params.def and sf.nml do not correspond ! ***" 68 IF (s(1) /=
ms) stop
"*** MAR order in files MAR_R_params.def and MAR_W_params.def do not correspond ! ***" 70 READ(20,*)
wred(i,:,:)
86 print*,
'MAR of order',
ms,
'found!' 93 REAL(KIND=8),
DIMENSION(0:ndim,ms),
INTENT(INOUT) :: x
102 x=eoshift(x,shift=-1,boundary=
buf_y,dim=2)
110 REAL(KIND=8),
DIMENSION(0:ndim,ms),
INTENT(INOUT) :: xred
119 xred=eoshift(xred,shift=-1,boundary=
buf_y,dim=2)
125 REAL(KIND=8),
DIMENSION(ndim),
INTENT(INOUT) :: dW
subroutine, public mar_step(x)
Routine to generate one step of the MAR.
integer ndim
Number of variables (dimension of the model)
real(kind=8), dimension(:,:), allocatable, public q
Square root of the noise covariance matrix.
real(kind=8), dimension(:,:,:), allocatable, public w
W_i matrix.
real(kind=8) function, public gasdev()
real(kind=8), dimension(:), allocatable dw
subroutine, public sqrtm(A, sqA, info, info_triu, bs)
Routine to compute a real square-root of a matrix.
integer, dimension(:), allocatable, public rind
Unresolved reduction indices.
subroutine, public ireduce(A, Ared, n, ind, rind)
subroutine, public mar_step_red(xred)
Routine to generate one step of the reduce MAR.
real(kind=8), dimension(:,:,:), allocatable, public wred
Reduce W_i matrix.
subroutine, public init_sqrt
integer, public n_unres
Number of unresolved variables.
real(kind=8), dimension(:,:), allocatable, public qred
Reduce version of Q.
integer, dimension(:), allocatable, public ind
The model parameters module.
Utility module containing the stochastic related routines.
Multidimensional Autoregressive module to generate the correlation for the WL parameterization.
real(kind=8), dimension(:,:), allocatable, public rred
Covariance matrix of the noise.
Module to select the resolved-unresolved components.
Utility module with various routine to compute matrix square root.
real(kind=8), dimension(:), allocatable buf_y
integer, public ms
order of the MAR
subroutine, public init_mar
Subroutine to initialise the MAR.