Version 3 (modified by 12 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_smmotherens
one 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_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.status
: Status flag. 0 for successful exit.
Important:
- Because
sens_pointer
is a pointer, the call toPDAF_get_smootherens
needs an explicit Fortran interface. This is provided by the Fortran modulePDAF_interfaces_module
. In the header part of the routine that callsPDAF_get_smootherens
one has to includeuse PDAF_interfaces_module
!
Notes:
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.- The first two indices of
sens_pointer
are 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_pointer
analogous to the ensemble arrayens_p
. - For an example using
PDAF_get_smootherens
see 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_smmotherens
one 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_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.status
: Status flag. 0 for successful exit.
Important:
- Because
sens_pointer
is a pointer, the call toPDAF_set_smootherens
needs an explicit Fortran interface. This is provided by the Fortran modulePDAF_interfaces_module
. In the header part of the routine that callsPDAF_set_smootherens
one has to includeuse PDAF_interfaces_module
!
Notes:
PDAF_set_smootherens
is 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_smootherens
is the ensemble initialization routineU_init_ens
.- The first two indices of
sens_pointer
are 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_pointer
analogous to the ensemble arrayens_p
.