NEDAS.assim_tools.assimilators.serial module
- class NEDAS.assim_tools.assimilators.serial.SerialAssimilator(c: Context)[source]
Bases:
AssimilatorSubclass for serial assimilation algorithms
- assim_mode: str = 'serial'
- 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, 1-D float array of length 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.
- Parameters:
state_data (np.ndarray) – Local state vector, shape (nens, nfld, nloc)
obs_prior (np.ndarray) – Observation priors, shape (nens,)
obs_incr (np.ndarray) – Analysis increments, shape (nens,)
- abstractmethod update_local_obs(obs_data, used, obs_prior, obs_incr, h_dist, v_dist, 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 (np.ndarray) – obs prior ensemble, shape (nens, nlobs)
used (np.ndarray) – boolean mask of already-assimilated obs