Skip to content

Commit c7c4a59

Browse files
committed
Revert "Using private grid._depth for negating depth (#75)"
This reverts commit 6f843e9.
1 parent 6f843e9 commit c7c4a59

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/virtualship/expedition/input_data.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,7 @@ def _load_default_fieldset(cls, directory: str | Path) -> FieldSet:
9797

9898
# make depth negative
9999
for g in fieldset.gridset.grids:
100-
g._depth = (
101-
-g._depth
102-
) # TODO maybe add a grid.negate_depth() method in Parcels?
100+
g.depth = -g.depth
103101

104102
# add bathymetry data
105103
bathymetry_file = directory.joinpath("bathymetry.nc")
@@ -139,7 +137,7 @@ def _load_drifter_fieldset(cls, directory: str | Path) -> FieldSet:
139137

140138
# make depth negative
141139
for g in fieldset.gridset.grids:
142-
g._depth = -g._depth
140+
g.depth = -g.depth
143141

144142
# read in data already
145143
fieldset.computeTimeChunk(0, 1)
@@ -171,7 +169,7 @@ def _load_argo_float_fieldset(cls, directory: str | Path) -> FieldSet:
171169
# make depth negative
172170
for g in fieldset.gridset.grids:
173171
if max(g.depth) > 0:
174-
g._depth = -g._depth
172+
g.depth = -g.depth
175173

176174
# read in data already
177175
fieldset.computeTimeChunk(0, 1)

0 commit comments

Comments
 (0)