-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traj2d.timestep is failing #141
Comments
Yes. I also think we should return a multi dimensional array for time steps on 2d datasets. |
Ok, I will implement that. I find those time-things in Python really messy, but I guess we have no better alternative than to use |
|
In fact, we already have methods Line 38 in dc6f354
Line 42 in dc6f354
However, time_to_next() fails for the SFY dataset (bug32), since the method is hardcoded for having a dimension named We have
|
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?
The text was updated successfully, but these errors were encountered: