argopy.set_options#

class set_options(**kwargs)[source]#

Set options for argopy

List of options:

  • dataset: Define the Dataset to work with.

    Default: phy. Possible values: phy, bgc or ref.

  • src: Source of fetched data.

    Default: erddap. Possible values: erddap, gdac, argovis

  • ftp: Path to a local or remote GDAC

    Default: None

  • cachedir: Absolute path to a local cache directory.

    Default: ~/.cache/argopy

  • mode: User mode.

    Default: standard. Possible values: standard or expert.

  • api_timeout: Define the time out of internet requests to web API, in seconds.

    Default: 60

  • trust_env: Allow for local environment variables to be used to connect to the internet.

    Argopy will get proxies information from HTTP_PROXY / HTTPS_PROXY environment variables if this option is True ( False by default) and it can also get proxy credentials from ~/.netrc file if this file exists.

You can use set_options either as a context manager:

>>> import argopy
>>> with argopy.set_options(src='gdac'):
>>>    ds = argopy.DataFetcher().float(3901530).to_xarray()

Or to set global options:

>>> argopy.set_options(src='gdac')
__init__(**kwargs)[source]#

Methods

__init__(**kwargs)