diff --git a/environment.yml b/environment.yml index bf9f7d82..994ab6cf 100644 --- a/environment.yml +++ b/environment.yml @@ -3,7 +3,7 @@ channels: - conda-forge dependencies: - click - - parcels >= 3, < 4 + - parcels >3, <3.1.0 - pyproj >= 3, < 4 - sortedcontainers == 2.4.0 - opensimplex == 0.4.5 diff --git a/pyproject.toml b/pyproject.toml index 0aded55a..f270fb35 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ classifiers = [ ] dependencies = [ "click", - "parcels >= 3, < 4", + "parcels >3, <3.1.0", "pyproj >= 3, < 4", "sortedcontainers == 2.4.0", "opensimplex == 0.4.5", diff --git a/src/virtualship/expedition/input_data.py b/src/virtualship/expedition/input_data.py index a280c477..7af9ef72 100644 --- a/src/virtualship/expedition/input_data.py +++ b/src/virtualship/expedition/input_data.py @@ -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") @@ -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) @@ -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)