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
orref
.
src
: Source of fetched data.Default:
erddap
. Possible values:erddap
,gdac
,argovis
ftp
: Path to a local or remote GDACDefault: None
cachedir
: Absolute path to a local cache directory.Default:
~/.cache/argopy
mode
: User mode.Default:
standard
. Possible values:standard
orexpert
.
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')
Methods
__init__
(**kwargs)