Version 7 (modified by 4 years ago) (diff) | ,
---|
PDAF-OMI: The file callback_obs_pdafomi.F90
Contents of this page
The file callback_obs_pdafomi.F90
contains are those routines that are directly called by PDAF as call-back routines. In the example codes we use all routines with the suffix _pdafomi to distinguish them from routine from existing implementation where the suffix is typically _pdaf.
The file templates/omi/callback_obs_pdafomi.F90
provides a template for implementing the routines. A compact example canbe found in tutorial/online_2D_serialmodel_omi/
.
As mentioned in the OMI introduction, the routines are mainly pass-through routines. Thus, one typically includes the observation-specific routine with ‘use’ and then calls this routine. However, the is small additional functionality in the different routines which has to be handles when implementing the routine or adding an observation type
init_dim_obs_pdafomi
In this routine we declare a dimension variable
dim_obs_TYPE
for each observation type. This is initialized by the corresponding routineinit_dim_obs_TYPE
. The sum of these individual dimension yields the total number of observations, which is returned to PDAF.
The implementation steps are:
- Include the observation-specific routine
init_dim_obs_TYPE
and the variableassim_TYPE
from the observation-module with 'use' - Declare a dimension variable
dim_obs_TYPE
and initialize it to 0 - Add a call to the observation-specific routine init_dim_obs_TYPE with the condition
IF (assim_TYPE)
- add
dim_obs_TYPE
to the final sum computingdim_obs
.
Notes:
- The variable
assim_TYPE
indicates whether a particular observation type is assimilated. It is usually defined in init_pdaf, or by reading from the command line or a namelist file. - The observation-module can have either a specific name for
init_dim_obs_TYPE
or a generic name. If the generic nameinit_dim_obs
is used one can apply a name conversioninit_dim_obs_TYPE => init_dim_obs
.
obs_op_pdafomi
In this routine one just calls obs_op_TYPE
for each observation type.
The implementation steps are:
- Include the observation-specific routine
obs_op_TYPE
from the observation-module with 'use' - Add a call to the observation-specific routine obs_op_TYPE
Notes:
- The order of the calls to
obs_op_TYPE
is not relevant because the setup of the overall full observation vector is defined by the order of the calls in init_dim_obs_pdafomi. Anyway, it's good practive to keep the order of the calls consistent.
init_dim_obs_l_pdafomi
In this routine one just calls init_dim_obs_l_TYPE
for each observation type.
The implementation steps are:
- Include the observation-specific routine
init_dim_obs_l_TYPE
from the observation-module with 'use' - Add a call to the observation-specific routine init_dim_obs_l_TYPE
localize_covar_pdafomi
In this routine one calls localize_covar_TYPE
for each observation type. The routine performs covariance localization for the localized EnKF.
The implementation steps are:
- Include the observation-specific routine
localize_covar_TYPE
from the observation-module with 'use' - Initialize the array
coords
which holds the coordinates of all elements of the state vector for the current process domain - Add a call to the observation-specific routine localize_covar_TYPE
deallocate_obs_pdafomi
The file callback_obs_pdafomi.F90 also contains a routine deallocate_obs_pdafomi. Each obs-module allocates arrays in the observation type obs_f
and deallocate_obs_pdafomi
is used to deallocate the different observation-specific arrays after the analysis step.
The implementation steps are:
- Include the observation-specific type
thisobs
from the observation-module with 'use' apply a name conversion likeobs_TYPE => thisobs
- add a call to
PDAFomi_deallocate_obs
giving the observation-specificobs_TYPE
as argument. - To perform the deallocation, insert a call to deallocate_obs_pdafomi at the end of the routine
prepoststep_pdaf
.