Closed calquigs closed 4 months ago
I have never used this reader myself, but it seems it has been converted from originally using netCDF4.Dataset to using Xarray, but forgetting to update these few lines that are executed whenever there is a depth variable present.
Thus you can try to change 'positive' not in var.ncattrs()
to 'positive' not in var.attrs
and var.__dict__['positive'] == 'up'
to var.attrs['positive'] == 'up'
in the line below.
If it solves the problem, you are welcome to make a pull request, or I can update this directly on master.
Problem fixed and pull request made. Thank you!
Hello! I am trying to run a simulation in a schism model, but I get an error when reading in the files with the native_schism_reader.
from opendrift.readers import reader_schism_native, reader = reader_schism_native.Reader(path)
throws:Any idea where the issue might be? Happy to share an example model file.