-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Labels
bugSomething isn't workingSomething isn't workingdataset readRelating to reading datasetsRelating to reading datasets
Milestone
Description
At version 1.10.1.1, reading a https:// files does not work, but reading an http:// file does work:
>>> import cfdm
>>> remote = "http://psl.noaa.gov/thredds/dodsC/Datasets/cru/crutem5/Monthlies/air.mon.anom.nobs.nc"
>>> cfdm.read(remote)
[<Field: air_temperature_anomaly(time(2082), latitude(36), longitude(72)) observations>]
>>> remote = "https://psl.noaa.gov/thredds/dodsC/Datasets/cru/crutem5/Monthlies/air.mon.anom.nobs.nc"
>>> cfdm.read(remote)
--------------------------------------------------------------------------
OSError Traceback (most recent call last)
Cell In[3], line 1
----> 1 f = cfdm.read(remote)
File ~/cfdm/cfdm/read_write/read.py:360, in read(filename, external, extra, verbose, warnings, warn_valid, mask, domain, _implementation)
355 raise IOError(
356 f"Can't determine format of file {filename} "
357 f"generated from CDL file {cdl_filename}"
358 )
359 else:
--> 360 raise IOError(f"Can't determine format of file {filename}")
362 # ----------------------------------------------------------------
363 # Return the field or domain constructs
364 # ----------------------------------------------------------------
365 return fields
OSError: Can't determine format of file https://psl.noaa.gov/thredds/dodsC/Datasets/cru/crutem5/Monthlies/air.mon.anom.nobs.ncThis is due to a simple bug in cfdm.read_write.netcdf.netcdfread.is_netcdf_file. PR to follow.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdataset readRelating to reading datasetsRelating to reading datasets