wiki:LnDevel

Version 315 (modified by lnerger, 10 days ago) ( diff )

--

Development page

Please only use the pages that are directly linked from the start page and within the Implementation Guide

Pages linked here are under development

New for PDAF V3.0 final

PDAFomi_obs_op_extern

PDAFomi_set_name

PDAF3_set_parallel

PDAF3_init

PDAF_iau_set_state_pointer

PDAF_iau_set_ens_pointer

OnlineImplementationGuide_PDAF3 - update figure

OfflineImplementationGuide_PDAF3 - update figure

PDAF3_new_functionality - update new added features in V3.0final

PDAF3_interface - add PDAF3_set_parallel and PDAF3_init

OMI_observation_operators_PDAF3 - add PDADFomi_obs_op_extern (no lin and adj)

ImplementationConceptOnline - add note on PDAF3_set_parallel

ImplementationConceptOffline - add note on PDAF3_set_parallel

Version 3.0 - August XX, 2025

This major release and finalizes Version 3.0 based on the pre-release 3.0beta. As this includes the changes of V3.0beta, we repeat here, the full changes after pointing to the changes added in the final release of V3.0.

The final release of PDAF V3.0 contains bug-fixes and also some additional features

Major additions

  • Separating the initialization of parallelization variables from PDAF variable initialization. This allows to simplify the code structure and keep the parallelization variables inside init_parallel_pdaf. There are new routines 'PDAF3_init' and 'PDAF3_set_parallel'. Their use is optional:
    • 'PDAF3_set_parallel' is called in init_parallel_pdaf to provide the parallelization variables to PDAF.
    • 'PDAF3_init' has a shortened interface compared to 'PDAF_init' as it does not include the variables concerning parallelization.
  • When using exclusively a single MPI-process with the offline mode, it is now possible to use PDAF without calling 'init_parallel_pdaf' or 'PDAF3_set_parallel'. For localized filters one can use the OpenMP parallelization, while the user code does not need any operations of MPI.
  • Add EnOI-mode, in which only the state estimate is integrated, but the ensemble perturbations are fixed, to EnSRF and EAKF (filtertype=13 with subtype=10 for EnSRF; subtype=11 for EAKF)
  • Add support for IAU with the EnOI modes (ensemble optimal interpolation in which only the state estimate, but not the ensemble state are integrated; subtypes 10 and 11 available for some filters).
  • Linked to the above there are the new routines 'PDAF_iau_set_state_pointer' for use in EnOI mode and 'PDAF_iau_set_ens_pointer' (alias for 'PDAF_iau_set_pointer) for use in the regular mode integrating the ensemble.
  • Add external observation operator routine 'PDAFomi_obs_op_extern'. This observation operator allows to directly provide an observed model state from the ensemble. It can be used, e.g. if the model itself performs the proejection of the observation operator.

Corrections

  • Revised the setting of 'dim_lag': In V3.0beta 'dim_lag' had to be set in the call to PDAF_init. Now using PDAF_set_iparam works correctly.
  • Corrected PDAF_diag_reliability_budget
  • Correction of template code for the analysis step to use subtype 10 and 11 for the EnOI mode
  • Corrected SEIK subtype=11 (fixed covariance matrix). It performed identical to subtype=10 (non-dynamic ensemble updated at analysis step).
  • Corrected subtype=11 of ESTKF/LESTKF/ETKF/LESTKF, which procuded an incorrect analysis ensemble in V3.0beta due to the revision for IAU

PDAF V3.0 includes the large changes from the pre-release PDAF V3.0beta:

The whole PDAF code was revised and modernized. Further, a new universal calling interface for the analysis step and other new functionality was added.

Important:

  1. We have marked this release as a beta-release mainly because of the large changes in the code. While we have tested this release carefully with different applications, we cannot exclude that there are issues that we didn't find. We like to motivate all users to test PDAF V3.0 and to let us know possible issues (using the Issues-function in Github or by email to pdaf\@awi.de). This will help us to fix such issues so that the final release for PDAF V3.0 can be done in 2-3 months. During this time, we will also finalize the documentation to reflect all changes.
  1. PDAF V3.0 is not fully backward compatible, due to the modernization of the code. Thus, with this release, it is not possible to just compile and link with existing implementations like in previous releases. The required adaptions are, however, small. Below the code changes affecting backward-compatibility are also described.
  1. Information for using PDAF3 and about new features can be found at:

Major changes with effect on backward-compatibility

  • New general module 'PDAF' replacing the optional module 'PDAF_interfaces_module'. In Fortran code, it is now required to include this module with 'USE PDAF'.
  • Change for offline mode: It is no longer possible to specify the offline mode as 'subtype=5'. We have introduced a new interface 'PDAF_assim_offline' for the offline mode, which simplified the implementation.
  • Renumbered subtypes: subtypes 0 and 1 are unchanged, the other dynamic subtypes are changed as 4=>2, 6=>3, 7=>4; the variant with fixed ensemble are changed as 2=>10, 3=>11.
  • Changes in the index value of some parameters: The index of some of the parameters set in PDAF_init has been changed for better overall consistency. (See https://pdaf.awi.de/trac/wiki/AvailableOptionsforInitPDAFinPDAF3 for an overview of the parameters)
  • The SEEK filter (filtertype=0) was finally removed after it was marked deprecated for a longer period.
  • Removed 'src/Makefile'. Now, only the new Makefile in the main directory exists. However, if one has a workflow based on src/Makefile one can copy the Makefile and adapt it according to the description within the file.
  • The 'simplified interface' (routine names ending with _si) has been removed.
  • For information on how to adapt a program for PDAF V3.0, see https://pdaf.awi.de/trac/wiki/PortingToPDAF3

Major changes and additions (see also https://pdaf.awi.de/trac/wiki/PDAF3_new_functionality):

  • Incremental Analysis Updates (IAU): The previous IAU of PDAF was recoded. Now there is a fully featured IAU implementation.
  • Added ENSRF/EAKF: The ensemble square-root filter (ENSRF, Whitaker & Hamill, 2002) and ensemble adjustment filter with local linear regression (EAKF, Anderson, 2003) were added. These filters perform the analysis step through serial processing of individual observations.
  • Added more diagnostic routines, e.g., for computing ensemble mean (PDAF_diag_ensmean), ensemble mean standard deviation (PDAF_diag_stddev), variance state vector (PDAF_diag_variance), RMS difference between two vectors (PDAF_diag_rmsd), higher order moments (PDAF_diag_compute_moments), and reliability budget (PDAF_diag_reliability_budget).
  • Added observation diagnostics module for OMI: This is a set of routines that give the user access to the observation information, including the observed ensemble and the observed ensemble mean. In addition, there are routines computing statistics for the difference between the observations and the observed ensemble mean.
  • New routines to set parameters for PDAF: Before, the parameters were all set in the call to PDAF_init. Now, there are the new routines PDAF_set_iparam and PDAF_set_rparam to set selected parameters, without the need to specify all parameters. These routines make the specification of parameters for PDAF more flexible and can also be used during a run to change parameter values.
  • New interface for offline coupled assimilation: With the new routines PDAF_assim_offline_X the offline mode is now clearly separated from the online coupling. (see tutorial or implementation guide)
  • Simplification for initializing the ensemble forecasting using the new routine PDAF_init_forecast as simpler alternative to PDAF_get_state.
  • Revision for initializing of observations inside PDAF: Observations are now initialized before the actual analysis step is computed. Also, the observation operator is called before the actual analysis step. This change allows for the option to initialize observations before prepoststep_pdaf is called for the forecast ensemble. Related to this, the screen output for the observations was revised and is now displayed in a different location.
  • New PDAF3 interface: The selection of possible calls to PDAF*_put_state and PDAF*_assimilate has grown over the years because new functionality, particularly PDAF-OMI and PDAFlocal, has required a new interfaces. We defined a new standard interface in which a single routine (PDAF3_assimilate) can execute all available ensemble filter methods for the case of a diagonal observation error covariance matrix. The routine leverages the latest features that were introduced in previous PDAF releases to allow for a minimum number of arguments. There is also the routine PDAF3_assim_offline for the offline mode.
  • Change for flexible parallelization variant: It is now possible to use PDAF3_assimilate (or any other 'assimilate' routine) for the flexible parallelization, while PDAF_put_state routines had to be called before. Since PDAF_assimilate is called at each time step during the forecast phase this allows easy use of the IAU functionality. This change also reduces teh required code changes for the flexible parallelization variant.
  • New routine PDAF_get_fcst_info: This routine allows to retrieve the return values of PDAF_get_state (nsteps, time, doexit) for the case that PDAF_assimilate routines, which do not return these values, are used. This is used in the revised flexible parallelization variant.
  • New routine PDAFomi_set_localize_covar: This routine can be called in the OMI observation modules in init_dim_obs_OBSTYPE. It sets the information for localization in the LEnKF and ENSRF/EAKF methods and simplifies the code compared to using localize_covar_pdafomi in PDAF2. (Using localize_covar_pdafomi is still possible)
  • Calling LEnKF with the universal routine PDAF3_assimilate: In PDAF 2.3.1 and before, the LEnKF had its own interface due to the additional call-back routine localize_covar_pdafomi required by this filter. With the new routine PDAFomi_set_localize_covar, the additional routine is no longer required and the LEnKF can be used with the unversal interface routine.
  • New routine PDAF_set_seedset: This routine can be used to seed the random number seed for PDAF's random number generating routine.
  • Introduced named variables for choosing the filter type: The filter type can now also be specified by a named parameter of the form PDAF_DA_X, where 'X' is the DA method, thus, e.g., 'PDAF_DA_ESTKF'. With this, one does not need to look up the number of the filter type.
  • Added routine PDAF_print_DA_types: This routine writes a list of the available types of DA methods and named parameters PDAF_DA_X.
  • Added Fortran function PDAF_localfilter as an alternative to subroutine PDAF_get_localfilter to make the code more compact
  • Added Fortran function PDAF_local_type and subroutine PDAF_get_local_type. These return information which of the different localization variants is used by a DA method (no localization, local analysis, covariance localization, covariance localization with serial observation processing)
  • The screen output for the configuration overview of the DA method was revised and provides now a complete overview
  • The new module PDAF now also includes the routines from 'PDAFomi' and 'PDAFlocal'. Thus, one only needs to use-include 'PDAF' and no longer needs to distinguish the modules.

Other changes:

  • The tutorial input files have been regenerated using Python scripts instead of the previous Matlab scripts. This changed their values.
  • Changed statistics for locally omitted observations: Now, these are only counted for analysis domains with observations.
  • Added information output on allocated memory in PDAF-OMI
  • Revised timers inside the DA methods to account for the changed placement of observation-related routines.
  • The internal code structure of assimilation algorithms was revised and modularized. This yields a better approach to add further assimilation methods. We also added templates for implementing global or local ensemble filters in templates/analysis/. Information on how to add an assimilation algorithm to PDAF can be found at https://pdaf.awi.de/trac/wiki/AddFilterAlgorithm
  • Revision of PDAF file headers: It is now possible to use 'Doxygen' to generate a documentation and structure overview of PDAF.

Bug corrections:

  • Corrected a parallel race condition in the LKNETF NHK variant (subtype=0) in case of OpenMP parallelization
  • Corrected convergence check for the CG+ solver in the 3D-Var methods in case of parallelized control vector.
  • Corrected computation of likelihood for the case that dim_obs_l=0 for some observation type, but overall dim_obs_l>0. This could lead to a segmentation fault in the LKNETF.
  • Correction of type_forget=2: For the case that the adaptive forgetting factor would compute a negative value, the forgetting factor of the previous domain was used. Now, the prescribed default value is used. Here, a possible race condition when using OpenMP was also fixed.
  • Corrected call to U_obs_op_adj. Inside PDAF, a rank-1 array was provided as argument, while it needed to be a rank-2 array with only one column.

New for PDAF V3.0 beta

Module_PDAF

PDAF_print_DA_types !

PDAF_set_iparam !

PDAF_set_rparam !

PDAF_set_seedset

PDAF_localfilter !

PDAF_local_type !

PDAF_get_local_type !

PDAF_init_forecast !

PDAF_get_fcst_info

Using Incremental Analysis Updates !

PDAF_iau_init !

PDAF_iau_init_inc !

PDAF_iau_reset !

PDAF_iau_set_weights !

PDAF_iau_set_pointer !

PDAF_iau_add_inc !

Implementation of the Analysis step for the ENSRF/EAKF !

PDAF_put_state_ensrf !

PDAF_assimilate_ensrf !

PDAFomi_set_localize_covar ! (recommended alternative to using localize_covar_pdafomi)

U_init_obsvars !

init_obsvars_pdaf !

U_localize_covar_serial !

localize_covar_serial_pdaf !

New diagnostics routines

PDAF_diag_ensmean !

PDAF_diag_stddev_nompi !

PDAF_diag_stddev !

PDAF_diag_variance_nompi !

PDAF_diag_variance !

PDAF_diag_compute_moments !

PDAF_diag_rmsd_nompi !

PDAF_diag_rmsd !

PDAF_diag_reliability_budget

PDAF-OMI Observation diagnostics !

PDAFomi_set_obs_diag !

PDAFomi_diag_nobs !

PDAFomi_diag_dimobs !

PDAFomi_diag_get_obs !

PDAFomi_diag_get_HXmean !

PDAFomi_diag_get_HX !

PDAFomi_diag_get_ivar !

PDAFomi_diag_obs_rmsd !

PDAFomi_diag_stats !

PDAF3_interface !

PDAF3_assimilate ! PDAF3_assimilate_global ! PDAF3_assimilate_local !
PDAF3_put_state ! PDAF3_put_state_global ! PDAF3_put_state_local !
PDAF3_assim_offline ! PDAF3_assim_offline_global ! PDAF3_assim_offline_local !
only for backward compatibility: PDAF3_assimilate_lenkf ! PDAF3_put_state_lenkf ! PDAF3_assim_offline_lenkf !
Method online coupled offline coupled
(backward-compatibility)
offline coupled
LESTKF
LETKF
LSEIK
PDAF3_assimilate_local_nondiagR ! PDAF3_put_state_local_nondiagR ! PDAF3_assim_offline_local_nondiagR !
LNETF PDAF3_assimilate_lnetf_nondiagR ! PDAF3_put_state_lnetf_nondiagR ! PDAF3_assim_offline_lnetf_nondiagR !
LKNETF PDAF3_assimilate_lknetf_nondiagR ! PDAF3_put_state_lknetf_nondiagR ! PDAF3_assim_offline_lknetf_nondiagR !
ESTKF
ETKF
SEIK
PDAF3_assimilate_global_nondiagR ! PDAF3_put_state_global_nondiagR ! PDAF3_assim_offline_global_nondiagR !
NETF
PF
PDAF3_assimilate_nonlin_nondiagR ! PDAF3_put_state_nonlin_nondiagR ! PDAF3_assim_offline_nonlin_nondiagR !
EnKF
LEnKF
PDAF3_assimilate_enkf_nondiagR ! PDAF3_put_state_enkf_nondiagR ! PDAF3_assim_offline_enkf_nondiagR !
Method online coupled offline coupled
(backward-compatibility
offline coupled
3D-Var (parameterized) PDAF3_assimilate_3dvar ! PDAF3_put_state_3dvar ! PDAF3_assim_offline_3dvar !
Universal Routine
(all 3D-Var methods)
PDAF3_assimilate_3dvar_all ! PDAF3_put_state_3dvar_all ! PDAF3_assim_offline_3dvar_all !
En3DVar with ESTKF or LESTKF PDAF3_assimilate_en3dvar ! PDAF3_put_state_en3dvar ! PDAF3_assim_offline_en3dvar !
single routines
En3DVar with ESTKF PDAF3_assimilate_en3dvar_estkf ! PDAF3_put_state_en3dvar_estkf ! PDAF3_assim_offline_en3dvar_estkf !
Hyb3DVar with ESTKF PDAF3_assimilate_hyb3dvar_estkf ! PDAF3_put_state_hyb3dvar_estkf ! PDAF3_assim_offline_hyb3dvar_estkf !
En3DVar with LESTKF PDAF3_assimilate_en3dvar_lestkf ! PDAF3_put_state_en3dvar_lestkf ! PDAF3_assim_offline_en3dvar_lestkf !
Hyb3DVar with ESTKF PDAF3_assimilate_hyb3dvar_lestkf ! PDAF3_put_state_hyb3dvar_lestkf ! PDAF3_assim_offline_hyb3dvar_lestkf !
Method fully parallel &
flexible parallel
flexible parallel
(backward-compatibility)
offline coupled
3DVar PDAF3_assimilate_3dvar_nondiagR ! PDAF3_put_state_3dvar_nondiagR ! PDAF3_assim_offline_3dvar_nondiagR !
En3DVar with LESKTF PDAF3_assimilate_en3dvar_lestkf_nondiagR ! PDAF3_put_state_en3dvar_lestkf_nondiagR ! PDAF3_assim_offline_en3dvar_lestkf_nondiagR !
En3DVar with ESTKF PDAF3_assimilate_en3dvar_estkf_nondiagR ! PDAF3_put_state_en3dvar_estkf_nondiagR ! PDAF3_assim_offline_en3dvar_estkf_nondiagR !
Hyb3DVar with LESTKF PDAF3_assimilate_hyb3dvar_lestkf_nondiagR ! PDAF3_put_state_hyb3dvar_lestkf_nondiagR ! PDAF3_assim_offline_hyb3dvar_lestkf_nondiagR !
Hyb3DVar with ESTKF PDAF3_assimilate_hyb3dvar_estkf_nondiagR ! PDAF3_put_state_hyb3dvar_estkf_nondiagR ! PDAF3_assim_offline_hyb3dvar_estkf_nondiagR !
Note: See TracWiki for help on using the wiki.