argopy.data_fetchers.localftp_data.LocalFTPArgoDataFetcher#

class LocalFTPArgoDataFetcher(local_ftp: str = '', ds: str = '', cache: bool = False, cachedir: str = '', dimension: str = 'point', errors: str = 'raise', parallel: bool = False, parallel_method: str = 'thread', progress: bool = False, chunks: str = 'auto', chunks_maxsize: dict = {}, **kwargs)[source]#

Manage access to Argo data from a local copy of GDAC ftp.

Warning

This fetcher is deprecated. It’s been replaced by the gdac fetcher.

Deprecation cycle

Warning

0.1.11

Error

0.1.12

Delete

0.1.13

__init__(local_ftp: str = '', ds: str = '', cache: bool = False, cachedir: str = '', dimension: str = 'point', errors: str = 'raise', parallel: bool = False, parallel_method: str = 'thread', progress: bool = False, chunks: str = 'auto', chunks_maxsize: dict = {}, **kwargs)[source]#

Init fetcher

Parameters
  • local_ftp (str, optional) – Path to the local directory where the ‘dac’ folder is located.

  • ds (str, optional) – Dataset to load: ‘phy’ or ‘ref’ or ‘bgc’

  • errors (str, optional) – If set to ‘raise’ (default), will raise a NetCDF4FileNotFoundError error if any of the requested files cannot be found. If set to ‘ignore’, the file not found is skipped when fetching data.

  • cache (bool, default: False) – Cache data or not

  • cachedir (str, optional) – Path to cache folder

  • dimension (str, default: point) – Main dimension of the output dataset. This can be profile to retrieve a collection of profiles, or point to have data as a collection of measurements. This can be used to optimise performances.

  • parallel (bool, default: False) – Chunk request to use parallel fetching

  • parallel_method (str, default: thread) – Define the parallelization method: thread, process or a dask.distributed.client.Client.

  • progress (bool, default: False) – Show a progress bar or not when fetching data.

  • chunks ('auto' or dict of integers (optional)) –

    Dictionary with request access point as keys and number of chunks to create as values. Eg:

    • {'wmo': 10} will create a maximum of 10 chunks along WMOs when used with Fetch_wmo.

    • {'lon': 2} will create a maximum of 2 chunks along longitude when used with Fetch_box.

  • chunks_maxsize (dict (optional)) – Dictionary with request access point as keys and chunk size as values (used as maximum values in ‘auto’ chunking). Eg: {'wmo': 5} will create chunks with as many as 5 WMOs each.

Methods

__init__([local_ftp, ds, cache, cachedir, ...])

Init fetcher

clear_cache()

Remove cache files and entries from resources opened with this fetcher

cname()

Return a unique string defining the constraints

dashboard(**kw)

filter_data_mode(ds, **kwargs)

filter_qc(ds, **kwargs)

filter_variables(ds[, mode])

get_path(wmo[, cyc])

Return the absolute path toward the netcdf source file of a given wmo/cyc pair and a dataset

init(*args, **kwargs)

Initialisation for a specific fetcher

to_xarray([errors])

Load Argo data and return a xarray.Dataset

Attributes

cachepath

Return path to cache file(s) for this request

sha

Returns a unique SHA for a specific cname / fetcher implementation

uri

Return the list of files to load