Skip to content

Commit

Permalink
Per #1976, correct the mtd cdist logic by updating the old (x,y) loca…
Browse files Browse the repository at this point in the history
…tion for each loop iteration.
  • Loading branch information
JohnHalleyGotway committed Nov 19, 2021
1 parent d1d8afb commit ee9dbf4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions met/src/tools/other/mode_time_domain/3d_att.cc
Expand Up @@ -1322,16 +1322,14 @@ for (j=0,x_old=0,y_old=0; j<nt; ++j) {

mask.calc_2d_centroid_at_t(t, xbar_2d, ybar_2d);

if ( j == 0 ) {
if ( j > 0 ) {

x_old = xbar_2d;
y_old = ybar_2d;

} else {

dist += calc_2d_dist(xbar_2d, ybar_2d, x_old, y_old, *grid);

} // else
}

x_old = xbar_2d;
y_old = ybar_2d;

}

Expand Down

0 comments on commit ee9dbf4

Please sign in to comment.