Version 3 (modified by 20 months ago) (diff) | ,
---|
U_next_observation
The page document the user-supplied call-back routine U_next_observation
.
The routine U_next_observation
is a call-back routine that has to be provided by the user. In the simplified interface the predefined name of the routine is next_observation_pdaf
, but in the full interface, the user can choose the name of the routine. At the beginning of a forecast phase, U_next_observation
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 U_next_observation(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; set =0 for 'fully parallel' 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
timenow
is 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,
nsteps
can be simply initialized by dividing the time interval by the size of the time step - At the first call to
U_next_observation
the variabletimenow
can be initialized with the current model time. At the next call a forecast phase has been completed. Thus, the new value oftimenow
follows from the time interval for the previous forecast phase. doexit
is not relevant for the fully-parallel implementation. It is recommended to setdoexit=0
. In this case the data assimilation process will just end when the model integrations are completed.- If
nsteps=0
ordoexit=1
is set, the ensemble state will not be distributed by PDAF (i.e.distribute_state
is not called). If one intends to proceed with ensemble forecasting, one has to set nsteps to a value >0 anddoexit=0
. If nsteps is set to a value larger than the last time step of the model no further analysis step will be performed.