argopy.data_fetchers.localftp_data.Fetch_wmo

class Fetch_wmo(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 local ftp Argo data for: a list of WMOs

__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)

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 (optional)

Cache data or not (default: False)

cachedir: str (optional)

Path to cache folder

dimension: str

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

parallel: bool (optional)

Chunk request to use parallel fetching (default: False)

parallel_method: str (optional)

Define the parallelization method: thread, process or a dask.distributed.client.Client.

progress: bool (optional)

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([WMO, CYC])

Create Argo data loader for WMOs

to_xarray([errors])

Load Argo data and return a xarray.Dataset

Attributes

cachepath

Return path to cache file(s) for this request

uri

List of files to load for a request