FilterExps

The FilterExps.jl sub-module contains methods to configure filter twin experiments, using a stored time series as generated by GenerateTimeSeries as the underlying observation generating process. The frequency of observations in continuous time is defined by the frequency of data saved in the time series and is inferred by the experiment when reading in the data.

Filter experiment configurations are generated by supplying a NamedTuple with the required fields as specified in the experiment method. Conventions for these arguments are as follows:

  • time_series - the path and file name of the .jld2 truth twin data set;
  • method - the sub-method analysis scheme string name;
  • seed - the pseudo-random seed that will define, e.g., the observation noise sequence;
  • nanl - the number of observation / analysis times to produce a posterior estimate;
  • obs_un - the observation error standard deviation, assuming a uniform scaling observation error covariance;
  • obs_dim - the dimension of the observation vector;
  • γ - defines nonlinearity in the DataAssimilationBenchmarks.ObsOperators.alternating_obs_operator;
  • N_ens - the ensemble size for ensemble-based filters;
  • s_infl - the multiplicative inflation for the empirical model state covariance;
  • p_infl - the multiplicative inflation for the empirical parameter sample covariance;
  • p_err - defines initial parameter sample standard deviation as p_err percent of the system parameter value;
  • p_wlk - defines the standard deviation of a Gaussian random walk as p_wlk percent of the estimated parameter value for a random parameter model.

Standard configurations should be defined in the SingleExperimentDriver module, for reproducing results and generating standard tests of methods.

Filter Experiment Methods

DataAssimilationBenchmarks.FilterExps.D3_var_filter_stateMethod
D3_var_filter_state((time_series::String, bkg_cov::String, seed::Int64, nanl::Int64,
                        obs_dim::Int64, obs_un:Float64, γ::Float64,
                        s_infl::Float64)::NamedTuple)

3D-VAR state estimation twin experiment.

Output from the experiment is saved in a dictionary of the form,

data = Dict{String,Any}(
                        "fore_rmse" => fore_rmse,
                        "filt_rmse" => filt_rmse,
                        "bkg_cov" => bkg_cov,
                        "seed" => seed,
                        "diffusion" => diffusion,
                        "dx_params" => dx_params,
                        "sys_dim" => sys_dim,
                        "obs_dim" => obs_dim,
                        "obs_un" => obs_un,
                        "γ" => γ,
                        "nanl" => nanl,
                        "tanl" => tanl,
                        "h" =>  h,
                        "s_infl" => round(s_infl, digits=2)
                       )

Experiment output is written to a directory defined by

path = pkgdir(DataAssimilationBenchmarks) * "/src/data/D3-var-bkg-" * bkg_cov * "/"

where the file name is written dynamically according to the selected parameters as follows:

"bkg-" * bkg_cov *
"_L96" *
"_state_seed_" * lpad(seed, 4, "0") *
"_diff_" * rpad(diffusion, 5, "0") *
"_sysD_" * lpad(sys_dim, 2, "0") *
"_obsD_" * lpad(obs_dim, 2, "0") *
"_obsU_" * rpad(obs_un, 4, "0") *
"_gamma_" * lpad(γ, 5, "0") *
"_nanl_" * lpad(nanl, 5, "0") *
"_tanl_" * rpad(tanl, 4, "0") *
"_h_" * rpad(h, 4, "0") *
"_stateInfl_" * rpad(round(s_infl, digits=3), 5, "0") *
".jld2"
source
DataAssimilationBenchmarks.FilterExps.ensemble_filter_paramMethod
ensemble_filter_param((time_series::String, method::String, seed::Int64, nanl::Int64,
                       obs_un::Float64, obs_dim::Int64, γ::Float64, p_err::Float64,
                       p_wlk::Float64, N_ens::Int64, s_infl::Float64,
                       p_infl::Float64)::NamedTuple)

Ensemble filter joint state-parameter estimation twin experiment.

Output from the experiment is saved in a dictionary of the form,

data = Dict{String,Any}(
                        "fore_rmse" => fore_rmse,
                        "filt_rmse" => filt_rmse,
                        "param_rmse" => para_rmse,
                        "fore_spread" => fore_spread,
                        "filt_spread" => filt_spread,
                        "param_spread" => para_spread,
                        "method" => method,
                        "seed" => seed,
                        "diffusion" => diffusion,
                        "dx_params" => dx_params,
                        "param_truth" => param_truth,
                        "sys_dim" => sys_dim,
                        "state_dim" => state_dim,
                        "obs_dim" => obs_dim,
                        "obs_un" => obs_un,
                        "γ" => γ,
                        "p_err" => p_err,
                        "p_wlk" => p_wlk,
                        "nanl" => nanl,
                        "tanl" => tanl,
                        "h" => h,
                        "N_ens" => N_ens,
                        "s_infl" => round(s_infl, digits=2),
                        "p_infl" => round(p_infl, digits=2)
                       )

if haskey(ts, "diff_mat")
    data["diff_mat"] = ts["diff_mat"]::Array{Float64,2}
end

Experiment output is written to a directory defined by

path = pkgdir(DataAssimilationBenchmarks) * "/src/data/" * method * "/"

where the file name is written dynamically according to the selected parameters as follows:

method *
"_" * model *
"_param_seed_" * lpad(seed, 4, "0") *
"_diff_" * rpad(diffusion, 5, "0") *
"_sysD_" * lpad(sys_dim, 2, "0") *
"_stateD_" * lpad(state_dim, 2, "0") *
"_obsD_" * lpad(obs_dim, 2, "0") *
"_obsU_" * rpad(obs_un, 4, "0") *
"_gamma_" * lpad(γ, 5, "0") *
"_paramE_" * rpad(p_err, 4, "0") *
"_paramW_" * rpad(p_wlk, 6, "0") *
"_nanl_" * lpad(nanl, 5, "0") *
"_tanl_" * rpad(tanl, 4, "0") *
"_h_" * rpad(h, 4, "0") *
"_nens_" * lpad(N_ens, 3, "0") *
"_stateInfl_" * rpad(round(s_infl, digits=2), 4, "0") *
"_paramInfl_" * rpad(round(p_infl, digits=2), 4, "0") *
".jld2"
source
DataAssimilationBenchmarks.FilterExps.ensemble_filter_stateMethod
ensemble_filter_state((time_series::String, method::String, seed::Int64, nanl::Int64,
                       obs_un::Float64, obs_dim::Int64, γ::Float64, N_ens::Int64,
                       s_infl::Float64)::NamedTuple)

Ensemble filter state estimation twin experiment.

Output from the experiment is saved in a dictionary of the form,

data = Dict{String,Any}(
                        "fore_rmse" => fore_rmse,
                        "filt_rmse" => filt_rmse,
                        "fore_spread" => fore_spread,
                        "filt_spread" => filt_spread,
                        "method" => method,
                        "seed" => seed,
                        "diffusion" => diffusion,
                        "dx_params" => dx_params,
                        "sys_dim" => sys_dim,
                        "obs_dim" => obs_dim,
                        "obs_un" => obs_un,
                        "γ" => γ,
                        "nanl" => nanl,
                        "tanl" => tanl,
                        "h" =>  h,
                        "N_ens" => N_ens,
                        "s_infl" => round(s_infl, digits=2)
                       )

if haskey(ts, "diff_mat")
    data["diff_mat"] = ts["diff_mat"]::Array{Float64,2}
end

Experiment output is written to a directory defined by

path = pkgdir(DataAssimilationBenchmarks) * "/src/data/" * method * "/"

where the file name is written dynamically according to the selected parameters as follows:

method *
"_" * model *
"_state_seed_" * lpad(seed, 4, "0") *
"_diff_" * rpad(diffusion, 5, "0") *
"_sysD_" * lpad(sys_dim, 2, "0") *
"_obsD_" * lpad(obs_dim, 2, "0") *
"_obsU_" * rpad(obs_un, 4, "0") *
"_gamma_" * lpad(γ, 5, "0") *
"_nanl_" * lpad(nanl, 5, "0") *
"_tanl_" * rpad(tanl, 4, "0") *
"_h_" * rpad(h, 4, "0") *
"_nens_" * lpad(N_ens, 3,"0") *
"_stateInfl_" * rpad(round(s_infl, digits=2), 4, "0") *
".jld2"
source