Changes between Version 1 and Version 2 of OMI_observation_modules


Ignore:
Timestamp:
Nov 23, 2020, 10:19:33 AM (3 years ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OMI_observation_modules

    v1 v2  
    1010 - obs_op applies the observation operator to a state vector. One can call an observation operator routine provided by PDAF, or one can to implement a new operator.
    1111 - init_dim_obs_l calls a PDAF-OMI routine to initialize the observation information corresponding to a local analysis domain. One can set localization parameters, liek the localization radius, for each observation type.
    12  - localize_covar calls a PDAF-OMI routine to apply covariance localization. One can set localization parameters, liek the localization radius, for each observation type.
     12 - localize_covar calls a PDAF-OMI routine to apply covariance localization. One can set localization parameters, like the localization radius, for each observation type.
     13
     14The template file obs_TYPE_pdafomi_TEMPLATE.F90 shows the different steps needed when implementing these routines. The main work is to implement `init_dim_obs`, while the other routines mainly call a subroutine provided by PDAF-OMI.
     15
     16In the obs-module the subroutines are named according to the observation type. The template file uses generic names which can be replaced by the user. Having distinct names for each observation type is relevant to include the subroutine from the module in the call-back routine with ‘use’. In the header of each obs-module, the user can declare further variables, e.g. assim_TYPE as a flag to control whether the observation type should be assimilated.
    1317
    1418== obs_f data type ==
    1519
    16 To ensure the functionality within each obs-module, we rely on a derived data type called `obs_f` that describes the observation. One instance of this data type is allocated in each obs-module as the variable `thisobs`. a few of the elements of `obs_f` are initialized by the user when the observation information is initialized on `init_dim_obs_f`. Further information is set in a call to the routine `PDAFomi_gather_obs`. This information is then used by all other routines in the obs-module. The template file obs_TYPE_pdafomi_TEMPLATE.F90 shows the different steps needed to initialize thisobs.
     20To ensure the functionality within each obs-module, we rely on a derived data type called `obs_f` that describes the observation. One instance of this data type is allocated in each obs-module as the variable `thisobs`. a few of the elements of `obs_f` are initialized by the user when the observation information is initialized on `init_dim_obs_f`. Further variables is set in a call to the routine `PDAFomi_gather_obs`. This information is then used by all other routines in the obs-module. The template file obs_TYPE_pdafomi_TEMPLATE.F90 shows the different steps needed to initialize thisobs.
    1721
     22The '''mandatory variables''' in `obs_f` that need to be set by the user are:
    1823{{{
    19 ! ---- Mandatory variables to be set in init_dim_obs_f ----
    20   INTEGER :: doassim                    ! Whether to assimilate this observation type
    21   INTEGER :: disttype                   ! Type of distance computation to use for localization
    22                                         !   (0) Cartesian, (1) Cartesian periodic
    23                                         !   (2) simplified geographic, (3) geographic haversine function
    24   INTEGER :: ncoord                     ! Number of coordinates use for distance computation
    25   INTEGER, ALLOCATABLE :: id_obs_p(:,:) ! Indices of observed field in state vector (process-local)
     24  TYPE obs_f
     25     ! ---- Mandatory variables to be set in INIT_DIM_OBS ----
     26     INTEGER :: doassim=0                 !< Whether to assimilate this observation type
     27     INTEGER :: disttype                  !< Type of distance computation to use for localization
     28                                          !   (0) Cartesian, (1) Cartesian periodic
     29                                          !   (2) simplified geographic, (3) geographic haversine function
     30     INTEGER :: ncoord                    !< Number of coordinates use for distance computation
     31     INTEGER, ALLOCATABLE :: id_obs_p(:,:) !< Indices of process-local observed field in state vector
     32     ...
     33  END TYPE obs_f
    2634}}}
    2735
     36In addition there are '''optional variables''' that the be used:
     37{{{
     38  TYPE obs_f
     39     ...
     40     ! ---- Optional variables - they can be set in INIT_DIM_OBS ----
     41     REAL, ALLOCATABLE :: icoeff_p(:,:)   !< Interpolation coefficients for obs. operator (optional)
     42     REAL, ALLOCATABLE :: domainsize(:)   !< Size of domain for periodicity (<=0 for no periodicity) (optional)
    2843
     44     ! ---- Variables with predefined values - they can be changed in INIT_DIM_OBS  ----
     45     INTEGER :: obs_err_type=0            !< Type of observation error: (0) Gauss, (1) Laplace
     46     INTEGER :: use_global_obs=1          !< Whether to use (1) global full obs.
     47                                          !< or (0) obs. restricted to those relevant for a process domain
     48     ...
     49  END TYPE obs_f
     50}}}
     51
     52Apart from these variables, there is a number of variables that are set internally when the routine `PDAFomi_gather_obs` is called.
     53
     54
     55Next to the derived data type `obs_f`, there is a derived type `obs_l` for localization. This is only used internally. It will be filled in init_dim_obs_l when calling PDAFomi_init_dim_obs_l.
     56
     57== init_dim_obs_TYPE ==
     58
     59
     60
     61== obs_op_TYPE ==
     62
     63This routine applies the observation operator to a state vector. It returns the observed state vector to PDAF. The routine is used by all filters.
     64
     65PDAF-OMI provides several observation operators. For example the observation operator for observations that are grid point values is called as:
     66{{{
     67    CALL PDAFomi_obs_op_gridpoint(thisobs, state_p, ostate)
     68}}}
     69
     70Here, `state_p` is the state vector and `ostate` is the observed state vector.
     71
     72For more information on the available observation operator and on how to implement your own observation operator see the [wiki:OMI_Observation_Operators documentation of observation operators for OMI].
     73
     74
     75== init_dim_obs_l_TYPE ==
     76
     77This routine initializes local observation information. The routine is only used by the domain-localized filters (LESTKF, LETKF, LSEIK, LNETF).
     78
     79For the initialization the following routine is called:
     80{{{
     81    CALL PDAFomi_init_dim_obs_l(thisobs_l, thisobs, coords_l, &
     82         locweight, local_range, srange, dim_obs_l)
     83}}}
     84
     85Here, `thisobs` and `thisobs_l` are the data-type variables `obs_f` and `obs_l`. `dim_obs_l`, the local size of the observation vector, is the direct output of the routine.
     86
     87''Implementation steps:''
     88 - Ensure that `coords_l` is filled in `init_dim_l_pdaf`
     89 - Specify the localization variables (These variables are usually set in `init_pdaf` and included with `use mod_assimilation`)
     90   - `locweight`: Type of localization (see init_pdaf)
     91   - `local_range`: The localization weight radius
     92   - `srange`: The support radius of the localization
     93 
     94
     95
     96== localize_covar_TYPE ==
     97
     98This routine initializes local observation information. The routine is only used by the local EnKF (LEnKF).
     99
     100For the initialization the following routine is called:
     101{{{
     102    CALL PDAFomi_localize_covar(thisobs, dim_p, locweight, local_range, srange, &
     103         coords_p, HP_p, HPH)
     104}}}
     105
     106Here, `thisobs` is the data-type variable `obs_f`. `HP_p` and `HPH` are the covariance matrices projected onto the observations. The localization will be applied to these variables.
     107
     108''Implementation steps:''
     109 - Ensure that `coords_p` is filled in `localize_covar_pdafomi`
     110 - Specify the localization variables (These variables are usually set in `init_pdaf` and included with `use mod_assimilation`)
     111   - `locweight`: Type of localization (see init_pdaf)
     112   - `local_range`: The localization weight radius
     113   - `srange`: The support radius of the localization