NEDAS.assim_tools.assimilators
NEDAS.assim_tools.assimilators.base module
NEDAS.assim_tools.assimilators.batch module
- class NEDAS.assim_tools.assimilators.batch.BatchAssimilator(c: Context)[source]
Bases:
Assimilator- init_partitions(c: Context) list[source]
Generate spatial partitioning of the domain partitions: dict[par_id, tuple(istart, iend, di, jstart, jend, dj)] for each partition indexed by par_id, the tuple contains indices for slicing the domain Using regular slicing is more efficient than fancy indexing (used in irregular grid)
NEDAS.assim_tools.assimilators.ETKF module
NEDAS.assim_tools.assimilators.TopazDEnKF module
NEDAS.assim_tools.assimilators.serial module
- class NEDAS.assim_tools.assimilators.serial.SerialAssimilator(c: Context)[source]
Bases:
AssimilatorSubclass for serial assimilation algorithms
- assign_obs(c: Context)[source]
Assign the observation sequence to each partition par_id
- Parameters:
c (Context) – the runtime context object
- Returns:
Indices in the full obs_seq for the subset of obs that belongs to partition par_id
- Return type:
dict[ObsRecordID, dict[PartitionID, np.ndarray]]
- assimilation_algorithm(c: Context)[source]
Implementation of the serial assimilation algorithm.
Notes
serial assimilation goes through the list of observations one by one for each obs the near by state variables are updated one by one. so each update is a scalar problem, which is solved in 2 steps: obs_increment, update_ensemble
- abstractmethod obs_increment(obs_prior, obs, obs_err) ndarray[source]
Compute observation-space analysis increments.
- Parameters:
obs_prior (np.ndarray) – Observation priors, 1D array of type int size nens
obs (float) – The real observation value
obs_err (float) – Observation error std
- Returns:
observation-space analysis increments
- Return type:
ndarray
- abstractmethod update_local_state(state_prior, obs_prior, obs_incr, state_h_dist, state_v_dist, state_t_dist, hroi, vroi, troi, h_local_func, v_local_func, t_local_func) None[source]
Update the local state vector with the analysis increments.
- abstractmethod update_local_obs(obs_data_prior, obs_used, obs_prior, obs_incr, obs_h_dist, obs_v_dist, obs_t_dist, hroi, vroi, troi, h_local_func, v_local_func, t_local_func) None[source]
Update the local observations with analysis increments.
- Parameters:
obs_data_prior (np.ndarray)
(np.nd (obs_used)
NEDAS.assim_tools.assimilators.EAKF module
- class NEDAS.assim_tools.assimilators.EAKF.EAKFAssimilator(c: Context)[source]
Bases:
SerialAssimilator- obs_increment(obs_prior, obs, obs_err)[source]
Compute observation-space analysis increments.
- Parameters:
obs_prior (np.ndarray) – Observation priors, 1D array of type int size nens
obs (float) – The real observation value
obs_err (float) – Observation error std
- Returns:
observation-space analysis increments
- Return type:
ndarray