Skip to content

Commit

Permalink
Fixed elif statement
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiaraMonforte committed Nov 5, 2024
1 parent 9a90894 commit 65089ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion glidertest/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ def ramsey_binavg(ds, var='VERT_CURR', zgrid=None, dz=None):
# Calculate depth from pressure using gsw
if 'DEPTH_Z' in ds:
depth = ds.DEPTH_Z.values
elif 'DEPTH_Z' not in ds:
elif 'LATITUDE' in ds:
latmean = np.nanmean(ds.LATITUDE)
depth = gsw.z_from_p(press, lat=latmean) # Assuming latitude is 0, adjust as necessary
else:
Expand Down

0 comments on commit 65089ad

Please sign in to comment.