argopy.data_fetchers.erddap_data.Fetch_wmo#
- class Fetch_wmo(ds: str = '', cache: bool = False, cachedir: str = '', parallel: bool = False, progress: bool = False, chunks: str = 'auto', chunks_maxsize: dict = {}, api_timeout: int = 0, params: str | list = 'all', measured: str | list = None, **kwargs)[source]#
Manage access to Argo data through Ifremer ERDDAP for: a list of WMOs
- This class is instantiated when a call is made to these facade access points:
ArgoDataFetcher(src=âerddapâ).float(**)
ArgoDataFetcher(src=âerddapâ).profile(**)
- __init__(ds: str = '', cache: bool = False, cachedir: str = '', parallel: bool = False, progress: bool = False, chunks: str = 'auto', chunks_maxsize: dict = {}, api_timeout: int = 0, params: str | list = 'all', measured: str | list = None, **kwargs)#
Instantiate an ERDDAP Argo data fetcher
- Parameters:
ds (str, default = OPTIONS['ds']) â Dataset to load: âphyâ or ârefâ or âbgc-sâ
cache (bool (optional)) â Cache data or not (default: False)
cachedir (str (optional)) â Path to cache folder
parallel (bool, str,
distributed.Client, default: False) âSet whether to use parallelization or not, and possibly which method to use.
- Possible values:
False: no parallelization is usedTrue: use default method specified by theparallel_default_methodoptionany other values accepted by the
parallel_default_methodoption
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.server (str, default = OPTIONS['erddap']) â URL to erddap server
mode (str, default = OPTIONS['mode'])
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 erddap constraints
filter_data_mode(ds, **kwargs)Apply xarray argo accessor filter_data_mode method
filter_measured(ds)Re-enforce the 'measured' criteria for BGC requests
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, *args, **kwargs)Filter variables according to dataset and user mode
get_url()Return the URL to download requested data
init([WMO, CYC])Create Argo data loader for WMOs
pre_process(this_ds, *args, **kwargs)to_xarray([errors, add_dm, concat, max_workers])Load Argo data and return a xarray.DataSet
transform_data_mode(ds, **kwargs)Apply xarray argo accessor transform_data_mode method
Attributes
N_POINTSNumber of measurements expected to be returned by a request
cachepathReturn path to cached file(s) for this request
data_sourceserverURL of the Erddap server
shaReturns a unique SHA for a specific cname / fetcher implementation
uriList of URLs to load for a request