csiro-coasts / emsarray

xarray extension that supports EMS model formats
BSD 3-Clause "New" or "Revised" License
13 stars 1 forks source link

emsarray.open_dataset() of gbr1_2.0 data results in time access error #129

Closed sspagnol closed 1 week ago

sspagnol commented 3 months ago

Hi, wandering if anyone has any pointers on why the below snippet results in the errors shown.

''' import emsarray gbr1_url='http://dapds00.nci.org.au/thredds/dodsC/fx3/model_data/gbr1_2.0.ncml' dataset = emsarray.open_dataset(gbr1_url) '''

gives me

'''oc_open: server error retrieving url: code=2 message="The variable time[0]' was not found in the dataset."oc_open: server error retrieving url: code=2 message= "The variabletime[0]' was not found in the dataset."oc_open: server error retrieving url: code=2 message="The variable time[0]' was not found in the dataset. "oc_open: server error retrieving url: code=2 message="The variabletime[0]' was not found in the dataset."oc_open: server error retrieving url: code=2 message ="The variable time[0]' was not found in the dataset."oc_open: server error retrieving url: code=2 message="The variabletime[0]' was not found in the dataset ."oc_open: server error retrieving url: code=2 message="The variable `time[0]' was not found in the dataset."Traceback (most recent call last): '''

some stacktrace info and then

''' RuntimeError: Failed to decode variable 'time': NetCDF: Access failure '''

sharon-tickell commented 3 months ago

Hi @sspagnol : can you please try again using a https URL for the GBR1_H2p0 OPeNDAP endpoint?
(https://dapds00.nci.org.au/thredds/dodsC/fx3/model_data/gbr1_2.0.ncml)

The NCI upgraded their THREDDS server to be HTTPS by default a few years ago. The HTML catalog pages have redirects so the old URLs still work, but the OPeNDAP protocol that emsarray is using under the hoold doesn't follow redirects

sspagnol commented 3 months ago

That was indeed the problem. Thanks!

sharon-tickell commented 3 months ago

You're welcome, @sspagnol : glad it was so easily sorted!