21 | | There are no particular options for the observation generation functionality. So, using the common names in the tutorial and template codes, for `filter_param_i` one just has to specify the mandatory values of the state dimension and the ensemble size. For `filter_param_r` one has to specify the mandatory values of the forgetting factor (even though, this value is ignored for the observation generation). An overview of the options can be optained by runnign the program with `subtype=-1`. The options are also listed on the [wiki:AvailableOptionsforInitPDAF#ObservationGeneration page on available options]. |
| 23 | To set options, using the common names in the tutorial and template codes, for `filter_param_i` one just has to specify the mandatory values of the state dimension and the ensemble size. For `filter_param_r` one has to specify the mandatory values of the forgetting factor (even though, this value is ignored for the observation generation). |
| 24 | |
| 25 | There is one additional integer option: `seedset` (`iparam(3)`). This allows to select a seed set for the random number generation, see the options listed on the [wiki:AvailableOptionsforInitPDAF#ObservationGeneration page on available options]. An overview of the options can also be optained by runnign the program with `subtype=-1`. |
| 26 | |
32 | | SUBROUTINE PDAFomi_generate_obs(U_collect_state, U_distribute_state, & |
33 | | U_init_dim_obs, U_obs_op, U_get_obs_f, & |
34 | | U_prepoststep, U_next_observation, status_pdaf) |
| 42 | SUBROUTINE PDAF3_generate_obs(collect_state_pdaf, distribute_state_pdaf, & |
| 43 | init_dim_obs_pdafomi, obs_op_pdafomi, get_obs_f_pdaf, & |
| 44 | prepoststep_pdaf, next_observation_pdaf, status_pdaf) |
37 | | * `U_collect_state`: 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 basically the inverse operation to `U_distribute_state` used in [ModifyModelforEnsembleIntegration#PDAF_get_state PDAF_get_state] |
38 | | * `U_distribute_state`: The name of a user supplied routine that initializes the model fields from the array holding the ensemble of model state vectors. |
39 | | * `U_init_dim_obs`: The name of the user-supplied routine that provides the size of the full observation vector |
40 | | * `U_obs_op`: The name of the user-supplied routine that acts as the full observation operator on some state vector |
41 | | * `U_get_obs_f`: The name of the user-supplied routine that receives the full vector of generated synthetic observations from PDAF |
42 | | * `U_prepoststep`: The name of the pre/poststep routine as in `PDAF_get_state` |
43 | | * `U_next_observation`: 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`. |
44 | | * `status_pdaf`: The integer status flag. It is zero, if `PDAF_assimilate_lestkf` is exited without errors. |
| 47 | * Routines to transfer between model fields and state vector: |
| 48 | * [#collect_state_pdafcollect_state_pdaf.F90 collect_state_pdaf]:[[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. |
| 49 | * [#distribute_state_pdafdistribute_state_pdaf.F90 distribute_state_pdaf]:[[BR]] The name of a user supplied routine that initializes the model fields from the array holding the ensemble of model state vectors. (The same routine is also used in `PDAF_init_forecast`.) |
| 50 | * Observation routines using PDAF-OMI: |
| 51 | * [#init_dim_obs_pdafomicallback_obs_pdafomi.F90 init_dim_obs_pdafomi]:[[BR]] The name of the user-supplied routine that initializes the observation information and provides the size of observation vector |
| 52 | * [#obs_op_pdafomicallback_obs_pdafomi.F90 obs_op_pdafomi]:[[BR]] The name of the user-supplied routine that acts as the observation operator on some state vector |
| 53 | * Partifular routine to access generated observations |
| 54 | * [#get_obs_f_pdafget_obs_f_pdaf.F90 get_obs_f_pdaf]: The name of the user-supplied routine that receives the full vector of generated synthetic observations from PDAF |
| 55 | * Prepoststep and initialization for next forecast phase |
| 56 | * [#prepoststep_pdafprepoststep_ens_pdaf.F90 prepoststep_pdaf]:[[BR]] The name of the pre/poststep routine as in `PDAF_init_forecast`. (The same routine is also used in `PDAF_init_forecast`.) |
| 57 | * [#next_observation_pdafnext_observation.F90 next_observation_pdaf]:[[BR]] The name of a user supplied routine that initializes the variables `nsteps`, `timenow`, and `doexit`. (The same routine is also used in `PDAF_init_forecast`.) |
| 58 | * Status flag |
| 59 | * `status`:[[BR]] The integer status flag. It is zero, if the routine is exited without errors. |
49 | | When the 'flexible' implementation variant is chosen for the assimilation system, the routine `PDAFomi_put_state_generate_obs` has to be used instead of `PDAFomi_generate_obs`. The general aspects of the filter specific routines `PDAFomi_put_state_*` have been described on the page [ModifyModelforEnsembleIntegration Modification of the model code for the ensemble integration]. The interface of the routine is identical with that of `PDAFomi_generate_obs` with the exception the specification of the user-supplied routines `U_distribute_state` and `U_next_observation` are missing. |
| 64 | This routine exists for backward-compatibility. In implementations that were done before the release of PDAF V3.0, a 'put_state' routine was used for the `flexible` parallelization variant and for the offline mode. |
| 65 | When the 'flexible' implementation variant is chosen for the assimilation system, the routine. The routine `PDAF3_put_state_generate_obs` allows to port such implementations to the PDAF3 interface with minimal changes. |
| 66 | The interface of the routine is identical with that of `PDAF3_generate_obs`, except that the user-supplied routines `U_distribute_state` and `U_next_observation` are missing. |
| 67 | |
53 | | SUBROUTINE PDAFomi_put_state_generate_obs(U_collect_state, U_init_dim_obs, U_obs_op, & |
54 | | U_get_obs_f, U_prepoststep, status_pdaf) |
| 71 | SUBROUTINE PDAF3_put_state_generate_obs(collect_state_pdaf, & |
| 72 | init_dim_obs_pdafomi, obs_op_pdafomi, get_obs_f_pdaf, & |
| 73 | prepoststep_pdaf, status_pdaf) |
75 | | See the page on [InsertAnalysisStep#U_distribute_statedistribute_state_pdaf.F90 inserting the analysis step] for the description of this routine. |
| 91 | |
| 92 | See the page on [ModifyModelforEnsembleIntegration#collect_state_pdafcollect_state_pdaf.F90 modifying the model code for the ensemble integration] for the description of this routine. |
| 93 | |
| 94 | === `distribute_state_pdaf` (distribute_state_pdaf.F90) === |
| 95 | |
| 96 | This routine is independent of the filter algorithm used. |
| 97 | |
| 98 | See the page on [ModifyModelforEnsembleIntegration#distribute_state_pdafdistribute_state_pdaf.F90 modifying the model code for the ensemble integration] for the description of this routine. |
| 99 | |
| 100 | === `init_dim_obs_pdafomi` (callback_obs_pdafomi.F90) === |
| 101 | |
| 102 | This is a call-back routine initializing the observation information. The routine just calls a routine from the observation module for each observation type. |
| 103 | |
| 104 | See the [wiki:OMI_Callback_obs_pdafomi_PDAF3 documentation on callback_obs_pdafomi.F90] for more information. |
| 105 | |
| 106 | === `obs_op_pdafomi` (callback_obs_pdafomi.F90) === |
| 107 | |
| 108 | This is a call-back routine applying the observation operator to the state vector. The routine calls a routine from the observation module for each observation type. |
| 109 | |
| 110 | See the [wiki:OMI_Callback_obs_pdafomi_PDAF3 documentation on callback_obs_pdafomi.F90] for more information. |
80 | | The routine is called at the beginning of each analysis step. For PDAF, it has to initialize the size `dim_obs_p` of the observation vector according to the current time step. Apart from this routine will initialize overall observation information. In this routine one just calls `init_dim_obs_TYPE` for each observation type. The routine is described in detail on [wiki:OMI_Callback_obs_pdafomi callback_obs_pdafomi.F90]. |
81 | | |
82 | | |
83 | | === `U_obs_op` (callback_obs_pdafomi.F90) === |
84 | | |
85 | | The routine is called during the analysis step. It has to perform the operation of the observation operator acting on a state vector that is provided as `state_p`. The observed state has to be returned in `m_state_p`. In this routine one just calls `obs_op_TYPE` for each observation type. The routine is described in detail on [wiki:OMI_Callback_obs_pdafomi callback_obs_pdafomi.F90]. |
86 | | |
87 | | |
88 | | === `U_get_obs_f` (get_obs_f_pdaf.F90) === |
89 | | |
90 | | This routine is specific for the observation generation. In this routine PDAF provides the user with the vector of synthetic observations generated by PDAF. One can then e.g. write the observation vector into a file so that one can use it later in a twin experiment (The template file `readwrite_obs.F90` provides functionality for reading and writing as described on the [wiki:readwrite_obs page on readwrite_obs]. |
| 115 | This routine is specific for the observation generation. PDAF provides to this routine the vector of synthetic observations generated by PDAF. One can then, e.g., write the observation vector into a file so that one can use it later in a twin experiment (The template file `readwrite_obs.F90` provides functionality for reading and writing as described on the [wiki:readwrite_obs page on readwrite_obs]. |