22 REAL(KIND=8),
DIMENSION(:),
ALLOCATABLE :: X
23 REAL(KIND=8),
DIMENSION(:),
ALLOCATABLE :: Xnew
24 REAL(KIND=8),
DIMENSION(:),
ALLOCATABLE :: tend
25 REAL(KIND=8) :: t=0.d0
28 print*,
'Model MAOOAM v1.3 MTV' 29 print*,
'Loading information...' 40 IF (
writeout)
OPEN(10,file=
'evol_MTV.dat')
41 IF (
writeout)
OPEN(12,file=
'ptend_MTV.dat')
47 print*,
'Starting an initial transient time full model evolution...' 52 IF (mod(t/
t_trans*100.d0,0.1)<t_up)
WRITE(*,
'(" Progress ",F6.1," %",A,$)') t/
t_trans*100.d0,char(13)
55 print*,
'Starting a transient time MTV model evolution...' 67 print*,
'Starting the MTV time evolution...' 77 IF (mod(t,
tw)<
dt)
THEN 82 IF (mod(t/
t_run*100.d0,0.1)<t_up)
WRITE(*,
'(" Progress ",F6.1," %",A,$)') t/
t_run*100.d0,char(13)
85 print*,
'Evolution finished.' 90 IF (
writeout)
OPEN(10,file=
'mean_field_MTV.dat')
The stochastic models parameters module.
Module to load the initial condition.
integer ndim
Number of variables (dimension of the model)
The MTV tensors used to integrate the MTV model.
real(kind=8) tw
Write all variables every tw time units.
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...
logical writeout
Write to file boolean.
real(kind=8) t_run
Effective intergration time (length of the generated trajectory)
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.
subroutine, public acc(x)
Accumulate one state.
The equation tensor for the coupled ocean-atmosphere model with temperature which allows for an exten...
real(kind=8) t_trans_stoch
Transient time period of the stochastic model evolution.
real(kind=8) dtn
Square root of the timestep.
Module with the MTV rk2 integration routines.
real(kind=8), dimension(:), allocatable, public ic
Initial condition vector.
program maooam_mtv
Fortran 90 implementation of the modular arbitrary-order ocean-atmosphere model MAOOAM - MTV paramete...
subroutine, public init_mtv_int_tensor
Subroutine to initialise the MTV tensor.
subroutine, public init_stat
Initialise the accumulators.
The model parameters module.
real(kind=8) function, dimension(0:ndim), public mean()
Function returning the mean.
real(kind=8) dt
Integration time step.
subroutine, public load_ic
Subroutine to load the initial condition if IC.nml exists. If it does not, then write IC...
real(kind=8) t_trans
Transient time period.
subroutine, public init_aotensor
Subroutine to initialise the aotensor tensor.