Changes between Version 9 and Version 10 of OMI_debugging
- Timestamp:
- Feb 21, 2023, 3:59:26 PM (21 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OMI_debugging
v9 v10 113 113 REAL, ALLOCATABLE :: ivar_obs_l(:) !< Inverse variance of local observations 114 114 INTEGER :: locweight !< Specify localization function 115 REAL :: lradius !< localizationradius115 REAL :: cradius !< localization cut-off radius 116 116 REAL :: sradius !< support radius for localization function 117 117 END TYPE obs_l … … 120 120 === Example output === 121 121 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 122 For 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 }}} 127 126 128 127 The first lines of the debugging output looks like this: … … 133 132 ++ OMI-debug init_dim_obs_l: 10 Re-init dim_obs_l=0 134 133 ++ 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 135 135 ++ OMI-debug cnt_dim_obs_l: 10 thisobs%ncoord 2 136 ++ OMI-debug cnt_dim_obs_l: 10 thisobs_l% lradius 5.0000000000000000136 ++ OMI-debug cnt_dim_obs_l: 10 thisobs_l%cradius 5.0000000000000000 137 137 ++ OMI-debug cnt_dim_obs_l: 10 Check for observations within radius 138 138 ++ OMI-debug comp_dist2: 10 compute Cartesian distance 139 139 ++ 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 140 141 ++ OMI-debug: 10 PDAFomi_init_dim_obs_l -- initialize local observation arrays 141 142 ++ OMI-debug comp_dist2: 10 compute Cartesian distance 142 ++ OMI-debug init_dim_obs_l: 10 thisobs_l%dim_obs_l 1143 ++ OMI-debug init_dim_obs_l: 10 thisobs_l%id_obs_l 1144 ++ 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 145 146 ++ OMI-debug: 10 PDAFomi_init_dim_obs_l -- END 146 147 }}} … … 158 159 ++ OMI-debug init_dim_obs_l: 10 Re-init dim_obs_l=0 159 160 }}} 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.161 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 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. 161 162 162 163 The following lines show variable values … … 164 165 ++ OMI-debug init_dim_obs_l: 10 coords_l 1.0000000000000000 10.000000000000000 165 166 ++ OMI-debug cnt_dim_obs_l: 10 thisobs%ncoord 2 166 ++ OMI-debug cnt_dim_obs_l: 10 thisobs_l% lradius 5.0000000000000000167 }}} 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 }}} 169 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. 169 170 In the following lines 170 171 {{{ … … 172 173 ++ OMI-debug comp_dist2: 10 compute Cartesian distance 173 174 ++ 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 }}} 177 it 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 176 178 {{{ 177 179 ++ OMI-debug: 10 PDAFomi_init_dim_obs_l -- initialize local observation arrays 178 180 ++ OMI-debug comp_dist2: 10 compute Cartesian distance 179 ++ OMI-debug init_dim_obs_l: 10 thisobs_l%dim_obs_l 1180 ++ OMI-debug init_dim_obs_l: 10 thisobs_l%id_obs_l 1181 ++ 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 comput erd. `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 }}} 185 show 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 187 One 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? 186 188 187 189 Later in the debugging output (not shown above) we find, for example, 188 190 {{{ 189 191 ++ OMI-debug: 10 PDAFomi_init_obs_l -- Get local vector of observations 190 ++ OMI-debug g2l_obs: 10 thisobs %id_obs_l 1191 ++ OMI-debug g2l_obs: 10 obs_l -0. 98253999999999997192 ++ OMI-debug g2l_obs: 10 thisobs_l%id_obs_l 2 3 193 ++ OMI-debug g2l_obs: 10 obs_l -0.84588099999999999 -1.5201499999999999 192 194 ++ OMI-debug: 10 PDAFomi_init_obs_l -- Get local vector of inverse obs. variances 193 ++ OMI-debug g2l_obs: 10 thisobs %id_obs_l 1194 ++ 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 }}} 198 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 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). 197 199 198 200 Similarly 199 201 {{{ 200 202 ++ OMI-debug: 10 PDAFomi_g2l_obs -- START Get local observed ensemble member 1 201 ++ OMI-debug g2l_obs: 10 thisobs %id_obs_l 1202 ++ OMI-debug g2l_obs: 10 obs_l 0.12725110911115362203 ++ OMI-debug g2l_obs: 10 thisobs_l%id_obs_l 2 3 204 ++ OMI-debug g2l_obs: 10 obs_l -0.53940120224649080 0.56425243172725248 203 205 ++ OMI-debug: 10 PDAFomi_g2l_obs -- END 204 206 }}} 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 207 shows 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