| Version 2 (modified by , 11 years ago) ( diff ) |
|---|
next_observation_pdaf
The page document the user-supplied call-back routine next_observation_pdaf.
The routine init_ens_pdaf (called U_init_ens in the PDAF core routines) is a call-back routine that has to be provided by the user. init_ens_pdaf is called by PDAF_init at the initialization stage of a data assimilation program. The purpose of the routine is to fill the ensemble array that is provided by PDAF with an initial ensemble of model states.
The routine next_observation_pdaf (called U_next_observation in the PDAF core routines) is a call-back routine that has to be provided by the user. At the beginning of a forecast phase, next_observation_pdaf is called once by either PDAF_get_state or PDAF_assimilate_X (with X being the name of a filter algorithm) to get the number of time steps to be computed in the forecast phase.
The interface is the following:
SUBROUTINE next_observation_pdaf(stepnow, nsteps, doexit, timenow)
with
stepnow:integer, intent(in)
Number of the current time stepnsteps:integer, intent(out)
Number of time steps until next observations are availabledoexit:integer, intent(out)
Whether to exit forecasting (1 for exit); only relevant for the 'flexible' implementation variant.timenow:real, intent(out)
Current model (physical) time at the beginning of the current forecast phase; only relevant for the 'flexible' implementation variant.
Notes:
- The routine is called by all processes in a parallel program
- The variable
timenowis only passed through PDAF to other user-supplied routines. It can be useful, e.g. to reset model forcing, which is time-specific
Some hints:
- If the time interval between successive observations is known,
nstepscan be simply initialized by dividing the time interval by the size of the time step - At the first call to
next_observation_pdafthe variabletimenowcan be initialized with the current model time. At the next call a forecast phase has been completed. Thus, the new value oftimenowfollows from the time interval for the previous forecast phase.
