I added an xfailing test for this:
https://github.com/OpenDrift/trajan/blob/main/tests/test_read_sfy.py#L33
|
def timestep(self, average=np.nanmedian): |
Traj2d.timestep uses
np.diff(self.ds.time, axis=1)
but we should instead use dimension names here (the failing SFY dataset has only one axis).
Also, would it not be better if Traj1d.timestep and Traj2d.timestep returned timedeltas instead of seconds?
I added an xfailing test for this:
https://github.com/OpenDrift/trajan/blob/main/tests/test_read_sfy.py#L33
trajan/trajan/traj2d.py
Line 30 in dc6f354
Traj2d.timestep uses
np.diff(self.ds.time, axis=1)but we should instead use dimension names here (the failing SFY dataset has only one axis).
Also, would it not be better if Traj1d.timestep and Traj2d.timestep returned timedeltas instead of seconds?