= New Functionality of PDAF V3 = [[PageOutline(2-3,Contents of this page)]] PDAF V3.0 comes with several new features. Here we provide an overview of them and provide links to more detailed descriptions: === Incremental analysis updates (IAU) === Incremental analysis updating (IAU) is used to avoid shocks in the model states due to the changes of the model state by the assimilation. PDAF V3.0 contains new functionality to apply IAU. Further information: [wiki:IncrementalAnalysisUpdates Using IAU in PDAF]. === New filters ENSRF and EAKF === PDAF V3 includes the ensemble square root filter (ENSRF, Whitaker and Hamill, 2002) and the Ensemble Adjustment Filter (EAKF, Anderson, 2003). These filters use serial processing of single observations, which is computationally very efficient. The filters are implemented as different subtypes of what is called ENSRF in PDAF. Both filters can apply covariance localization. Further information: [wiki:ImplementAnalysisENSRF_EAKF Implementing the analysis step of the ENSRF & EAKF]. === Additional diagnostic routines === We added more diagnostics routines. The new routines provide functionality for: * Computing ensemble mean (PDAF_diag_ensmean) * Compute ensemble mean standard deviation (PDAF_diag_stddev) * Compute variance state vector (PDAF_diag_variance) * Compute root mean square difference between two vectors (PDAF_diag_rmsd) * Compute statistical moments (mean, variance, skewness, kurtosis) (PDAF_diag_compute_moments) * Ensemble reliability budget (PDAF_diag_reliability_budget) Further information on all diagnostic routines: [wiki:DataAssimilationDiagnostics Data Assimilation Diagnostics]. === PDAF-OMI observation diagnostics === We added a module for observation diagnostics in PDAF-OMI. With this, there are routines that provide the user-code - usually prepoststep - direct access to the observation information (observation vector, observed ensemble, observed ensemble mean, observation coordinates, observation error variances). There are also routines that compute statistics between the observation vector and the observed ensemble mean for example, for the root mean square difference, correlation, bias, and mean absolute error. The statistics can be used, e.g., to plot a Taylor diagram. Further information: [wiki:PDAFomi_observation_diagnostics PDAFomi observation diagnostics] === New routines to set parameters for PDAF === The routines `PDAF_set_iparam` and `PDAF_set_rparam` can be used to specify selected integer or real-valued parameters. They can be used in `init_pdaf` to set initial parameters as an alternative to specifying them in the call to `PDAF_init`. The routine can also be used during the assimilation process to modify parameters. Further information: The tutorial examples, e.g. `tutorial/offline_2D_serial/init_pdaf.F90` show the implementation. Documentation is provided at [wiki:PDAF_set_iparam] and [wiki:PDAF_set_rparam]. === New universal PDAF3 interface === In PDAF3 it is possible to call any of the different ensemble filter methods using the single routine `PDAF3_assimilate` for online coupled assimilation, or `PDAF3_assim_offline` for offline (file-based) coupled programs. Also all 3D-Var methods can be called by `PDAF3_assimilate_3dvar_all` or `PDAF3_assim_offline_3dvar_all`. Further information: [wiki:PDAF3_interface The PDAF3 interface]. === Using `PDAF3_assimilate` in flexible parallelization mode === In the flexible parallelization mode of previous PDAF versions, one had to use `PDAF_put_state` for the flexible parallelization mode. With PDAF V3 it is possible, and recommended, to use `PDAF3_assimilate` instead. This functionality is used in combination with calling the new routine `PDAF_get_fcst_info`. Further information: [wiki:ExternalModelLoop Modification of the model code for the 'flexible' ensemble integration]. === Mandatory module `PDAF` for all use-included routines === It is now required to include `USE PDAF` in the subroutines that call PDAF routines. The module `PDAF` is also recommend to be used to include routines from PDAFomi or PDAFlocal, e.g. in the observation modules and in `init_dim_l_pdaf`. One does no longer need to distingish the modules, but can use `PDAF` universally. Further information: [wiki:Module_PDAF Module PDAF] === Covariance localization with `PDAF_set_localize_covar` === In PDAF2 using PDAF-OMI, the localization in the LEnKF required an additional call-back routine `localize_covar_pdafomi` and a coresponding routine in each OMI observation module. With PDAF V3 it is recommended to use `PDAF_set_localize_covar` instead. This routine is called in the observation initialization routine `init_dim_obs_pdafomi` of each observation module. The routine is used for the LEnKF and also the ENSRF/EAKF methods. Using this routine also enables that the LEnKF can be called using the new universal PDAF3 interface. Further information: [wiki:PDAFomi_set_localize_covar]. === Initializing observations before `prepoststep_pdaf` === In PDAF V3, one can choose to initialize observations after an forecast phase before the routine prepoststep_pdaf is called. This is set using the integer parameter with index 9 (see [wiki:AvailableOptionsforInitPDAFinPDAF3 Options for PDAF_init]). This option allows the to assess observation information in `prepostep_pdaf` to compare the forecast ensemble with the observations that will be assimilated in the following analysis step, e.g. using the new PDAFomi observation diagnostics. Further information: [wiki:AvailableOptionsforInitPDAFinPDAF3 Options for PDAF_init] and [wiki:PDAFomi_observation_diagnostics PDAFomi observation diagnostics] === Calling the analysis step in offline coupling with `assim_offline` === For the offline coupled mode in PDAF2, one used `PDAF_put_state` routines in combination with `PDAF_set_offline_mode`, which switched off the ensemble integration functionlity (in older code version one used `subtype=5`). In PDAF3, there are now `PDAF_assim_offline` routines, e.g. `PDAF3_assim_offline`, which can be directly called after the PDAF initialization. This simplifies the code for the offline mode, since only a call to `PDAF_init` followed by `PDAF3_assim_offline` are required. Further information on the offline coupling: [wiki:OfflineImplementationGuide Implementation Guide for Offline Mode] === Setting random number seed in PDAF === The new routine `PDAF_set_seedset` provides the possibility to select a set of random number seeds out of 20 choices. This allows to perform, e.g., sensitivity tests by rerunning a data assimilation case with different random numbers. Further information: [wiki:PDAF_set_seedset] === Named variable for type of assimilation method === The module `PDAF` provides now a named variable for each type of assimilation method (variable 'filtertype' in tutorial and template codes). The names are of the structure `PDAF_DA_X`, where 'X' is the assimilation method. For example, one can specify the type of the DA method in the call to `PDAF_init` as `PDAF_DA_LESTKF` instead of the number 7. The named types of DA methods (`PDAF_DA_X`) can be listed by calling the routine `PDAF_print_DA_types`. Further information: [wiki:PDAF_print_DA_types]. === Checking for type of localization === Checking whether a filter uses localization can now be done using the Fortran function `PDAF_localfilter` (instead of the subroutine `PDAF_get_localfilter`). The return value will be =1 for domain localized filters (e.g. LESTKF, LETKF) and ENSRF/EAKF, and 0 otherwise. This function can be used to distinguish calls for `PDAF3_assimilate*` or `PDAF3_assim_offline*` The function `PDAF_get_local type` can be used to distinguish global filters, domain localization and covariance localization (e.g. LEnKF and ENSRF/EAKF). This function can be used to decide whether to call `PDAF_set_localize_covar`. Further information: [wiki:PDAF_localfilter] and [wiki:PDAF_get_local_type].