Changes between Version 9 and Version 10 of OMI_debugging


Ignore:
Timestamp:
Feb 21, 2023, 3:59:26 PM (14 months ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OMI_debugging

    v9 v10  
    113113     REAL, ALLOCATABLE :: ivar_obs_l(:)   !< Inverse variance of local observations
    114114     INTEGER :: locweight                 !< Specify localization function
    115      REAL :: lradius                      !< localization radius
     115     REAL :: cradius                      !< localization cut-off radius
    116116     REAL :: sradius                      !< support radius for localization function
    117117  END TYPE obs_l
     
    120120=== Example output ===
    121121
    122 For illustration we insert the above call to PDAFomi_set_debug flag into `init_dim_obs_l_pdafomi` in `tutorial/online_2D_serialmodel_omi/`. then we compile and execute the tutorial program with:
    123 {{{
    124   mpirun -np 4 ./model_pdaf -dim_ens 4 -filtertype 7 -cradius 5 -locweight 2 -assim_B .true. -assim_A .false.
    125 }}}
    126 With these settings only observation type B is activated, which are just 3 values in the model domain
     122For illustration we insert the above call to PDAFomi_set_debug flag into the routine `init_dim_obs_l_pdafomi` the file `callback_obs_pdafomi.F90` in `tutorial/online_2D_serialmodel/`. then we compile and execute the tutorial program with:
     123{{{
     124  mpirun -np 4 ./model_pdaf -dim_ens 4 -filtertype 7 -cradius 5 -locweight 2
     125}}}
    127126
    128127The first lines of the debugging output looks like this:
     
    133132 ++ OMI-debug init_dim_obs_l:          10   Re-init dim_obs_l=0
    134133 ++ OMI-debug init_dim_obs_l:          10   coords_l   1.0000000000000000        10.000000000000000     
     134 ++ OMI-debug init_dim_obs_l:          10   Note: Please ensure that coords_l and observation coordinates have the same unit
    135135 ++ OMI-debug cnt_dim_obs_l:           10   thisobs%ncoord           2
    136  ++ OMI-debug cnt_dim_obs_l:           10   thisobs_l%lradius   5.0000000000000000     
     136 ++ OMI-debug cnt_dim_obs_l:           10   thisobs_l%cradius   5.0000000000000000     
    137137 ++ OMI-debug cnt_dim_obs_l:           10   Check for observations within radius
    138138 ++ OMI-debug comp_dist2:              10   compute Cartesian distance
    139139 ++ OMI-debug cnt_dim_obs_l:           10   valid observation with coordinates   5.0000000000000000        8.0000000000000000     
     140 ++ OMI-debug cnt_dim_obs_l:           10   valid observation with coordinates   5.0000000000000000        12.000000000000000     
    140141 ++ OMI-debug:           10    PDAFomi_init_dim_obs_l -- initialize local observation arrays
    141142 ++ OMI-debug comp_dist2:              10   compute Cartesian distance
    142  ++ OMI-debug init_dim_obs_l:          10   thisobs_l%dim_obs_l           1
    143  ++ OMI-debug init_dim_obs_l:          10   thisobs_l%id_obs_l           1
    144  ++ OMI-debug init_dim_obs_l:          10   thisobs_l%distance_l   4.4721359549995796     
     143 ++ OMI-debug init_dim_obs_l:          10   thisobs_l%dim_obs_l           2
     144 ++ OMI-debug init_dim_obs_l:          10   thisobs_l%id_obs_l           2           3
     145 ++ OMI-debug init_dim_obs_l:          10   thisobs_l%distance_l   4.4721359549995796        4.4721359549995796     
    145146 ++ OMI-debug:           10 PDAFomi_init_dim_obs_l -- END
    146147}}}
     
    158159 ++ OMI-debug init_dim_obs_l:          10   Re-init dim_obs_l=0
    159160}}}
    160 show that debugging output for PDAFomi_init_dim_obs_l is shown. Most routines show such a 'START' line. The second line shows that a segment of the orutine started, the counting of local observations. The third line states that dim_obs_l=0 is set. This line, as many others shows the name of the subroutine in short form without `PDAFomi` at the beginning of the line.
     161show that debugging output for PDAFomi_init_dim_obs_l is shown. Most routines show such a 'START' line. The second line shows that a segment of the routine started, the counting of local observations. The third line states that dim_obs_l=0 is set. This line, as many others shows the name of the subroutine in short form without `PDAFomi` at the beginning of the line.
    161162
    162163The following lines show variable values
     
    164165 ++ OMI-debug init_dim_obs_l:          10   coords_l   1.0000000000000000        10.000000000000000     
    165166 ++ OMI-debug cnt_dim_obs_l:           10   thisobs%ncoord           2
    166  ++ OMI-debug cnt_dim_obs_l:           10   thisobs_l%lradius   5.0000000000000000     
    167 }}}
    168 First we see that the coordinates `coords_l` of the grid point corresponding to domain_p=10 are (1.0, 10.0). Further we have two dimensions (thisobs%ncoord=2) and the localization radius is set to 5.0.
     167 ++ OMI-debug cnt_dim_obs_l:           10   thisobs_l%cradius   5.0000000000000000     
     168}}}
     169First, we see that the coordinates `coords_l` of the grid point corresponding to domain_p=10 are (1.0, 10.0). Further we have two dimensions (thisobs%ncoord=2) and the localization radius is set to 5.0.
    169170In the following lines
    170171{{{
     
    172173 ++ OMI-debug comp_dist2:              10   compute Cartesian distance
    173174 ++ OMI-debug cnt_dim_obs_l:           10   valid observation with coordinates   5.0000000000000000        8.0000000000000000     
    174 }}}
    175 the it is checked which observations lie within the distance thisobs_l%lradius=5.0 from coords_l=(1.0, 5.0). One observation with coordinates (5.0, 8.0) is found. The followign lines
     175 ++ OMI-debug cnt_dim_obs_l:           10   valid observation with coordinates   5.0000000000000000        12.000000000000000 
     176}}}
     177it is checked which observations lie within the distance thisobs_l%cradius=5.0 from coords_l=(1.0, 10.0). Two observations with coordinates (5.0, 8.0) and (5.0, 12.0) are found. The following lines
    176178{{{
    177179 ++ OMI-debug:           10    PDAFomi_init_dim_obs_l -- initialize local observation arrays
    178180 ++ OMI-debug comp_dist2:              10   compute Cartesian distance
    179  ++ OMI-debug init_dim_obs_l:          10   thisobs_l%dim_obs_l           1
    180  ++ OMI-debug init_dim_obs_l:          10   thisobs_l%id_obs_l           1
    181  ++ OMI-debug init_dim_obs_l:          10   thisobs_l%distance_l   4.4721359549995796     
    182 }}}
    183 show that observation arrays are initialized. A Cartesian distance is computerd. `thisobs_l%dim_obs_l` confirms that one local observation was found and it's the first element of the full observation vector (thisobs_l%id_obs_l=1) and the distance is thisobs_l%distance_l=4.4721359549995796.
    184 
    185 One could now compare this with the input information. Are the values of coords_l correct? Are the coordinates those of the first observation (5.0, 8.0)?
     181 ++ OMI-debug init_dim_obs_l:          10   thisobs_l%dim_obs_l           2
     182 ++ OMI-debug init_dim_obs_l:          10   thisobs_l%id_obs_l           2           3
     183 ++ OMI-debug init_dim_obs_l:          10   thisobs_l%distance_l   4.4721359549995796        4.4721359549995796     
     184}}}
     185show that observation arrays are initialized. A Cartesian distance is computrd. `thisobs_l%dim_obs_l` confirms that 2 local observation were found and they are the elements 2 and 3 of the full observation vector (thisobs_l%id_obs_l= (2, 3)) and the distances are thisobs_l%distance_l=(4.4721359549995796, 4.4721359549995796)
     186
     187One could now compare this with the input information. Are the values of coords_l correct? Are the coordinates shown those of the second and third observation?
    186188
    187189Later in the debugging output (not shown above) we find, for example,
    188190{{{
    189191 ++ OMI-debug:           10    PDAFomi_init_obs_l -- Get local vector of observations
    190  ++ OMI-debug g2l_obs:                 10   thisobs%id_obs_l           1
    191  ++ OMI-debug g2l_obs:                 10   obs_l -0.98253999999999997     
     192 ++ OMI-debug g2l_obs:                 10   thisobs_l%id_obs_l           2           3
     193 ++ OMI-debug g2l_obs:                 10   obs_l -0.84588099999999999       -1.5201499999999999     
    192194 ++ OMI-debug:           10    PDAFomi_init_obs_l -- Get local vector of inverse obs. variances
    193  ++ OMI-debug g2l_obs:                 10   thisobs%id_obs_l           1
    194  ++ OMI-debug g2l_obs:                 10   obs_l   4.0000000000000000     
    195 }}}
    196 These lines are from the internal routine `PDAFomi_init_obs_l`, which initializes the local vector of observations. (This is functionality also existing in the 'traditional' form of implementing the observation. The documention page about [wiki:init_obs_l_pdaf init_obs_l_pdaf] explains what is done here.) Important is that not only the local observation vector (a single value) is initialized, but also the inverse observation variance (4.0 in this example).
     195 ++ OMI-debug g2l_obs:                 10   thisobs_l%id_obs_l           2           3
     196 ++ OMI-debug g2l_obs:                 10   obs_l   4.0000000000000000        4.0000000000000000   
     197}}}
     198These lines are from the internal routine `PDAFomi_init_obs_l`, which initializes the local vector of observations. (This is functionality also existing in the 'traditional' form of implementing the observation handling. The documention page about [wiki:init_obs_l_pdaf init_obs_l_pdaf] explains what is done here.) Important is that not only the local observation vector (two values) is initialized, but also the inverse observation variance (4.0 in this example).
    197199
    198200Similarly
    199201{{{
    200202 ++ OMI-debug:           10 PDAFomi_g2l_obs -- START Get local observed ensemble member           1
    201  ++ OMI-debug g2l_obs:                 10   thisobs%id_obs_l           1
    202  ++ OMI-debug g2l_obs:                 10   obs_l  0.12725110911115362     
     203 ++ OMI-debug g2l_obs:                 10   thisobs_l%id_obs_l           2           3
     204 ++ OMI-debug g2l_obs:                 10   obs_l -0.53940120224649080       0.56425243172725248     
    203205 ++ OMI-debug:           10 PDAFomi_g2l_obs -- END
    204206}}}
    205 shows the localization of ensemble member 1. This is performed in the interval routine `PDAFomi_g2l_obs` (see the page about [wiki:g2l_obs_pdaf g2l_obs_pdaf]). There is analogous output for all of the 4 ensemble states.
    206 
    207 
     207shows the localization of the observed ensemble member 1. This is performed in the internal routine `PDAFomi_g2l_obs` (see the page about [wiki:g2l_obs_pdaf g2l_obs_pdaf]). There is analogous output for all of the 4 ensemble states.
     208
     209