argopy.data_fetchers.erddap_data.Fetch_box#
- class Fetch_box(ds: str = '', cache: bool = False, cachedir: str = '', parallel: bool = False, parallel_method: str = 'erddap', progress: bool = False, chunks: str = 'auto', chunks_maxsize: dict = {}, api_timeout: int = 0, params: str | list = 'all', measured: str | list | None = None, **kwargs)[source]#
Manage access to Argo data through Ifremer ERDDAP for: an ocean rectangle
- __init__(ds: str = '', cache: bool = False, cachedir: str = '', parallel: bool = False, parallel_method: str = 'erddap', progress: bool = False, chunks: str = 'auto', chunks_maxsize: dict = {}, api_timeout: int = 0, params: str | list = 'all', measured: str | list | None = None, **kwargs)#
Instantiate an ERDDAP Argo data fetcher
- Parameters:
ds (str (optional)) – Dataset to load: ‘phy’ or ‘ref’ or ‘bgc’
cache (bool (optional)) – Cache data or not (default: False)
cachedir (str (optional)) – Path to cache folder
parallel (bool (optional)) – Chunk request to use parallel fetching (default: False)
parallel_method (str (optional)) – Define the parallelization method:
thread,processor adask.distributed.client.Client.progress (bool (optional)) – Show a progress bar or not when
parallelis set to True.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.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.
api_timeout (int (optional)) – Erddap request time out in seconds. Set to OPTIONS[‘api_timeout’] by default.
params (Union[str, list] (optional, default='all')) – List of BGC essential variables to retrieve, i.e. that will be in the output
xr.DataSet`. By default, this is set toall, i.e. any variable found in at least of the profile in the data selection will be included in the output.measured (Union[str, list] (optional, default=None)) – List of BGC essential variables that can’t be NaN. If set to ‘all’, this is an easy way to reduce the size of the
xr.DataSet`to points where all variables have been measured. Otherwise, provide a simple list of variables.
Methods
__init__([ds, cache, cachedir, parallel, ...])Instantiate an ERDDAP Argo data fetcher
clear_cache()Remove cache files and entries from resources opened with this fetcher
cname()Return a unique string defining the constraints
dashboard(**kw)Return 3rd party dashboard for the access point
define_constraints()Define request constraints
filter_data_mode(ds, **kwargs)Apply xarray argo accessor filter_data_mode method
filter_points(ds)Enforce request criteria
filter_qc(ds, **kwargs)Apply xarray argo accessor filter_qc method
filter_researchmode(ds, *args, **kwargs)Filter dataset for research user mode
filter_variables(ds, mode, *args, **kwargs)Filter variables according to user mode
get_url()Return the URL to download requested data
init(box, **kw)Create Argo data loader
post_process(this_ds[, add_dm, URI])Post-process a xarray.DataSet created from a netcdf erddap response
to_xarray([errors, add_dm, concat, max_workers])Load Argo data and return a xarray.DataSet
Attributes
N_POINTSNumber of measurements expected to be returned by a request
cachepathReturn path to cached file(s) for this request
serverURL of the Erddap server
shaReturns a unique SHA for a specific cname / fetcher implementation
uriList of files to load for a request