Skip to content

Commit

Permalink
Revert "Using private grid._depth for negating depth (#75)"
Browse files Browse the repository at this point in the history
This reverts commit 6f843e9.
  • Loading branch information
VeckoTheGecko committed Nov 13, 2024
1 parent 6f843e9 commit c7c4a59
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/virtualship/expedition/input_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ def _load_default_fieldset(cls, directory: str | Path) -> FieldSet:

# make depth negative
for g in fieldset.gridset.grids:
g._depth = (
-g._depth
) # TODO maybe add a grid.negate_depth() method in Parcels?
g.depth = -g.depth

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

# make depth negative
for g in fieldset.gridset.grids:
g._depth = -g._depth
g.depth = -g.depth

# read in data already
fieldset.computeTimeChunk(0, 1)
Expand Down Expand Up @@ -171,7 +169,7 @@ def _load_argo_float_fieldset(cls, directory: str | Path) -> FieldSet:
# make depth negative
for g in fieldset.gridset.grids:
if max(g.depth) > 0:
g._depth = -g._depth
g.depth = -g.depth

# read in data already
fieldset.computeTimeChunk(0, 1)
Expand Down

0 comments on commit c7c4a59

Please sign in to comment.