| Version 3 (modified by , 13 years ago) ( diff ) |
|---|
Auxiliary Routines
Contents of this page
PDAF provide a number of auxiliary routines. They serve to access PDAF-internal data, which is not available through the regular interface of PDAF.
PDAF-D_get_smootherens.F90
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.
CALL PDAF_get_smootherens(sens_pointer, maxlag, status)
The variables in the interface are the following:
sens_pointer: The pointer to the smoother ensemble. The dimension issens_pointer(:,:,:). Thus in the program callingPDAF_get_smmotherensone has to declareREAL, POINTER :: sens_pointer(:,:,:). On output it points to the smoother ensemble.maxlag: Number of lags stored in the smoother ensemble. While in the call toPDAF_initthe maximum lag for the smoother is set, not all possible lags are using at the beginning of the assimilations.maxlagshows how many times were already smoothed.status: Status flag. 0 for successful exit.
Important:
- Because
sens_pointeris a pointer, the call toPDAF_get_smootherensneeds an explicit Fortran interface. This is provided by the Fortran modulePDAF_interfaces_module. In the header part of the routine that callsPDAF_get_smootherensone has to includeuse PDAF_interfaces_module!
Notes:
PDAF_get_smootherensis 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.- The first two indices of
sens_pointerare identical to those in the ensemble arrayens_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 arraysens_pointeranalogous to the ensemble arrayens_p. - For an example using
PDAF_get_smootherenssee the example implementationtestsuite/src/dummymodel_1D/. The routine is called incompute_rms_smoother.F90.
PDAF-D_set_smootherens.F90
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.
CALL PDAF_set_smootherens(sens_pointer, maxlag, status)
The arguments are:
sens_pointer: The pointer to the smoother ensemble. The dimension issens_pointer(:,:,:). Thus in the program callingPDAF_get_smmotherensone has to declareREAL, POINTER :: sens_pointer(:,:,:). On output it points to the smoother ensemble.maxlag: Set the number of lags stored in the smoother ensemble. While in the call toPDAF_initthe maximum lag for the smoother is set, not all possible lags are using at the beginning of the assimilations.maxlagsays how many times were already smoothed. Both values are usually identical for the offline mode.status: Status flag. 0 for successful exit.
Important:
- Because
sens_pointeris a pointer, the call toPDAF_set_smootherensneeds an explicit Fortran interface. This is provided by the Fortran modulePDAF_interfaces_module. In the header part of the routine that callsPDAF_set_smootherensone has to includeuse PDAF_interfaces_module!
Notes:
PDAF_set_smootherensis typically called in the initialization phase of PDAF. It was to be called after the basic initialization of PDAF inPDAF_init. A possible location is to callPDAF_set_smootherensis the ensemble initialization routineU_init_ens.- The first two indices of
sens_pointerare identical to those in the ensemble arrayens_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 arraysens_pointeranalogous to the ensemble arrayens_p.
