Changes between Version 6 and Version 7 of ImplementAnalysisENSRF_EAKF


Ignore:
Timestamp:
May 16, 2025, 5:51:11 PM (42 hours ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ImplementAnalysisENSRF_EAKF

    v6 v7  
    3737[[PageOutline(2-3,Contents of this page)]]
    3838
    39 || This page describes the implementation of the analysis step without using PDAF-OMI. Please see the [wiki:ImplementationofAnalysisStep page on the analysis with OMI] for the more modern and efficient implementation variant using PDAF-OMI. ||
     39|| This page describes the implementation of the analysis step without using PDAF-OMI. This approach is used in older implementations of PDAF nad can be seen as a export-mode. Please see the [wiki:ImplementationofAnalysisStep page on the analysis with OMI] for the more modern and efficient implementation variant using PDAF-OMI. ||
    4040
    4141The ENSRF/EAKF filters were added with verson 3.0 of PDAF.
     
    5151||= 1 =|| EAKF linear regression (Anderson, 2003) ||
    5252
    53 For the analysis step of the ENSRF and EAKF, different operations related to the observations are needed. These operations are requested by PDAF by calling user-supplied routines. Intentionally, the operations are split into separate routines in order to keep the operations rather elementary. This procedure should simplify the implementation. The names of the required routines are specified in the call to the routine `PDAF_assimilate_ensrf` for the fully-parallel and flexible parallelization implementations (alternatively `PDAF_put_state_lenkf` for the 'flexible' implementation and for the offline-coupled assimilation). With regard to the parallelization, all these routines are executed by the filter processes (`filterpe=.true.`) only.
    54 
    55 For completeness we discuss here all user-supplied routines that are specified in the interface to `PDAF_assimilate_ensrf`. Thus, some of the user-supplied routines that are explained on the page explaining the modification of the model code for the ensemble integration are repeated here.
    56 
    57 In our study Nerger et al. (2015), we discussed that applying localization can lead to stability issues of the ENSRF. The filter performs a loop over all single observations and with localization the assimilation result depends on the order in which the observations are assimilated. This actually leads to the effect that the assimilation result at some grid point does not only depend on the observations with the localization radius **r**, but also on observations further away. This happens if these observation at larger distance are assimilated before the observations within the radius **r** and if they influence the state close to distance **r**. In this case the innovation for the state close to distance **r** is already change when assimilating the observation within the radius and hence lead to a different result. This effect has implications on the parallelization since keeping the observation order constant over the full model domain leads to a partial serialization of the algorithm. In the implementation in PDAF, we use the parallelization approach that does not guarantee the same order of the observations. Usually, the differences when changing the observation order are small, but the benefit is a better scaling since the serialization is avoided. Nonetheless, we generally recommend using LESTKF or LETKF, or their global variants ESTKF or ETKF, since they no not depend explicitly on the observation order, and they allow for non-diagonal observation error covariance matrices. However, the ENSRF/EAKF might have a good compute performance.
     53For the analysis step of the ENSRF and EAKF, different operations related to the observations are needed. These operations are requested by PDAF by calling user-supplied routines. Intentionally, the operations are split into separate routines in order to keep the operations rather elementary. This procedure should simplify the implementation. The names of the required routines are specified in the call to the routine `PDAF_assimilate_ensrf` for the fully-parallel and flexible parallelization implementations (alternatively, `PDAF_put_state_lenkf` for the 'flexible' implementation) and `PDAF_assim_offline_lenkf` for the offline-coupled assimilation. With regard to the parallelization, all these routines are executed by the filter processes (`filterpe=.true.`) only.
     54
     55For completeness we discuss here all user-supplied routines that are specified in the interface to `PDAF_assimilate_ensrf`. Thus, some of the user-supplied routines that are explained on the page about the modification of the model code for the ensemble integration are repeated here.
     56
     57In our study, Nerger et al. (2015), we discussed that applying localization can lead to stability issues of the ENSRF. The filter performs a loop over all single observations. With localization the assimilation result depends on the order in which these observations are assimilated. This actually leads to the effect that the assimilation result at some grid point does not only depend on the observations within the localization radius **r**, but also on observations further away. This happens if these observation at larger distance are assimilated before the observations within the radius **r** and if they influence the state close to distance **r**. In this case the innovation for the state close to distance **r** is already changed when assimilating the observation within the radius and hence leads to a different result. This effect has implications on the parallelization since keeping the observation order constant over the full model domain leads to a partial serialization of the algorithm. In the implementation of the serial observation processing in PDAF we use the parallelization approach that does not guarantee the same order of the observations. Usually, the differences when changing the observation order are small, but the benefit is a better scaling because the serialization is avoided. Nonetheless, we generally recommend using LESTKF or LETKF, or their global variants ESTKF or ETKF, since they do not depend explicitly on the observation order, and they allow for non-diagonal observation error covariance matrices. However, the ENSRF/EAKF might have a good compute performance.
    5858
    5959== `PDAF_assimilate_ensrf` ==
    6060
    61 The general aspects of the filter specific routines `PDAF_assimilate_*` have been described on the page [ModifyModelforEnsembleIntegration Modification of the model code for the ensemble integration] and its sub-page on [InsertAnalysisStep inserting the analysis step]. The routine is used in the fully-parallel and the flexible implementation variants of the data assimilation system. When the offline model is used, the routines `PDAF_put_state_*` are used. These have also been used in previous PDAF releases for the 'flexible' implementation variant. Here, we list once more the full interface of the routine. Subsequently, the full set of user-supplied routines specified in the call to `PDAF_assimilate_ensrf` is explained.
    62 
    63 The interface when using the LEnKF is the following:
     61The general aspects of the filter-specific routines `PDAF_assimilate_*` have been described on the page [ModifyModelforEnsembleIntegration Modification of the model code for the ensemble integration] and its sub-page on [InsertAnalysisStep inserting the analysis step]. The routine is used in the fully-parallel and the flexible implementation variants of the data assimilation system. When the offline model is used, the routines `PDAF_assim_offline_*` are used. (Implementations done for PDAF2 might also use routines `PDAF_put_state_*`, which have also been used in previous PDAF releases for the 'flexible' implementation variant.) Here, we list the full interface of the routine once more. Subsequently, the full set of user-supplied routines specified in the call to `PDAF_assimilate_ensrf` is explained.
     62
     63The interface for the ENSRF/EAKF:
    6464{{{
    6565  SUBROUTINE PDAF_assimilate_ensrf(U_collect_state, U_distribute_state, &
     
    6969}}}
    7070with the following arguments:
    71  * [#U_collect_statecollect_state_pdaf.F90 U_collect_state]: [[BR]]The name of the user-supplied routine that initializes a state vector from the array holding the ensemble of model states from the model fields. This is the inverse operation to `U_distribute_state` used in `PDAF_get_state` as well as here.
    72  * [#U_distribute_statedistribute_state_pdaf.F90 U_distribute_state]:  [[BR]]The name of a user supplied routine that initializes the model fields from the array holding the ensemble of model state vectors. This is the inverse operation to `U_collect_state`
     71 * [#U_collect_statecollect_state_pdaf.F90 U_collect_state]: [[BR]]The name of the user-supplied routine that initializes a state vector from the array holding the ensemble of model states from the model fields.
     72 * [#U_distribute_statedistribute_state_pdaf.F90 U_distribute_state]:  [[BR]]The name of a user supplied routine that initializes the model fields from the array holding the ensemble of model state vectors. This is the inverse operation to `U_collect_state`. This routine is also used in `PDAF_init_forecast` (or `PDAF_get_state`).
    7373 * [#U_init_dim_obs_finit_dim_obs_f_pdaf.F90 U_init_dim_obs_f]: [[BR]]The name of the user-supplied routine that provides the size of the full observation vector
    7474 * [#U_obs_op_fobs_op_f_pdaf.F90 U_obs_op_f]: [[BR]]The name of the user-supplied routine that acts as the full observation operator on some state vector
     
    7676 * [#U_init_obsvars_finit_obsvars_pdaf.F90 U_init_obsvars_f]: [[BR]]The name of the user-supplied routine that initializes the vector of observation error variances.
    7777 * [#U_localize_covar_seriallocalize_covar_serial_pdaf.F90 U_localize_covar_serial]: [[BR]]The name of the routine that applies the covariance localization for a single observation
    78  * [#U_prepoststepprepoststep_ens_pdaf.F90 U_prepoststep]: [[BR]]The name of the user-supplied pre/poststep routine as in `PDAF_get_state`
    79  * [#U_next_observationnext_observation_pdaf.F90 U_next_observation]: [[BR]]The name of a user supplied routine that initializes the variables `nsteps`, `timenow`, and `doexit`. The same routine is also used in `PDAF_get_state`.
     78 * [#U_prepoststepprepoststep_ens_pdaf.F90 U_prepoststep]: [[BR]]The name of the user-supplied pre/poststep routine as in `PDAF_init_forecast` or `PDAF_get_state`.
     79 * [#U_next_observationnext_observation_pdaf.F90 U_next_observation]: [[BR]]The name of a user-supplied routine that initializes the variables `nsteps`, `timenow`, and `doexit`. The same routine is also used in `PDAF_get_state`.
    8080 * `status_pdaf`: [[BR]]The integer status flag. It is zero, if the routine is exited without errors.
     81
     82
     83== `PDAF_assim_offline_ensrf` ==
     84
     85For the offline mode of PDAF, the routine `PDAF_assim_offline_ensrf` has to be used instead of `PDAF_assimilate_ensrf`.  The general aspects of the filter specific routines `PDAF_assim_offline_*` have been described on the page [wiki:OfflineImplementationGuide Implementation Guide for the offline mode]. The interface of the routine is identical with that of `PDAF_assimilate_ensrf` with the exception that the arguments of the user-supplied routines `U_distribute_state`, `U_collect_state`  and `U_next_observation` are not present here.
     86
     87The interface is the following:
     88{{{
     89SUBROUTINE PDAF_assim_offline_ensrf(&
     90     U_init_dim_obs_f, U_obs_op_f,  U_init_obs_f, U_init_obsvars_f, &
     91     U_localize_covar_serial, &
     92     U_prepoststep, outflag)
     93}}}
     94
     95
    8196
    8297== `PDAF_put_state_ensrf` ==