Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the new grid.negate_depth() method #95

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
dependencies:
- click
- parcels >3, <3.1.0
- parcels >3.1.0
- pyproj >= 3, < 4
- sortedcontainers == 2.4.0
- opensimplex == 0.4.5
Expand Down
6 changes: 3 additions & 3 deletions src/virtualship/expedition/input_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def _load_default_fieldset(cls, directory: str | Path) -> FieldSet:

# make depth negative
for g in fieldset.gridset.grids:
g.depth = -g.depth
g.negate_depth()

# add bathymetry data
bathymetry_file = directory.joinpath("bathymetry.nc")
Expand Down Expand Up @@ -137,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.negate_depth()

# read in data already
fieldset.computeTimeChunk(0, 1)
Expand Down Expand Up @@ -169,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.negate_depth()

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