Changes between Version 3 and Version 4 of OfflineInitPdaf_PDAF3
- Timestamp:
- Apr 16, 2026, 5:18:46 PM (10 hours ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OfflineInitPdaf_PDAF3
v3 v4 48 48 * **filtertype**:[[BR]] An integer defining the type of the DA method. (See the [#Noteonavailableoptions Note on Available Options]) 49 49 * **subtype**:[[BR]] An integer defining the sub-type of the filter algorithm. (See the [#Noteonavailableoptions Note on Available Options]) 50 * `step_null`:[[BR]] Always 0 for the offline mode.51 * **filter_param_i**:[[BR]] Integer array collectingoptions for PDAF. The first two variables are mandatory and equal for all filters. Further variables are optional (See the [#Noteonavailableoptions Note on Available Options]). The mandatory variables are in the following order:50 * `step_null`:[[BR]] Can be chosen freely to e.g. indicate the time step in the routines handling observations. 51 * **filter_param_i**:[[BR]] Integer array for options for PDAF. The first two variables are mandatory and equal for all filters. Further variables are optional (See the [#Noteonavailableoptions Note on Available Options]). The mandatory variables are in the following order: 52 52 1. The size of the state vector for the current process (see [#Definingthestatevector information on defining the state vector]) 53 53 1. The ensemble size for all ensemble-based filters 54 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 collectingreal-valued options for PDAF. The first value is mandatory and equal for all filters. Further variables are optional (See the [#Noteonavailableoptions Note on Available Options]). The mandatory variable is:55 * **filter_param_r**:[[BR]] Array for real-valued options for PDAF. The first value is mandatory and equal for all filters. Further variables are optional (See the [#Noteonavailableoptions Note on Available Options]). The mandatory variable is: 56 56 1. The value of the forgetting factor controlling inflation (required to be larger than zero) 57 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. … … 63 63 * `status_pdaf`:[[BR]] An integer used as status flag of PDAF. If `status_pdaf` is zero upon exit from `PDAF3_init`, the initialization was successful. An error occurred for non-zero values. (The error codes are documented in the routine PDAF3_init.) 64 64 65 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 value (forgetting factor) 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.65 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 value (forgetting factor) 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 recommend to use the subroutines `PDAF_set_iparam` and `PDAF_set_rparam`, which are [wiki:OfflineInitPdaf_PDAF3#Settingadditionaloptions explained further below]. 66 66 67 67 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. 68 68 69 We recommended to check the value of `status_pdaf` in the program after PDAF3_init (and potentially `PDAF_set_iparam and `PDAF_set_rparam`) are executed. Only if its value is 0, the initialization was successful.69 We recommended to check the value of `status_pdaf` in the program after PDAF3_init (and potentially `PDAF_set_iparam ` and `PDAF_set_rparam`) are executed. Only if its value is 0, the initialization was successful. 70 70 71 71 **Notes:** 72 72 - Implementations done before PDAF V3.0, used the routine `PDAF_init` which is described on the [wiki:OfflineInitPdaf_PDAF23 Page on initialized PDAF without the PDAF3 interface]. 73 - For using `PDAF3_init` , the routine `init_parallel_pdaf` has to contain a call to `PDAF3_set_parallel`. This is included in the template and tutorial codes for PDAF V3.0 and later. An exception is only if the porgram is always run without MPI parallelization. In this case `init_parallel_pdaf` does not need to be called, as, for this case, PDAF can initialize parallelization variables itself.73 - For using `PDAF3_init` with PDAF V3.1 and later, the routine `init_parallel_pdaf` has to contain a call to `PDAF3_init_parallel` (`PDAF3_set_parallel` in PDAF V3.0). This is included in the template and tutorial codes for PDAF V3.1 and later. An exception is only if the program is always run without MPI parallelization. In this case `init_parallel_pdaf` does not need to be called, as PDAF can initialize parallelization variables itself for this case. 74 74 75 75 === Note on available options === … … 128 128 The logical definition of the state vector will also be utilized in several other user-supplied routines. E.g. in routines that fill model fields from a state vector or in the routine providing the observation operator. 129 129 130 The actual setup of the state vector should be done in `init_pdaf`. The tutorial example `tutorial/online_2D_serialmodel_2fields` demonstrates a possible setup of the state vector for 2 fields. Here, one defines the number of fields, the dimension of each included fieldas well as the offset of each field in the state vector.130 The actual setup of the state vector should be done in `init_pdaf`. The tutorial example `tutorial/online_2D_serialmodel_2fields` demonstrates a recommended setup of the state vector for 2 fields. For PDAF 3.1 and later, this example uses the module `mod_statevector_pdaf`, which defines a structure way to define the number of fields in the state vecotr, the dimension of each included field, as well as the offset of each field in the state vector. 131 131 132 132 … … 163 163 The 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. 164 164 165 Standard output from PDAF3_init looks like the following:165 Standard output from PDAF3_init from the template code looks like the following: 166 166 {{{ 167 167 PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
