Skip to content

Commit 9d928d9

Browse files
committed
implement #39
1 parent 34f32e4 commit 9d928d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pydomcfg/tests/bathymetry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def _calc_rmax(depth):
163163
# |(H[0] - H[1])| / (H[0] + H[1])
164164
# First value is NaN
165165
diff = rolled.diff("tmp_dim").squeeze("tmp_dim")
166-
rmax = diff / rolled.sum("tmp_dim")
166+
rmax = np.abs(diff) / rolled.sum("tmp_dim")
167167

168168
# (rmax[0] + rmax[1]) / 2
169169
# First two values are NaN
@@ -172,6 +172,6 @@ def _calc_rmax(depth):
172172
# First and last values are zero
173173
rmax = rmax.shift({dim: -1}).fillna(0)
174174

175-
both_rmax.append(np.abs(rmax))
175+
both_rmax.append(rmax)
176176

177177
return np.maximum(*both_rmax)

0 commit comments

Comments
 (0)