Differential Equation Solvers

Three general schemes are developed for ordinary and stochastic differential equations,

These schemes have arguments with the conventions:

  • x - model states of type VecA possibly including a statistical replicate of model parameter values;
  • t - time value of type Float64 for present model state (a dummy argument is used for autonomous dynamics);
  • kwargs - a dictionary of type StepKwargs.

Details of these schemes are available in the manuscript Grudzien et al. 2020 Because the second order Taylor-Stratonovich scheme relies specifically on the structure of the Lorenz-96 model with additive noise, this is included separately in the Lorenz-96 model sub-module. These time steppers over-write the value of the model state x in-place for efficient ensemble integration.

The four-stage Runge-Kutta scheme follows the convention in data assimilation of the extended state formalism for parameter estimation. In particular, the parameter sample should be included as trailing state variables in the columns of the ensemble array. If the following conditional is true:

true == haskey(kwargs, "param_sample")

the state_dim parameter specifies the dimension of the dynamical states and creates a view of the vector x including all entries up to this index. The remaining entries in the state vector x will be passed to the dx_dt function in a dictionary merged with the dx_params ParamDict, according to the param_sample indices and parameter values specified in param_sample. The parameter sample values will remain unchanged by the time stepper when the dynamical state entries in x are over-written in place.

Setting diffusion > 0.0 introduces additive noise to the dynamical system. The main DataAssimilationBenchmarks.DeSolvers.rk4_step! has convergence on order 4.0 when diffusion is equal to zero, and both strong and weak convergence on order 1.0 when stochasticity is introduced. This is the recommended out-of-the-box solver for any generic DA simulation for the statistically robust performance, versus Euler-(Maruyama). When specifically generating the truth-twin for the Lorenz-96 model with additive noise, this should be performed with the DataAssimilationBenchmarks.L96.l96s_tay2_step!, while the ensemble should be generated with the DataAssimilationBenchmarks.DeSolvers.rk4_step!. See the benchmarks on the L96-s model for a full discussion of statistically robust model configurations.

Methods

DataAssimilationBenchmarks.DeSolvers.em_step!Method
em_step!(x::VecA(T), t::Float64, kwargs::StepKwargs) where T <: Real

Steps model state with the Euler-Maruyama scheme.

This method has order 1.0 convergence for ODEs and for SDEs with additive noise, though has inferior performance to the four stage Runge-Kutta scheme when the amplitude of the SDE noise purturbations are small-to-moderately large.

This overwrites the input in-place and returns the updated

return x
DataAssimilationBenchmarks.DeSolvers.rk4_step!Method
rk4_step!(x::VecA(T), t::Float64, kwargs::StepKwargs) where T <: Real

Steps model state with the 4 stage Runge-Kutta scheme.

The rule has strong convergence order 1.0 for generic SDEs and order 4.0 for ODEs. This method overwrites the input in-place and returns the updated

return x
DataAssimilationBenchmarks.DeSolvers.tay2_step!Method
tay2_step!(x::VecA(T), t::Float64, kwargs::StepKwargs) where T<: Real

Steps model state with the deterministic second order autonomous Taylor method.

This method has order 2.0 convergence for autonomous ODEs. Time variable t is just a dummy variable, where this method is not defined for non-autonomous dynamics. This overwrites the input in-place and returns the updated

return x