diff --git a/src/gz21_ocean_momentum/step/data/lib.py b/src/gz21_ocean_momentum/step/data/lib.py index f8f1a342..97e191fc 100644 --- a/src/gz21_ocean_momentum/step/data/lib.py +++ b/src/gz21_ocean_momentum/step/data/lib.py @@ -179,16 +179,14 @@ def _advections(u_v_field: xr.Dataset, grid_data: xr.Dataset): "xu_ocean": u_v_field.coords["xu_ocean"], "yu_ocean": u_v_field.coords["yu_ocean"], } - # TODO got "ValueError: zero-size array to reduction operation fmin which has - # no identity" when given 0 bounding box gradient_x = gradient_x.interp(interp_coords) gradient_y = gradient_y.interp(interp_coords) u, v = u_v_field["usurf"], u_v_field["vsurf"] adv_x = u * gradient_x["usurf"] + v * gradient_y["usurf"] adv_y = u * gradient_x["vsurf"] + v * gradient_y["vsurf"] result = xr.Dataset({"adv_x": adv_x, "adv_y": adv_y}) - # TODO check if we can simply prevent the previous operation from adding - # chunks + # TODO 2023-09-20: old note from original import: v + # check if we can simply prevent the previous operation from adding chunks # result = result.chunk(dict(xu_ocean=-1, yu_ocean=-1)) return result