Changes between Initial Version and Version 1 of OMI_use_global_obs_PDAF23


Ignore:
Timestamp:
Jun 10, 2025, 10:52:43 AM (8 days ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OMI_use_global_obs_PDAF23

    v1 v1  
     1= Using thisobs%use_global_obs=0 =
     2
     3{{{
     4#!html
     5<div class="wiki-toc">
     6<h4>PDAF-OMI Guide</h4>
     7<ol><li><a href="PDAF_OMI_Overview_PDAF23">Overview</a></li>
     8<li><a href="OMI_Callback_obs_pdafomi_PDAF23">callback_obs_pdafomi.F90</a></li>
     9<li><a href="OMI_observation_modules_PDAF23">Observation Modules</a></li>
     10<li><a href="OMI_observation_operators_PDAF23">Observation operators</a></li>
     11<li><a href="OMI_error_checking_PDAF23">Checking error status</a></li>
     12<li><a href="OMI_debugging_PDAF23">Debugging functionality</a></li>
     13<li><a href="OMI_ImplementationofAnalysisStep_PDAF23">Implementing the analysis step with OMI</a></li>
     14<li><a href="OMI_nondiagonal_observation_error_covariance_matrices_PDAF23">Using nondiagonal R-matrices</a></li>
     15<li><a href="Porting_to_OMI_PDAF23">Porting an existing implemention to OMI</a></li>
     16<li><a href="PDAFomi_additional_functionality_PDAF23">Additional OMI Functionality</a></li>
     17<li>Using domain-limited observations</li>
     18</ol>
     19</div>
     20}}}
     21
     22[[PageOutline(2-3,Contents of this page)]]
     23
     24== Overview ==
     25
     26In the domain-localized filters (LESTK, LETKF, LSEIK, LNETF) observations are assimilated that are located within the localization around some grid point. When a model uses parallelization with domain-decomposition some of these observations might belong to a different process-domain. In the default mode (`thisobs%use_global_obs`=1) PDAF-OMI gathers all globally available observations so that each process has access to all observations.
     27
     28It can be more efficient to limit the observations on a process-domain to those observations that are located inside the domain or within the localization radius around it. Then, in the local analyses less observations have to be checked for their distance. Setting `thisobs%use_global_obs=0` activates this feature. However, it needs additional preparations to make PDAF-OMI aware of the limiting coordinates of a process sub-domain.
     29
     30In order to make use of the domain-limited observations, one has to provide PDAF-OMI with the limiting coordinates of a process-subdomain. There are two routines that can to this task:
     31- `PDAFomi_set_domain_limits`
     32- `PDAFomi_get_domain_limits_unstrc`
     33One of these routines has to be called in `init_pdaf` to set the domain information. Their use is described below.
     34
     35After this call, OMI is set up to use domain-limited observations with `thisobs%use_global_obs=0` (or `CALL PDAFomi_set_use_global_obs(0)` starting from PDAF V2.3.1). The necessary operation will be performed by PDAF-OMI inside `PDAFomi_gather_obs` and inside the observation operators. This feature has to be activated separately for each observation type. However, mixing the settings 0 and 1 is possible.
     36
     37'''Note:''' The domain-limitation is only implemented to work in two dimensions.
     38
     39
     40== `PDAFomi_set_domain_limits` ==
     41
     42In this routine one provide the limiting coordinates of the process domain so that PDAF-OMI can store the information.
     43
     44The interface is
     45{{{
     46  SUBROUTINE PDAFomi_set_domain_limits(lim_coords)
     47
     48    REAL, INTENT(in) :: lim_coords(2,2)     !< coordinate array (1: longitude, 2: latitude)
     49                                            !< geographic range: longitude (-pi, pi), latitude (-pi/2, pi/2)
     50                                            !< Cartesian range: (x) coordinate grows from left to right; (y) from bottom to top
     51}}}
     52here `lim_coords` are
     53{{{
     54           (2,1)
     55   (:,1)+---------+
     56        |         |           - (1,1) longitude of the western edge of the domain (or x-coordinate of the left edge)
     57        |         |           - (1,2) longitude of the eastern edge of the domain (or x-coordinate of the right edge)
     58  (1,1) |         | (1,2)     - (2,1) latitude of the northern edge of the domain (or y-coordinate of the upper edge)
     59        |         |           - (2,2) latitude of the southern edge of the domain (or y-coordinate of the lower edge)
     60        |         |
     61        +---------+(:,2)
     62           (2,2)
     63}}}
     64Thus, (:,1) specifies the north-western corner of the sub-domain and (:,2) the souther-estern corner. The first (x) coordinate grows from left to right, while the second coordinate (y) increases from bottom to the top.
     65
     66If the model grid is not decomposed in cardinal directions, but e.g. rotated, the coordinates should specife the extrema. Thus, lim_coords(1,1) would be the coordinate of the northernmost grid point of a domain.
     67
     68Note:
     69- The domain limits are coded for two dimensions, which are usually the horizontal directions. If the observations have e.g. three dimensions, the first two will be used for the domain-limitation. In case of geographic coordinates these are longituare and latitude.
     70
     71
     72== `PDAFomi_get_domain_limits_unstrc` ==
     73
     74This routine is find the extreme coordinates for a model domain. The routine is provided with the coordinates of all grid pints of a domain and then find the limiting coordinates. It is designed for unstructured grid and we have only tested it with the ocean model FESOM. (The tricky part is when a process-domain crosses the date line).
     75
     76The interface is
     77{{{
     78  SUBROUTINE PDAFomi_get_domain_limits_unstr(verbose, npoints_p, coords_p)
     79
     80    INTEGER, INTENT(in) :: verbose          !< verbosity flag (1: write output)
     81    INTEGER, INTENT(in) :: npoints_p        !< number of process-local grid points
     82    REAL, INTENT(in) :: coords_p(:,:)       !< geographic coordinate array, dimension (2, npoints_p)
     83                                            !<   (row 1: longitude, 2: latitude)
     84                                            !<   ranges: longitude (-pi, pi), latitude (-pi/2, pi/2)
     85}}}
     86
     87This function only supports geographic coordinates given in radians.