Changes between Version 12 and Version 13 of OfflineInitPdaf


Ignore:
Timestamp:
May 19, 2025, 10:09:10 AM (13 days ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OfflineInitPdaf

    v12 v13  
    3434== Arguments of `PDAF_init` ==
    3535
     36In the tutorial codes and the template, the call to `PDAF_init` is fully implemented. Here, we provide an overview of the arguments that are set in the call to `PDAF_init`.
     37
    3638The call to `PDAF_init` has the following structure:
    3739{{{
     
    4446}}}
    4547
    46 The required variables are the following:
     48The required arguments are described below. In the list, we mark those variables bold, which one might like to change, like the type of the DA method. The other variables are required, but usually not changed by the user.
    4749
    48  * `filtertype`: An integer defining the type of the DA method. Available values are listed on the[wiki:AvailableOptionsforInitPDAF Page on available options] and can also be displayed runnign the assimialtion program with the option `-subtype -1`.
    49  * `subtype`:[[BR]] An integer defining the sub-type of the filter algorithm. Available values are listed on the[wiki:AvailableOptionsforInitPDAF Page on available options] and can also be displayed runnign the assimialtion program with the option `-subtype -1`.
     50 * **filtertype**:[[BR]] An integer defining the type of the DA method. Available values are listed on the [wiki:AvailableOptionsforInitPDAF page on available options] and can also be displayed running the assimilation program with the option `-subtype -1`.
     51 * **subtype**:[[BR]] An integer defining the sub-type of the filter algorithm. Available values are listed on the [wiki:AvailableOptionsforInitPDAF page on available options] and can also be displayed runnign the assimialtion program with the option `-subtype -1`.
    5052 * `step_null`:[[BR]] Always 0 for the offline mode.
    51  * `filter_param_i`:[[BR]] Integer array collecting options for PDAF. The first two variables are mandatory and equal for all filters. Further variables are optional (see example code). The mandatory variables are in the following order:
    52   * The size of the local state vector for the current process.
    53   * The ensemble size for all ensemble-based filters (or the rank of the state covariance matrix for mode-based filters like SEEK)
    54  * `length_filter_param_i`:[[BR]] An integer defining the length of the array `filter_param_i`. The entries in the array are parsed up to this index.
    55  * `filter_param_r`:[[BR]] Array of reals collecting real-valued options for PDAF. The first variable is mandatory and equal for all filters.  Further variables are optional (see example code). The mandatory variable is:
    56   * The value of the forgetting factor (required to be larger than zero)
    57  * `length_filter_param_r`:[[BR]] An integer defining the length of the array `filter_param_r`. The entries in the array are parsed up to this index.
     53 * **filter_param_i**:[[BR]] Integer array collecting options for PDAF. The first two variables are mandatory and equal for all filters. Further variables are optional (see example code). The mandatory variables are in the following order:
     54  1. The size of the local state vector for the current process.
     55  1. The ensemble size for all ensemble-based filters
     56 * **length_filter_param_i**:[[BR]] An integer defining the length of the array `filter_param_i`. The entries in the array are parsed up to this index.
     57 * **filter_param_r**:[[BR]] Array collecting real-valued options for PDAF. The first value is mandatory and equal for all filters.  Further variables are optional (see example code). The mandatory variable is:
     58  1. The value of the forgetting factor controlling inflation (required to be larger than zero)
     59 * **length_filter_param_r**:[[BR]] An integer defining the length of the array `filter_param_r`. The entries in the array are parsed up to this index.
    5860 * `COMM_model`:[[BR]] The communicator variable `COMM_model` as initialized by `init_parallel_pdaf`. If the model-communicator is named differently in the actual program, the name has to be adapted
    5961 * `COMM_filter`:[[BR]] The communicator variable `COMM_filter` as initialized by `init_parallel_pdaf`.
    6062 * `COMM_couple`:[[BR]] The communicator variable `COMM_couple` as initialized by `init_parallel_pdaf`.
    61  * `task_id`:[[BR]] The index of the model tasks  as initialized by `init_parallel_pdaf`.
     63 * `task_id`:[[BR]] The index of the model tasks  as initialized by `init_parallel_pdaf`. Always 1 for the offline mode
    6264 * `n_modeltasks`:[[BR]] The number of model tasks as defined before the call to `init_parallel_pdaf`.
    6365 * `filterpe`:[[BR]] The flag showing if a process belongs to `COMM_filter` as initialized by `init_parallel_pdaf`.
    64  * `init_ens_offline`:[[BR]] The name of the user-supplied routine that is called by `PDAF_init` to initialize the ensemble of model states. (See below: '[#User-suppliedroutineinit_ens_offline User-supplied routine init_ens_offline]'
     66 * **init_ens_offline**:[[BR]] The name of the user-supplied routine that is called by `PDAF_init` to initialize the ensemble of model states. (See below: '[#User-suppliedroutineinit_ens_offline User-supplied routine init_ens_offline]'
    6567 * `screen`:[[BR]] An integer defining whether information output is written to the screen (i.e. standard output). The following choices are available:
    6668  * 0: quite mode - no information is displayed.
    6769  * 1: Display standard information (recommended)
    6870  * 2: as 1 plus display of timing information during the assimilation process
    69  * `status_pdaf`:[[BR]] An integer used as status flag of PDAF. If `status_pdaf` is zero upon exit from `PDAF_init` the initialization was successful. An error occurred for non-zero values. (The error codes are documented in the routine PDAF_init.)
     71 * `status_pdaf`:[[BR]] An integer used as status flag of PDAF. If `status_pdaf` is zero upon exit from `PDAF_init`, the initialization was successful. An error occurred for non-zero values. (The error codes are documented in the routine PDAF_init.)
    7072
    71 PDAF uses two arrays `filter_param_i` and `filter_param_r` to respectively specify integer and real-valued options for PDAF. As described above, 2 integer values (state vector size, ensemble size) and 1 real option (forgetting factor for inflation) are mandatory. Additional options can be set by specifying a larger array and setting the corresponding size value (`length_filter_param_i`, `length_filter_param_r`). However, with PDAF V3.0 it can be more convenient to use the subroutines `PDAF_set_iparam and `PDAF_set_rparam`, which are explained further below.
     73PDAF uses two arrays **filter_param_i** and **filter_param_r** to respectively specify integer and real-valued options for PDAF. As described above, 2 integer values (state vector size, ensemble size) and 1 real option (forgetting factor for inflation) are mandatory. Additional options can be set by specifying a larger array and setting the corresponding size value (`length_filter_param_i`, `length_filter_param_r`). However, with PDAF V3.0 it can be more convenient to use the subroutines `PDAF_set_iparam and `PDAF_set_rparam`, which are explained further below.
    7274
    73 An overview of available integer and real-valued options for each DA method can be found on the page [wiki:AvailableOptionsforInitPDAF Available options for the different DA methods]. The available options for a specific DA method can also be displayed by running the assimilation program for the selected DA method setting `subtype = -1`. (In the tutorial and template codes one can set `-subtype -1` on the command line). Generally, available options and valid settings are also listed in `mod_assimilation.F90` of the tutorials and template codes.
     75An **overview of available integer and real-valued options** for each DA method can be found on the page [wiki:AvailableOptionsforInitPDAF Available options for the different DA methods]. The available options for a specific DA method can also be displayed by running the assimilation program for the selected DA method setting `subtype = -1`. (In the tutorial and template codes one can set `-subtype -1` on the command line). Generally, available options and valid settings are also listed in `mod_assimilation.F90` of the tutorials and template codes.
    7476
    7577We recommended to check the value of `status_pdaf` in the program after PDAF_init (and potentially `PDAF_set_iparam and `PDAF_set_rparam`) are executed. Only if its value is 0, the initialization was successful.
     
    130132* `status_pdaf`:[[BR]] Status flag for PDAF. Both routines increment in the input value. The increment is 0 for no error (this allows to check `flag` once after all calls to `PDAF_init`, `PDAF_set_iparam`, and `PDAF_set_rparam`.)
    131133
     134The tutorial code uses these routines for a few settings while the template code include an extended set of calls specific for different DA methods.
     135
    132136An overview of available integer and real-valued options for each DA method can be found on the page[wiki:AvailableOptionsforInitPDAF Available options for the different DA methods]. The available options for a specific DA method can also be displayed by running the assimilation program for the selected DA method setting `subtype = -1`. (In the tutorial and template codes one can set `-subtype -1` on the command line).
    133137
     
    137141The PDAF initialization can be tested by compiling the assimilation program (one can out-comment the call to `PDAF3_assim_offline` if one likes to focus on the initialization) and executing it.
    138142
    139 Standard output from PDAF_init should look like the following:
     143Standard output from PDAF_init looks like the following:
    140144{{{
    141145PDAF    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++