Skip to content

Commit 0d8c548

Browse files
Update parcels/fieldset.py
Co-authored-by: Erik van Sebille <[email protected]>
1 parent 6d1ae82 commit 0d8c548

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

parcels/fieldset.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ def from_copernicusmarine(ds: xr.Dataset):
237237
fields["V"].units = Geographic()
238238

239239
if "W" in ds.data_vars:
240+
ds["W"] -= ds["W"] # Negate W to convert from up positive to down positive (as that's the direction of positive depth)
240241
fields["W"] = Field("W", ds["W"], grid)
241242
fields["UVW"] = VectorField("UVW", fields["U"], fields["V"], fields["W"])
242243
else:

0 commit comments

Comments
 (0)