| 9 | This routine is called to set a Fortran pointer to the array in PDAF that stores the ensembles for smoothing. Also, the routine sets the available lag of the smoothing. |
| 10 | |
| 11 | {{{ |
| 12 | CALL PDAF_get_smootherens(sens_pointer, maxlag, status) |
| 13 | }}} |
| 14 | |
| 15 | The variables in the interface are the following: |
| 16 | |
| 17 | * `sens_pointer`: The pointer to the smoother ensemble. The dimension is `sens_pointer(:,:,:)`. Thus in the program calling `PDAF_get_smmotherens` one has to declare `REAL, POINTER :: sens_pointer(:,:,:)`. On output it points to the smoother ensemble. |
| 18 | * `maxlag`: Number of lags stored in the smoother ensemble. While in the call to `PDAF_init` the maximum lag for the smoother is set, not all possible lags are using at the beginning of the assimilations. `maxlag` shows how many times were already smoothed. |
| 19 | * `status`: Status flag. 0 for successful exit. |
| 20 | |
| 21 | '''Important:''' |
| 22 | |
| 23 | * Because `sens_pointer` is a pointer, the call to `PDAF_get_smootherens` needs an ''explicit'' Fortran interface. This is provided by the Fortran module `PDAF_interfaces_module`. In the header part of the routine that calls `PDAF_get_smootherens` one has to include `use PDAF_interfaces_module`! |
| 24 | |
| 25 | Notes: |
| 26 | |
| 27 | * `PDAF_get_smootherens` is typically called in the prepoststep routine after the analysis step. At this time not only the filtered analysis step can be analized, but also all smoothed ensembles. |
| 28 | * The first two indices of `sens_pointer` are identical to those in the ensemble array `ens_p`. Thus, the array contains state vectors in its columns. The second index is the ensemble index. The third index is the lag. Thus, if the value of the third index is fixed one can use the array `sens_pointer` analogous to the ensemble array `ens_p`. |
| 29 | * For an example using `PDAF_get_smootherens` see the example implementation `testsuite/src/dummymodel_1D/`. The routine is called in `compute_rms_smoother.F90`. |
| 30 | |
| 31 | |
| 32 | |
| 33 | == PDAF-D_set_smootherens.F90 == |
| 34 | |
| 35 | This routine is called to set a Fortran pointer to the array in PDAF that stores the ensembles for smoothing. In addition, it sets the available lag of the smoothing. This routine is called in the offline mode of PDAF. While in the online mode, the smoother ensemble array is filled automatically by PDAF, one has to fill it manually in the offline mode. `PDAF_set_smootherens` gives access to the smoother array to fill it. |
| 36 | |
| 37 | {{{ |
| 38 | CALL PDAF_set_smootherens(sens_pointer, maxlag, status) |
| 39 | }}} |
| 40 | |
| 41 | The arguments are: |
| 42 | |
| 43 | * `sens_pointer`: The pointer to the smoother ensemble. The dimension is `sens_pointer(:,:,:)`. Thus in the program calling `PDAF_get_smmotherens` one has to declare `REAL, POINTER :: sens_pointer(:,:,:)`. On output it points to the smoother ensemble. |
| 44 | * `maxlag`: Set the number of lags stored in the smoother ensemble. While in the call to `PDAF_init` the maximum lag for the smoother is set, not all possible lags are using at the beginning of the assimilations. `maxlag` says how many times were already smoothed. Both values are usually identical for the offline mode. |
| 45 | * `status`: Status flag. 0 for successful exit. |
| 46 | |
| 47 | |
| 48 | '''Important:''' |
| 49 | |
| 50 | * Because `sens_pointer` is a pointer, the call to `PDAF_set_smootherens` needs an ''explicit'' Fortran interface. This is provided by the Fortran module `PDAF_interfaces_module`. In the header part of the routine that calls `PDAF_set_smootherens` one has to include `use PDAF_interfaces_module`! |
| 51 | |
| 52 | |
| 53 | Notes: |
| 54 | |
| 55 | * `PDAF_set_smootherens` is typically called in the initialization phase of PDAF. It was to be called after the basic initialization of PDAF in `PDAF_init`. A possible location is to call `PDAF_set_smootherens` is the ensemble initialization routine `U_init_ens`. |
| 56 | * The first two indices of `sens_pointer` are identical to those in the ensemble array `ens_p`. Thus, the array contains state vectors in its columns. The second index is the ensemble index. The third index is the lag. Thus, if the value of the third index is fixed one can use the array `sens_pointer` analogous to the ensemble array `ens_p`. |