Global Types

The following type and type constructors are declared for optimizing numerical routines, for using multiple dispatch of functions with different specified input forms and for passing arguments between inner / outer loop steps of the DA twin experiment. Type constructors are designed to be flexible enough to handle multiple dispatch for automatic code differentiation, though seek to ensure type consistency within methods for improved performance.

DataAssimilationBenchmarks.ParamSampleType
ParamSample = Dict{String, Vector{UnitRange{Int64}}}

Dictionary containing key and index pairs to subset the state vector and then merge a statistical sample of parameters that govern the equations of motion with the ParamDict dx_params in parameter estimation problems.

DataAssimilationBenchmarks.StepKwargsType
StepKwargs = Dict{String,Any}

Key word arguments for twin experiment time stepping. Arguments are given as:

REQUIRED:

  • dx_dt - time derivative function with arguments x and dx_params
  • dx_params - parameters necessary to resolve dx_dt, not including parameters to be estimated in the extended state vector;
  • h - numerical time discretization step size

OPTIONAL:

  • diffusion - tunes the standard deviation of the Wiener process, equal to sqrt(h) * diffusion;
  • diff_mat - structure matrix for the diffusion coefficients, replaces the default uniform scaling;
  • s_infl - ensemble anomalies of state components are scaled by this parameter for calculation of emperical covariance;
  • p_infl - ensemble anomalies of extended-state components for parameter sample replicates are scaled by this parameter for calculation of emperical covariance, state_dim must be defined below;
  • state_dim - keyword for parameter estimation, specifying the dimension of the dynamic state, less than the dimension of full extended state;
  • param_sample - ParamSample dictionary for merging extended state with dx_params;
  • ξ - random array size state_dim, can be defined in kwargs to provide a particular realization for method validation;
  • γ - controls nonlinearity of the alternatingobsoperatori.

See DataAssimilationBenchmarks.ObsOperators.alternating_obs_operator for a discusssion of the γ parameter.

DataAssimilationBenchmarks.ArViewMethod
function ArView(type)
    Union{Array{T, 2}, SubArray{T, 2}} where T <: type
end

Type constructor for union of Arrays and SubArrays for use within ensemble conditioning operations, integration schemes and other array operations.

DataAssimilationBenchmarks.ConMMethod
function ConM(type)
    Union{UniformScaling{T}, Symmetric{T}} where T <: type
end

Type union of conditioning matrix types, which are used for optimization routines in the transform method.

DataAssimilationBenchmarks.CovMMethod
function CovM(type)
    Union{UniformScaling{T}, Diagonal{T, Vector{T}},
          Symmetric{T, Matrix{T}}} where T <: type
end

Type constructor for union of covariance matrix types, for multiple dispatch based on their special characteristics as symmetric, positive definite operators.

DataAssimilationBenchmarks.ParamDictMethod
function ParamDict(type)
    Union{Dict{String, Array{T}}, Dict{String, Vector{T}}} where T <: type
end

Type constructor for Dictionary of model parameters to be passed to derivative functions by name. This allows one to pass both vector parameters (and scalars written as vectors), as well as matrix valued parameters such as diffusion arrays.

DataAssimilationBenchmarks.TransMMethod
function TransM(type)
    Union{Tuple{Symmetric{T,Array{T,2}},Array{T,1},Array{T,2}},
          Tuple{Symmetric{T,Array{T,2}},Array{T,2},Array{T,2}}} where T <: type
end

Type union constructor for tuples representing the ensemble update step with a right ensemble anomaly transformation, mean update weights and mean-preserving orthogonal transformation.

DataAssimilationBenchmarks.VecAMethod
function VecA(type)
    Union{Vector{T}, SubArray{T, 1}} where T <: type
end

Type constructor for union of Vectors and 1-D SubArrays. This is utilzed in order to pass columns of an ensemble maxtrix into integration schemes and related array operations.