34 REAL(KIND=8),
DIMENSION(:),
ALLOCATABLE :: X
35 REAL(KIND=8),
DIMENSION(:),
ALLOCATABLE :: Xnew
36 REAL(KIND=8),
DIMENSION(:),
ALLOCATABLE :: tend
37 REAL(KIND=8) :: t=0.d0
42 print*,
'Model MAOOAM v1.3 stochastic' 43 print*,
'Loading information...' 45 CALL get_command_argument(1,force,lg,is)
54 print*,
'No or bad dynamics specified, using the full one!' 57 IF (force.eq.
'para')
THEN 59 print*,
'Using the stoch_params.nml specified dynamics: ',
mode 61 print*,
'Using the ', force,
' dynamics!' 68 IF (
writeout)
OPEN(10,file=
'evol_field.dat')
74 print*,
'Starting the transient time evolution...' 79 IF (mod(t/
t_trans*100.d0,0.1)<t_up)
WRITE(*,
'(" Progress ",F6.1," %",A,$)') t/
t_trans*100.d0,char(13)
82 print*,
'Starting the time evolution...' 94 IF (mod(t,
tw)<
dt)
THEN 98 IF (mod(t/
t_run*100.d0,0.1)<t_up)
WRITE(*,
'(" Progress ",F6.1," %",A,$)') t/
t_run*100.d0,char(13)
101 print*,
'Evolution finished.' 105 IF (
writeout)
OPEN(10,file=
'mean_field.dat')
The stochastic models parameters module.
Module to load the initial condition.
integer ndim
Number of variables (dimension of the model)
real(kind=8) tw
Write all variables every tw time units.
The resolved-unresolved components decomposition of the tensor.
subroutine, public init_integrator(force)
Subroutine to initialize the integrator.
logical writeout
Write to file boolean.
real(kind=8) t_run
Effective intergration time (length of the generated trajectory)
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) dtn
Square root of the timestep.
real(kind=8), dimension(:), allocatable, public ic
Initial condition vector.
subroutine, public step(y, t, dt, dtn, res, tend)
Routine to perform a stochastic step of the selected dynamics (Heun algorithm). The incremented time ...
subroutine, public init_stat
Initialise the accumulators.
The model parameters module.
program maooam_stoch
Fortran 90 implementation of the stochastic modular arbitrary-order ocean-atmosphere model MAOOAM...
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...
character(len=4) mode
Stochastic mode parameter.
subroutine, public init_dec_tensor
Subroutine that initialize and compute the decomposed tensors.
real(kind=8) t_trans
Transient time period.
subroutine, public init_aotensor
Subroutine to initialise the aotensor tensor.
Module with the stochastic rk2 integration routines.