Skip to content

Commit fc04825

Browse files
committed
Fix misordered time dimension
1 parent 0b13488 commit fc04825

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/access_mopper/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ def _preprocess(ds):
6363
preprocess=_preprocess,
6464
parallel=True, # <--- enables concurrent preprocessing
6565
)
66+
# Sort data slice by time
67+
self.ds = self.ds.sortby("time")
68+
# Clean up potential duplication
69+
self.ds = self.ds.sel(time=~self.ds.get_index("time").duplicated())
6670

6771
def select_and_process_variables(self):
6872
raise NotImplementedError(

0 commit comments

Comments
 (0)