Skip to content

Commit

Permalink
workaround for hycom test (#1054)
Browse files Browse the repository at this point in the history
  • Loading branch information
veenstrajelmer authored Jan 14, 2025
1 parent 9b7c1c5 commit 35703f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ def test_download_hycom(tmp_path):
# Path(dir_output).mkdir(parents=True, exist_ok=True)
period_range_years = pd.period_range(date_min,date_max,freq='Y')
dataset_url = [f'https://tds.hycom.org/thredds/dodsC/GLBu0.08/expt_19.1/{year}' for year in period_range_years] #list is possible with hycom, since it uses xr.open_mfdataset()
# temporary fix to avoid RuntimeError: NetCDF: file not found
# https://github.com/Deltares/dfm_tools/issues/1048
dataset_url = dataset_url[0]
file_prefix = 'hycom_'
dfmt.download_OPeNDAP(dataset_url=dataset_url,
varkey=varkey,
Expand Down

0 comments on commit 35703f7

Please sign in to comment.