NEDAS.schemes.filter module

class NEDAS.schemes.filter.FilterAnalysisScheme(config: Config | None = None, config_file: str | None = None, parse_args: bool = False, **kwargs)[source]

Bases: Scheme

Scheme subclass for performing filter analysis.

This scheme runs the 4D analysis by cycling through time steps. Running the ensemble forecast first, pause the model at a certain time step (analysis cycle), then perform data assimilation at the analysis cycle with observations within a time window, finally using the updated model states (the posterior) as new initial conditions, the ensemble forecast is run again to reach the next analysis cycle, until the end of the period of interest. The length of forecasts between cycles is called the cycling period.

steps_need_mpi: dict[str, bool] = {'diagnose': True, 'ensemble_forecast': False, 'filter': True, 'perturb': True, 'postprocess': False, 'prepare_init_ensemble': False, 'prepare_truth': False, 'preprocess': False, 'run_all': True}
run_all() None[source]

A schemem must implement a run_all method to describe the workflow.

load_model_state(time: datetime)[source]
save_model_state(time: datetime)[source]
load_obs(time: datetime)[source]
save_obs(time: datetime)[source]
prepare_truth() None[source]

Generate the verifying truth

validate_truth_data(model_name: str) bool[source]
prepare_init_ensemble() None[source]

Generate initial ensemble.

validate_init_ensemble_data(model_name)[source]
check_cycle_complete() bool[source]

Method checks on a given cycle to see if it’s complete or not

preprocess() None[source]

Pre-processing step before the assimilation.

postprocess() None[source]

Post-processing step after the assimilation and before the next forecast.

ensemble_forecast() None[source]

Ensemble forecast step.

filter() None[source]

Main method for performing the analysis step

filter_iter() None[source]
perturb() None[source]

Perturbation step.

This step adds random perturbations to the model initial and/or boundary conditions, at the first or all the analysis cycles.

diagnose() None[source]

Diagnostics step.

This step runs diagnostics for the current analysis cycle.

The diag section in configuration file defines the methods and parameters of the diagnostics, corresponding to the diag.method module that implements the particular diagnostic method.

get_task_opts(step: str, model_name: str, **other_opts) dict[str, Any][source]

Get common kwargs from configuration and return as task options dict

get_restart_dir(model_name) str[source]
NEDAS.schemes.filter.main()[source]