Changes between Version 1 and Version 2 of IncrementalAnalysisUpdates


Ignore:
Timestamp:
May 15, 2025, 11:54:03 AM (3 days ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IncrementalAnalysisUpdates

    v1 v2  
    2727|| IAU (Incremental Analysis Updates) was re-coded for PDAF V3.0 and now offers full functionality ||
    2828
    29 Incremental Analysis Updates (IAU) are a method to avoid shocks to the model dynamics that could result from the increment computed in an analysis step. Instead of an instantaneous change of the model fields, IAU applies the analysis increment stepwise distributes over a number of time steps.
     29Incremental Analysis Updates (IAU) are a method to avoid shocks to the model dynamics that could result from the increment computed and directly applied in an analysis step. Instead of an instantaneous change of the model fields, IAU applies the analysis increment stepwise and distributes it over a number of time steps.
    3030
    31 There are different approaches to IAU. One is what we call //forward IAU//. In this case the ensmeble is integrated by the model forard in time starting from the analysis time. Thus, the analysis increment is applied in the future of the analysis step. The other approach is //retrospective IAU//. This approach usually assimilates observation in the middle of a time window. Then, the model is restarted at the beginning of the time window and the IAU is applied over the full time window. In this approach the distributed increments are usually weighted to that they incremental changes increase toward the analysis time in the middle of the time window and decrease afterwards. An example would be for daily assimilation to compute the analysis increment in the middle of the day and then restart the ensemble integration from midnight and integrating over 24 hours.
     31There are different approaches to IAU. One is what we call //forward IAU//. In this case, the ensemble is integrated by the model forward in time starting from the analysis time. In this case, the analysis increment is applied in the future of the analysis step. The other approach is //retrospective IAU//. This approach usually assimilates observations in the middle of a time window. Then, the model is restarted at the beginning of the time window and the increment is applied over the full time window. In this approach, the distributed increments are usually weighted to that the incremental changes increase toward the analysis time in the middle of the time window and decrease afterwards. An example would be for daily assimilation to compute the analysis increment in the middle of the day and then restart the ensemble integration from midnight and integrating over 24 hours.
    3232
    3333PDAF supports both //forward IAU// and //retrospective IAU//, however, for //retrospective IAU// with online coupled DA the user would need to ensure that the model steps back in time consistently.
    3434
    35 If one uses the PDAF_assimilate interface routines, one can activate IAU with a single call to `PDAF_iau_init`, which will be explained below. Apart from the standard settings, there are further routines that can be called for particular cases.
     35If one uses the `PDAF_assimilate` interface routines, one can activate IAU with a single call to `PDAF_iau_init`, which will be explained below. Apart from the standard settings, there are further routines that can be called for particular cases.
    3636
    3737== Activation and configuration of IAU ==
     
    3939=== PDAF_iau_init ===
    4040
    41 This routine initializes parameters for IAU and activates it. The routine further allocates the array in which the ensemble increments are stored. This array exists on all processes that are part of model tasks.
     41This routine initializes parameters for IAU and activates the IAU. The routine further allocates the array in which the ensemble increments are stored. This array exists on all processes that are part of model tasks.
    4242
    4343The routine is usually called in `init_pdaf` after the initialization of PDAF in `PDAF_init`. it is important that the routine is called by all model processes because all these processes need the information on the IAU configuration and need to allocate the increment array.
     
    5757
    5858Hints:
    59   * type_iau=2 is linearly increasing and decreasing similar to what is used in the ocean model NEMO. This type is usually used if the IAU is applied in re-running over the previous observation period.
    60   * type_iau=3 stores the increment information, but does not apply the increment. This permits to apply the increment in user-provided code. For this, the routine [wiki:PDAF_iau_set_pointer] can be used to assess the increment array within PDAF.
     59  * type_iau=2 is linearly increasing and decreasing similar to what is used in the ocean model NEMO. This type is usually used for //retrospective IAU//.
     60  * type_iau=3 stores the increment information, but does not apply the increment. This permits to apply the increment in user-provided code. For this, the routine [wiki:PDAF_iau_set_pointer] can be used to assess the increment array allocated within PDAF.
    6161
    6262An example implementation can be found in `tests/online_2D_parallelmodel/`.
     
    6969
    7070`PDAF_iau_init_inc` can be used by a user to fill the process-local increment array.
    71 A common use is when the IAU should be applied from the initial time of an assimilation run, for example if the increment was computed in a previous assimilation run and then stored for restarting. Since PDAF can only compute an increment in an analysis step, the user needs to provide the increment.
     71A common use is when the IAU should be applied from the initial time of an assimilation run, for example if the increment was computed in a previous assimilation run and then stored for restarting. In this case, the user needs to provide the increment because PDAF can only compute an increment in an analysis step.
    7272
    7373The routine is usually called in `init_pdaf` after the initialization of IAU with `PDAF_iau_init`. It has to be called by all processes that are model processes and one needs to provide the task-local ensemble (i.e. with local ensemble size `dim_ens_l=1` for the fully parallel mode, and usually `dim_ens_l>1` for the flexible parallelization mode). The routine can usually not be called in `init_ens_pdaf` since this routine is only executed by filter processes and not all model processes.
     
    9191`PDAF_iau_reset` is used to modify the IAU type and the number of IAU time steps during a run. While [wiki:PDAF_iau_init `PDAF_iau_init`] sets the IAU type and number of IAU steps initially, one can change these settings during an assimilation run.
    9292
    93 The routine has to be called by all processes that are model processes. A common place is to call the routine in `assimilate_pdaf` after an analysis step or in `distribute_state_pdaf`.
     93All model processes must call the routine. A common place is to call the routine in `assimilate_pdaf` after an analysis step or in `distribute_state_pdaf`.
    9494
    9595The interface is:
     
    118118This routine allows the user to provide a user-specified vector of increment weights. While `PDAF_iau_init` allows to choose among pre-defined weight functions, one might like to use a different function and the corresponding weights can be set here.
    119119
    120 The routine has to be called by all processes that are model processes. A common place is to call the routine in `assimilate_pdaf` after an analysis step or in `distribute_state_pdaf`.
     120All model processes must call the routine. A common place is to call the routine in `assimilate_pdaf` after an analysis step or in `distribute_state_pdaf`.
    121121
    122122
     
    139139=== PDAF_iau_set_pointer ===
    140140
    141 With this routine the user can set a pointer to the PDAF-internal array of ensemble increments. This gives direct access to the increment array e.g. to analyze it or to write it into a file for restarting. The routine is different from `PDAF_iau_set_inc` in that here the user obtains access to the internal IAU array, while in `PDAF_iau_set_inc` one can only overwrite the internal array.
     141With this routine the user can set a pointer to the PDAF-internal array of ensemble increments. This provides direct access to the increment array e.g. to analyze it or to write it into a file for restarting. The routine is different from `PDAF_iau_set_inc` in that here the user obtains access to the internal IAU array, while in `PDAF_iau_set_inc` one can only overwrite the internal array.
    142142
    143143The routine can be called by each single process, but it only provides a pointer to the process-local part of the increment array. For domain-decomposed models, this array only includes the state vector part for the process domain. In addition, it usually only contains a sub-ensemble unless one uses the flexible parallelization mode with a single model task. For the fully parallel mode, the process(es) of a single model task only hold a single ensemble state.
     
    152152
    153153Hints:
    154  * In Fortran user code one has to declare[[BR]]`REAL, POINTER :: iau_ptr(:,:) `[[BR]] and provide this as the first argument. One does not need to allocate this pointer.
     154 * In Fortran user code one has to declare a pointer like [[BR]]`REAL, POINTER :: iau_ptr(:,:) `[[BR]] and provide this as the first argument. One does not need to allocate this pointer.
    155155
    156156== Apply the IAU increment ==
     
    158158=== PDAF_iau_add_inc ===
    159159
    160 This routine is only used with the flexible parallelization mode if a routine `PDAF3_put_state_X` (or any other PDAF*_put_state_X) routine is used. Since `PDAF*_put_state_X` is only called after a model state is integrated over the full forecast period, this routine cannot apply the increment. Hence, the routine `PDAF_iau_add_inc` has to be called at each model time step in the time stepping loop of the model to apply the increment. This routine adds the increment for the currently integrated ensemble member according to the specified IAU type and number of IAU steps.
     160This routine is only used with the flexible parallelization mode if a routine `PDAF3_put_state*` (or any other PDAF*_put_state*) routine is used. Since a `put_state`-routine is only called after a model state is integrated over the full forecast period, this routine cannot apply the increment. Hence, the routine `PDAF_iau_add_inc` has to be called at each model time step in the time stepping loop of the model to apply the increment. This routine adds the increment for the currently integrated ensemble member according to the specified IAU type and number of IAU steps.
    161161
    162 || **Note:** Starting from PDAF V3.0 we recommend to use the `PDAF*_assimilate_X` routines also for the flexible parallelization mode. Since `PDAF*_assimilate_X` is called at each time step, the additional call of `PDAF_iau_add_inc` is not required. ||
     162|| **Note:** Starting from PDAF V3.0 we recommend to use the `PDAF*_assimilate*` routines also for the flexible parallelization mode. Since the `assimilate`-routine is called at each time step, the routine can apply the increment and the additional call of `PDAF_iau_add_inc` is not required. ||
    163163
    164164The routine has to be inserted in time stepping loop of the model code. It has to be called at each time step.