Skip to content

Commit 12f6eb9

Browse files
Setting axis metadata for time
1 parent 546625c commit 12f6eb9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/virtualship/expedition/input_data.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ def _load_ship_fieldset(cls, directory: Path) -> FieldSet:
105105
ds["bathymetry"] = -ds["bathymetry"]
106106
ds["depth"] = -ds["depth"]
107107
ds = ds.rename({"so": "S", "thetao": "T"})
108+
ds.time.attrs["axis"] = "T"
108109
fieldset = FieldSet.from_copernicusmarine(ds)
109110
return fieldset
110111

@@ -182,6 +183,7 @@ def _load_drifter_fieldset(cls, directory: Path) -> FieldSet:
182183
}
183184
ds = xr.open_mfdataset([filenames["U"], filenames["T"]])
184185
ds = ds.rename({"thetao": "T"})
186+
ds.time.attrs["axis"] = "T"
185187
fieldset = FieldSet.from_copernicusmarine(ds)
186188
return fieldset
187189

0 commit comments

Comments
 (0)