File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
src/py_eddy_tracker/dataset Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ Changed
14
14
Fixed
15
15
^^^^^
16
16
17
+ - Check strictly increasing coordinates for RegularGridDataset.
18
+
17
19
Added
18
20
^^^^^
19
21
Original file line number Diff line number Diff line change @@ -1193,6 +1193,10 @@ def setup_coordinates(self):
1193
1193
raise Exception (
1194
1194
"Coordinates in RegularGridDataset must be 1D array, or think to use UnRegularGridDataset"
1195
1195
)
1196
+ dx = self .x_bounds [1 :] - self .x_bounds [:- 1 ]
1197
+ dy = self .y_bounds [1 :] - self .y_bounds [:- 1 ]
1198
+ if (dx < 0 ).any () or (dy < 0 ).any ():
1199
+ raise Exception ("Coordinates in RegularGridDataset must be strictly increasing" )
1196
1200
self ._x_step = (self .x_c [1 :] - self .x_c [:- 1 ]).mean ()
1197
1201
self ._y_step = (self .y_c [1 :] - self .y_c [:- 1 ]).mean ()
1198
1202
You can’t perform that action at this time.
0 commit comments