seagrid.download.pydap#

Legacy OPeNDAP-to-netCDF helper, kept for the 2.x series.

Use seagrid.download.opendap.retrieve() instead.

Functions

retrieve(url, datadir, filename[, force])

Download a remote OPeNDAP dataset to a local netCDF file as float32.

seagrid.download.pydap.retrieve(url, datadir, filename, force=False)[source]#

Download a remote OPeNDAP dataset to a local netCDF file as float32.

Parameters:
  • url (str) – OPeNDAP URL.

  • datadir (str or os.PathLike) – Local directory.

  • filename (str) – Local file name.

  • force (bool, optional) – Download even if the file is cached.

Returns:

pathlib.Path – The local file.

Raises:

seagrid.download.DownloadError – If the dataset cannot be opened or written.

Return type:

Path