clouddrift.adapters.gdp.gdp6h.download#
- clouddrift.adapters.gdp.gdp6h.download(url: str = 'https://www.aoml.noaa.gov/ftp/pub/phod/buoydata/6h', tmp_path: str = '/tmp/clouddrift/gdp6h', drifter_ids: list[int] | None = None, n_random_id: int | None = None, skip_download: bool = False)[source]#
Download individual NetCDF files from the AOML server.
Parameters#
- urlstr
URL from which to download the data (Default: GDP_DATA_URL). Alternatively, it can be GDP_DATA_URL_EXPERIMENTAL.
- tmp_pathstr, optional
Path to the directory where the individual NetCDF files are stored (default varies depending on operating system; /tmp/clouddrift/gdp6h on Linux)
- drifter_idslist
List of drifter to retrieve (Default: all)
- n_random_idint
Randomly select n_random_id drifter IDs to download (Default: None)
- skip_downloadbool, optional
If True, make no network requests: discover drifter IDs by scanning
tmp_pathfor existingdrifter_6h_*.ncfiles and use locally cacheddirfl_*.datmetadata files. Default is False.
Returns#
- outlist
List of retrieved drifters
Raises#
- ValueError
If no matching drifter files are found for the requested selection.