Skip to content

Commit

Permalink
Update reader_schism_native.py
Browse files Browse the repository at this point in the history
fixing netCDF to Xarray syntax
  • Loading branch information
calquigs authored Mar 6, 2024
1 parent 9c79d36 commit 24ac734
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opendrift/readers/reader_schism_native.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ def __init__(self, filename=None, name=None, proj4=None, use_3d = None):
self.numy = var.shape[0]
if standard_name == 'depth' or axis == 'Z':
var_data = var.values
if 'positive' not in var.ncattrs() or \
var.__dict__['positive'] == 'up':
if 'positive' not in var.attrs or \
var.attrs['positive'] == 'up':
self.z = var_data
else:
self.z = -var_data
Expand Down

0 comments on commit 24ac734

Please sign in to comment.