pyPDAF.PDAF.put_state_prepost¶
- pyPDAF.PDAF.put_state_prepost()¶
It is used to preprocess and postprocess of the ensemble.
No DA is performed in this function. Compared to
pyPDAF.PDAF.assimilate_prepost()
, this function does not set assimilation flag, and does not distribute the processed ensemble to the model field. This function also does not set the next assimilation step aspyPDAF.PDAF.assimilate_prepost()
because it does not callpyPDAF.PDAF.get_state()
.- User-supplied functions are executed in the following sequence:
py__collect_state_pdaf
py__prepoststep_state_pdaf (preprocess, step < 0)
- Parameters:
py__collect_state_pdaf (Callable[dim_p:int, state_p : ndarray[tuple[dim_p], np.float64]]) –
Collect state vector from model/any arrays to pdaf arrays
- Callback Parameters
- dim_pint
pe-local state dimension
- state_pndarray[tuple[dim_p], np.float64]
local state vector
- Callback Returns
- state_pndarray[tuple[dim_p], np.float64]
local state vector
py__prepoststep_pdaf (Callable[step:int, dim_p:int, dim_ens:int, dim_ens_l:int, dim_obs_p:int, state_p : ndarray[tuple[dim_p], np.float64], uinv : ndarray[tuple[dim_ens-1, dim_ens-1], np.float64], ens_p : ndarray[tuple[dim_p, dim_ens], np.float64], flag:int]) –
Preprocesse the ensemble before analysis and postprocess the ensemble before distributing to the model for next forecast
- Callback Parameters
- stepint
current time step (negative for call before analysis/preprocessing)
- dim_pint
PE-local state vector dimension
- dim_ensint
number of ensemble members
- dim_ens_lint
number of ensemble members run serially on each model task
- dim_obs_pint
PE-local dimension of observation vector
- state_pndarray[tuple[dim_p], np.float64]
pe-local forecast/analysis state (the array ‘state_p’ is generally not initialised in the case of ESTKF/ETKF/EnKF/SEIK, so it can be used freely here.)
- uinvndarray[tuple[dim_ens-1, dim_ens-1], np.float64]
Inverse of the transformation matrix in ETKF and ESKTF; inverse of matrix formed by right singular vectors of error covariance matrix of ensemble perturbations in SEIK/SEEK. not used in EnKF.
- ens_pndarray[tuple[dim_p, dim_ens], np.float64]
PE-local ensemble
- flagint
pdaf status flag
- Callback Returns
- state_pndarray[tuple[dim_p], np.float64]
pe-local forecast/analysis state (the array ‘state_p’ is generally not initialised in the case of ESTKF/ETKF/EnKF/SEIK, so it can be used freely here.)
- uinvndarray[tuple[dim_ens-1, dim_ens-1], np.float64]
Inverse of the transformation matrix in ETKF and ESKTF; inverse of matrix formed by right singular vectors of error covariance matrix of ensemble perturbations in SEIK/SEEK. not used in EnKF.
- ens_pndarray[tuple[dim_p, dim_ens], np.float64]
PE-local ensemble
- Returns:
flag – Status flag
- Return type:
int