API¶
Initialisation and finalisation¶
This function initialises the PDAF system. |
|
Allocating an array of obs_f derived types instances. |
|
Finalise the PDAF systems including freeing some of the memory used by PDAF. |
|
Printing the wallclock time and memory measured by PDAF. |
Fully parallel DA algorithms¶
Sequential DA¶
diagnoal observation matrix¶
Global filters except for 3DVar for a single DA step using diagnoal observation error covariance matrix. |
|
Covariance localised stochastic EnKF for a single DA step using diagnoal observation error covariance matrix. |
|
Domain local filters for a single DA step using diagnoal observation error covariance matrix. |
non-diagnoal observation matrix¶
Global filters except for 3DVar and stochastic EnKF for a single DA step using non-diagnoal observation error covariance matrix. |
|
Stochastic EnKF for a single DA step using non-diagnoal observation error covariance matrix. |
|
Covariance localised stochastic EnKF for a single DA step using non-diagnoal observation error covariance matrix. |
|
Domain local filters for a single DA step using non-diagnoal observation error covariance matrix. |
|
Global nonlinear filters for a single DA step using non-diagnoal observation error covariance matrix. |
|
LNETF for a single DA step using non-diagnoal observation error covariance matrix. |
|
LKNETF for a single DA step using non-diagnoal observation error covariance matrix. |
Variational DA¶
diagnoal observation matrix¶
3DVar DA for a single DA step using diagnoal observation error covariance matrix. |
|
3DEnVar for a single DA step using diagnoal observation error covariance matrix. |
|
Hybrid 3DEnVar for a single DA step using diagnoal observation error covariance matrix. |
|
3DEnVar for a single DA step where the ensemble anomaly is generated by LESTKF using diagnoal observation error covariance matrix. |
|
Hybrid 3DEnVar for a single DA step using diagnoal observation error covariance matrix. |
non-diagnoal observation matrix¶
3DVar DA for a single DA step using non-diagnoal observation error covariance matrix. |
|
3DEnVar for a single DA step using non-diagnoal observation error covariance matrix. |
|
Hybrid 3DEnVar for a single DA step using non-diagnoal observation error covariance matrix. |
|
3DEnVar for a single DA step where the ensemble anomaly is generated by LESTKF using non-diagnoal observation error covariance matrix. |
|
Hybrid 3DEnVar for a single DA step using diagnoal observation error covariance matrix. |
Flexible DA algorithms¶
Sequential DA¶
diagnoal observation matrix¶
Global filters except for 3DVar for a single DA step using diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
|
Stochastic EnKF (ensemble Kalman filter) with covariance localisation using diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
|
Domain local filters for a single DA step using diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
diagnoal observation matrix¶
Global filters except for 3DVar and stochastic EnKF for a single DA step using non-diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
|
Stochastic EnKF for a single DA step using non-diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
|
Covariance localised stochastic EnKF for a single DA step using non-diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
|
Domain local filters for a single DA step using non-diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
|
Global nonlinear filters for a single DA step using non-diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
|
LNETF for a single DA step using non-diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
|
LKNETF for a single DA step using non-diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
Variational DA¶
diagnoal observation matrix¶
3DVar DA for a single DA step using diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
|
3DEnVar for a single DA step using diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
|
Hybrid 3DEnVar for a single DA step using diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
|
3DEnVar for a single DA step where the ensemble anomaly is generated by LESTKF using diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
|
Hybrid 3DEnVar for a single DA step using diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
non-diagnoal observation matrix¶
3DVar DA for a single DA step using non-diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
|
3DEnVar for a single DA step using non-diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
|
Hybrid 3DEnVar for a single DA step using non-diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
|
3DEnVar for a single DA step without post-processing, distributing analysis, and setting next observation step. |
|
Hybrid 3DEnVar for a single DA step using non-diagnoal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
OMI functions¶
obs_f setter functions¶
Setting the doassim attribute of obs_f. |
|
Setting the disttype attribute of obs_f. |
|
Setting the ncoord attribute of obs_f. |
|
Setting the id_obs_p attribute of obs_f. |
|
This function sets the icoeff_p attribute of obs_f typically used in user-supplied function py__init_dim_obs_pdaf. |
|
This function sets the domainsize attribute of obs_f typically used in user-supplied function py__init_dim_obs_pdaf. |
|
This function sets the obs_err_type attribute of obs_f typically used in user-supplied function py__init_dim_obs_pdaf. |
|
This function sets the use_global_obs attribute of obs_f typically used in user-supplied function py__init_dim_obs_pdaf. |
|
This function sets the inno_omit attribute of obs_f typically used in user-supplied function py__init_dim_obs_pdaf. |
|
This function sets the inno_omit_ivar attribute of obs_f typically used in user-supplied function py__init_dim_obs_pdaf. |
Observation operators¶
A (partial) identity observation operator |
|
Observation operator that average values on given model grid points. |
|
Observation operator that linearly interpolates model grid values to observation location. |
|
The adjoint observation operator of |
|
The adjoint observation operator of |
|
The adjoint observation operator of |
Interpolations¶
The coefficient for linear interpolation in 2D on unstructure triangular grid. |
|
The coefficient for linear interpolation in 1D. |
|
The coefficient for linear interpolation up to 3D. |
Localisation¶
This function is called in the update routine of local filters and write statistics on locally used and excluded observations. |
|
This function computes a weight vector according to the distances of observations from the local analysis domain with a vector of localisation radius. |
|
This function computes a weight vector according to the distances of observations from the local analysis domain with given localisation radius. |
|
The function has to be called in init_dim_obs_l_OBTYPE in each observation module if a domain-localized filter (LESTKF/LETKF/LNETF/LSEIK)is used. |
|
The function has to be called in init_dim_obs_l_OBTYPE in each observation module if a domain-localized filter (LESTKF/LETKF/LNETF/LSEIK)is used. |
|
The function has to be called in init_dim_obs_l_OBTYPE in each observation module if a domain-localized filter (LESTKF/LETKF/LNETF/LSEIK)is used. |
|
The function has to be called in localize_covar_OBTYPE in each observation module. |
|
The function has to be called in localize_covar_OBTYPE in each observation module. |
|
The function has to be called in localize_covar_OBTYPE in each observation module. |
Others¶
This is used to set the domain limits for the use of pyPDAF.PDAF.omi_set_use_global_obs.Currently, it only supports 2D limitations. |
|
This sets the debug flag for OMI. |
|
Gather the dimension of a given type of observation across multiple local domains/filter processors. |
|
This function is used to implement custom observation operators. |
|
This function gathers the information about the full dimension of each observation type in each process-local subdomain. |
|
The function is called in the update routine of global filters and writes statistics on used and excluded observations. |
|
This function computes innovation and omit corresponding observations in assimilation if the innovation is too large. |
|
Deallocate OMI-internal obsrevation arrays |
|
This function returns the value of the PDAF-OMI internal error flag. |
Local module functions¶
Set index vector to map local state vector to global state vectors. |
|
This function initialises a PDAF_internal local array of increment weights. |
|
This function deallocates the local increment weight vector in pyPDAF.PDAF.local_set_increment_weights if it is allocated |
Utilities¶
Synthetic experiments¶
Generation of synthetic observations based on given error statistics and observation operator for diagonal observation error covariance matrix. |
|
Generation of synthetic observations based on given error statistics and observation operator. |
|
Generation of synthetic observations based on given error statistics and observation operator for diagonal observation error covariance matrix without post-processing, distributing analysis, and setting next observation step. |
|
Generation of synthetic observations based on given error statistics and observation operator without post-processing, distributing analysis, and setting next observation step. |
Statistical diagnostics¶
Calculating the effective sample size of a particle filter. |
|
Computing the skewness and kurtosis of the ensemble of a given element of the state vector. |
|
Computing the rank histogram of an ensemble. |
|
Obtain a continuous rank probability score for an ensemble. |
|
A continuous rank probability score for an ensemble without using MPI parallelisation. |
Ensemble generation¶
EOF analysis of an ensemble of state vectors by singular value decomposition. |
|
This function generates an ensemble from singular values and their vectors (EOF modes) centred on given mean state. |
Diagnostics¶
This function returns the flag that indicates if the DA is performed in the last time step. |
|
This is a diagnotics function for LKNETF which returns the skewness and kutosis used there. |
|
This function returns whether a local filter is used. |
|
This function returns the ensemble member id on the current process. |
|
This function returns the ensemble member id when observation operator is being applied. |
|
This function returns the smoothed ensemble in earlier time steps. |
|
This function activates the debug output of the PDAF. |
|
This function print the observation statistics of local domain on screen. |
|
This function make screen output of statistics of the local domains on current process. |
Advanced manipulation¶
This function returns the ensemble array in a numpy array where the internal array data has the same memoery address as PDAF ensemble array. |
|
This function can be used in the offline implementation when a smoother is used. |
|
This function sets the ensemble member index to given value. |
|
Setting the MPI communicator used by PDAF. |
|
This function activates offline mode. |
|
This function allows a user to reset the forgetting factor manually during the assimilation process. |
|
This function initialise the observation statistics of local domain. |
|
This function update the observation statistics of local domain. |
|
This function overwrite member index of the ensemble state by local_dim_ens (number of ensembles for current process, in full parallel setup, this is 1.) and the counter cnt_steps by nsteps-1. |
Others¶
Distributing analysis state vector to an array. |
|
It is used to preprocess and postprocess of the ensemble. |
|
This function does not perform any DA. |
|
It is used to preprocess and postprocess of the ensemble. |
|
Gathers the dimension of observation vector across multiple local domains/filter processors. |
|
In the local filters (LESKTF, LETKF, LSEIK, LNETF) this function returns the total observation vector from process-local observations. |
|
In the local filters (LESKTF, LETKF, LSEIK, LNETF) this function returns the full observation coordinates from process-local observation coordinates. |
|
This is a helper function to apply analysis increment to model state in model forecast phase. |
|
This function directly adds analysis increment to given state vector without the need for user-supplied functions. |
|
The function is used for localisation in the analysis step of a filter and computes a weight according to the specified distance and the settings for the localising function. |
|
This function returns a vector of the localisation weights based on distance and localisation functions and radii. |
|
In the local filters (LESKTF, LETKF, LSEIK, LNETF) this function returns the full observation coordinates from process-local observation coordinates. |
|
In the local filters (LESKTF, LETKF, LSEIK, LNETF) this function returns the total observation vector from process-local observations. |
Internal matrix operations¶
This is an internal function in PDAF where it perform matrix calculation of B = TA. |
|
This is an internal function in PDAF where it perform matrix calculation of B = TA. |
|
This function is an internal function in PDAF. |
|
Generation of a random matrix with orthogonal basis following SEEK approach for EnKF with given properties. |
|
Generation of a random matrix with orthogonal basis following SEIK approach. |
Internal callback functions¶
This function is an internal PDAF-OMI function that is used as a call-back function to initialise the observation vector. |
|
This function is an internal PDAF function that is used as a call-back function to initialise the observation error variance. |
|
This function is an internal PDAF-OMI function that is used as a call-back function to convert between global and local observation vectors in domain localisation. |
|
This function is an internal PDAF-OMI function that is used as a call-back function to initialise local observation vector in domain localisation. |
|
This function is an internal PDAF-OMI function that is used as a call-back function to initialise local observation vector in domain localisation. |
|
This function is an internal PDAF-OMI function that is used as a call-back function to perform the matrix multiplication inverse of local observation error covariance and a matrix A in domain localisation. |
|
This is an internal PDAF-OMI function that is used as a call-back function to compute the likelihood of the observation for a given ensemble member according to the observations used for the local analysis in the localized LNETF. |
|
This function is an internal PDAF-OMI function that is used as a call-back function to perform the matrix multiplication inverse of observation errro covariance and a matrix A. |
|
This is an internal PDAF-OMI function that is used as a call-back function to compute the likelihood of the observation for a given ensemble member according to the observations used for the local analysis for NETF or particle filter. |
|
This is an internal PDAF-OMI function that is used as a call-back function to add random observation error to stochastic EnKF. |
|
This is an internal PDAF-OMI function that is used as a call-back function to construct a full observation error covariance matrix used only in stochastic EnKF. |
|
This is an internal PDAF-OMI function that is used as a call-back function to construct a full observation error covariance matrix used only in stochastic EnKF. |
|
This function is an internal PDAF-OMI function that is used as a call-back function to perform the matrix multiplication inverse of local observation error covariance and a matrix A in LKNETF. |
|
This is an internal PDAF-OMI function that is used as a call-back function to compute the likelihood of the observation for a given ensemble member according to the observations used for the local analysis in LKNETF. |
|
The function is called during the analysis step on each local analysis domain. |
|
The function is called during the analysis step of a global filter. |
|
Project a global to a local state vector for the localized filters. |
|
Initialise elements of a global state vector from a local state vector. |