GenerateTimeSeries

GenerateTimeSeries is a sub-module used to generate a time series for a twin experiment based on tuneable model configuration parameters. Example syntax for the configuration of a time series is as follows, where arguments are defined in a NamedTuple to be passed to the specific experiment function:

    (seed::Int64, h::Float64, state_dim::Int64, tanl::Float64, nanl::Int64, spin::Int64,
     diffusion::Float64)::NamedTuple)

Conventions for these arguments are as follows:

  • seed - specifies initial condition for the pseudo-random number generator on which various simulation settings will depend and will be reproducible with the same seed value;
  • h - is the numerical integration step size, controlling the discretization error of the model evolution;
  • state_dim - controls the size of the Lorenz-96 model model though other models such as the IEEE39bus model are of pre-defined size;
  • tanl - (time-between-analysis) defines the length of continuous time units between sequential observations;
  • nanl - (number-of-analyses) defines the number of observations / analyses to be saved;
  • spin - discrete number of tanl intervals to spin-up for the integration of the dynamical system solution to guarantee a stationary observation generating process;
  • diffusion - determines intensity of the random perturbations in the integration scheme;

Results are saved in .jld2 format in the data directory to be called by filter / smoother experiments cycling over the pseudo-observations.

Time series experiments

DataAssimilationBenchmarks.GenerateTimeSeries.IEEE39bus_time_seriesMethod
IEEE39bus_time_series((seed::Int64, h:Float64, tanl::Float64, nanl::Int64, spin::Int64,
                       diffusion::Float64)::NamedTuple)

Simulate a "free run" time series of the IEEE39bus for generating an observation process and truth twin for data assimilation twin experiments. Output from the experiment is saved in a dictionary of the form,

Dict{String, Any}(
                  "seed" => seed,
                  "h" => h,
                  "diffusion" => diffusion,
                  "diff_mat" => diff_mat,
                  "dx_params" => dx_params,
                  "tanl" => tanl,
                  "nanl" => nanl,
                  "spin" => spin,
                  "obs" => obs,
                  "model" => "IEEE39bus"
                 )

Experiment output is written to a directory defined by

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

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

"IEEE39bus_time_series_seed_" * lpad(seed, 4, "0") *
"_diff_" * rpad(diffusion, 5, "0") *
"_tanl_" * rpad(tanl, 4, "0") *
"_nanl_" * lpad(nanl, 5, "0") *
"_spin_" * lpad(spin, 4, "0") *
"_h_" * rpad(h, 5, "0") *
".jld2"
source
DataAssimilationBenchmarks.GenerateTimeSeries.L96_time_seriesMethod
L96_time_series((seed::Int64, h::Float64, state_dim::Int64, tanl::Float64, nanl::Int64,
                 spin::Int64, diffusion::Float64, F::Float64)::NamedTuple)

Simulate a "free run" time series of the Lorenz-96 model model for generating an observation process and truth twin for data assimilation twin experiments. Output from the experiment is saved in a dictionary of the form,

Dict{String, Any}(
                  "seed" => seed,
                  "h" => h,
                  "diffusion" => diffusion,
                  "dx_params" => dx_params,
                  "tanl" => tanl,
                  "nanl" => nanl,
                  "spin" => spin,
                  "state_dim" => state_dim,
                  "obs" => obs,
                  "model" => "L96"
                 )

Experiment output is written to a directory defined by

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

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

"L96_time_series_seed_" * lpad(seed, 4, "0") *
"_dim_" * lpad(state_dim, 2, "0") *
"_diff_" * rpad(diffusion, 5, "0") *
"_F_" * lpad(F, 4, "0") *
"_tanl_" * rpad(tanl, 4, "0") *
"_nanl_" * lpad(nanl, 5, "0") *
"_spin_" * lpad(spin, 4, "0") *
"_h_" * rpad(h, 5, "0") *
".jld2"
source