Simulating observations#
Once a scenario has been defined, we can simulate observations from each observation model with pypfilt.simulate_from_model()
:
def simulate_lorenz63_observations():
scenario_file = 'lorenz63_simulate.toml'
instances = list(pypfilt.load_instances(scenario_file))
instance = instances[0]
# Simulate observations for x(t), y(t), and z(t).
obs_tables = pypfilt.simulate_from_model(instance)
# Save the observations to plain-text files.
for obs_unit, obs_table in obs_tables.items():
out_file = f'lorenz63-{obs_unit}.ssv'
pypfilt.io.write_table(out_file, obs_table)
return obs_tables
Note
Recall that for this scenario we specified fixed values for each parameter and state variable, so that we can simulate observations from a known ground truth.
|
|
We can now use these simulated observations to fit the simulation model and generate forecasts for the future observations.