-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The PointNetcdf-reader can't read an OPeNDAP link:
import dnora as dn
model = dn.modelrun.ModelRun(year=2022, month=11, day=1)
model.import_spectra(filename='https://thredds.met.no/thredds/dodsC/norac_wave/spec/ww3_spec.202211.nc', convention='ww3')
Area: lon: (0.0, 0.0), lat: (0.0, 0.0)
2022-11-01 00:00:00 - 2022-11-01 23:00:00
---------------------------------------------------------------------------
Trivial (PointPicker): Choosing points to import...
---------------------------------------------------------------------------
Traceback (most recent call last):
File "/home/janvb/Documents/pycode/dnora_v2_checks/plot_ww3_spectra_from_file.py", line 3, in <module>
model.import_spectra(filename='https://thredds.met.no/thredds/dodsC/norac_wave/spec/ww3_spec.202211.nc', convention='ww3')
File "/home/janvb/miniforge3/envs/dnora/lib/python3.10/site-packages/dnora/cacher/cache_decorator.py", line 58, in wrapper
import_method(**kwargs)
File "/home/janvb/miniforge3/envs/dnora/lib/python3.10/site-packages/dnora/modelrun/modelrun.py", line 475, in import_spectra
self._import_data(
File "/home/janvb/miniforge3/envs/dnora/lib/python3.10/site-packages/dnora/modelrun/modelrun.py", line 351, in _import_data
obj = import_data(
File "/home/janvb/miniforge3/envs/dnora/lib/python3.10/site-packages/dnora/modelrun/import_functions.py", line 49, in import_data
inds = pick_points(
File "/home/janvb/miniforge3/envs/dnora/lib/python3.10/site-packages/dnora/modelrun/import_functions.py", line 180, in pick_points
available_points = reader.get_coordinates(
File "/home/janvb/miniforge3/envs/dnora/lib/python3.10/site-packages/dnora/read/generic/generic_readers.py", line 93, in get_coordinates
ds = xr.open_dataset(filepath[0])
IndexError: list index out of range
Expected outcome:
The readers reads all points from the file behind the OPeNDAP link
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working