API reference#

This page provides an auto-generated summary of argopy’s API. For more details and examples, refer to the relevant chapters in the main part of the documentation.

Argo Data Fetchers#

DataFetcher

alias of ArgoDataFetcher

IndexFetcher

alias of ArgoIndexFetcher

Data selection methods#

DataFetcher.region()

Space/time domain data fetcher

DataFetcher.float()

Float data fetcher

DataFetcher.profile()

Profile data fetcher

IndexFetcher.region()

Space/time domain index fetcher

IndexFetcher.float()

Float index fetcher

IndexFetcher.profile()

Profile index fetcher

Data access methods#

DataFetcher.load([force])

Fetch data (and compute a profile index) if not already in memory

DataFetcher.to_xarray(**kwargs)

Fetch and return data as xarray.DataSet

DataFetcher.to_dataframe(**kwargs)

Fetch and return data as pandas.Dataframe

DataFetcher.to_index([full, coriolis_id])

Create a profile index of Argo data, fetch data if necessary

IndexFetcher.load([force])

Load index in memory

IndexFetcher.to_xarray(**kwargs)

Fetch and return index data as xarray DataSet

IndexFetcher.to_dataframe(**kwargs)

Fetch and return index data as pandas Dataframe

IndexFetcher.to_csv([file])

Fetch and save index data as csv in a file

Data visualisation methods#

DataFetcher.plot([ptype])

Create custom plots from this fetcher data or index.

DataFetcher.dashboard(**kw)

Open access point dashboard.

IndexFetcher.plot([ptype])

Create custom plots from this fetcher index.

Properties#

DataFetcher.data

Data structure

DataFetcher.index

Index structure, as returned by the to_index method

DataFetcher.domain

Space/time domain of the dataset

DataFetcher.uri

List of resources to load for a request

IndexFetcher.index

Index structure

Data visualisation#

Visualisation functions available at the argopy module level:

dashboard([wmo, cyc, type, url_only, width, ...])

Insert an Argo dashboard page in a notebook cell, or return the corresponding url

ArgoColors([name, N])

Class to manage discrete coloring for Argo related variables

All other visualisation functions are in the argopy.plot submodule:

open_sat_altim_report([WMO, embed])

Insert the CLS Satellite Altimeter Report figure in notebook cell

scatter_map(data[, x, y, hue, markersize, ...])

Try-to-be generic function to create a scatter plot on a map from argopy xarray.Dataset or pandas.DataFrame data

bar_plot(df[, by, style, with_seaborn])

Create a bar plot for an Argo index dataframe

scatter_plot(ds, this_param[, this_x, ...])

A quick-and-dirty parameter scatter plot for one variable

latlongrid(ax[, dx, dy, fontsize, ...])

Add latitude/longitude grid line and labels to a cartopy geoaxes

Dataset.argo (xarray accessor)#

Dataset.argo

Class registered under scope argo to access a xarray.Dataset object.

This accessor extends xarray.Dataset. Proper use of this accessor should be like:

>>> import xarray as xr         # first import xarray
>>> import argopy               # import argopy (the dataset 'argo' accessor is registered)
>>> from argopy import DataFetcher
>>> ds = DataFetcher().float([6902766, 6902772, 6902914, 6902746]).load().data
>>> ds.argo
>>> ds.argo.filter_qc()

Data Transformation#

Dataset.argo.point2profile([drop])

Transform a collection of points into a collection of profiles

Dataset.argo.profile2point()

Convert a collection of profiles to a collection of points

Dataset.argo.interp_std_levels(std_lev[, axis])

Interpolate measurements to standard pressure levels

Dataset.argo.groupby_pressure_bins(bins[, ...])

Group measurements by pressure bins

Data Filters#

Dataset.argo.filter_qc([QC_list, QC_fields, ...])

Filter data set according to QC values

Dataset.argo.filter_data_mode([keep_error, ...])

Filter variables according to their data mode

Dataset.argo.filter_scalib_pres([force, inplace])

Filter variables according to OWC salinity calibration software requirements

Dataset.argo.filter_researchmode()

Filter dataset for research user mode

Processing#

Dataset.argo.teos10([vlist, inplace])

Add TEOS10 variables to the dataset

Dataset.argo.create_float_source([path, ...])

Preprocess data for OWC software calibration

Misc#

Dataset.argo.index

Basic profile index

Dataset.argo.domain

Space/time domain of the dataset

Dataset.argo.list_WMO_CYC()

Given a dataset, return a list with all possible (PLATFORM_NUMBER, CYCLE_NUMBER) tuple

Dataset.argo.uid(wmo_or_uid[, cyc, direction])

UID encoder/decoder

Dataset.argo.cast_types(**kwargs)

Make sure variables are of the appropriate types according to Argo

Utilities#

Function under the argopy.utils submodule.

list_available_data_src()

List all available data sources

list_available_index_src()

List all available index sources

list_standard_variables()

List of variables for standard users

list_multiprofile_file_variables()

List of variables in a netcdf multiprofile file.

check_wmo(lst[, errors])

Validate a WMO option and returned it as a list of integers

check_cyc(lst[, errors])

Validate a CYC option and returned it as a list of integers

float_wmo(WMO_number[, errors])

Argo float WMO number object

Registry([initlist, name, dtype, invalid])

A list manager can that validate item type

Chunker(request[, chunks, chunksize])

To chunk fetcher requests

isconnected([host, maxtry])

Check if an URL is alive

urlhaskeyword([url, keyword, maxtry])

Check if a keyword is in the content of a URL

isalive([api_server_check])

Check if an API is alive or not

isAPIconnected([src, data])

Check if a source API is alive or not

drop_variables_not_in_all_datasets(ds_collection)

Drop variables that are not in all datasets (the lowest common denominator)

fill_variables_not_in_all_datasets(ds_collection)

Add empty variables to dataset so that all the collection have the same xarray.Dataset.data_vars and :props:`xarray.Dataset.coords`

Argopy helpers#

set_options(**kwargs)

Set options for argopy

clear_cache([fs])

Delete argopy cache folder content

tutorial.open_dataset(name)

Open a dataset from the argopy online data repository (requires internet).

show_versions([file, conda])

Print the versions of argopy and its dependencies

xarray.ArgoEngine()

Backend for Argo netCDF files based on the xarray netCDF4 engine

Internals#

File systems#

argopy.stores.filestore([cache, cachedir])

Argo local file system

argopy.stores.httpstore([cache, cachedir])

Argo http file system

argopy.stores.memorystore([cache, cachedir])

Argo in-memory file system (global)

argopy.stores.ftpstore([cache, cachedir])

Argo ftp file system

Argo index store#

ArgoIndex([host, index_file, convention, ...])

Argo GDAC index store

argopy.stores.indexstore_pa

alias of indexstore_pyarrow

argopy.stores.indexstore_pd

alias of indexstore_pandas

Fetcher sources#

ERDDAP#

argopy.data_fetchers.erddap_data.ErddapArgoDataFetcher([...])

Manage access to Argo data through Ifremer ERDDAP

argopy.data_fetchers.erddap_data.Fetch_wmo([...])

Manage access to Argo data through Ifremer ERDDAP for: a list of WMOs

argopy.data_fetchers.erddap_data.Fetch_box([...])

Manage access to Argo data through Ifremer ERDDAP for: an ocean rectangle

GDAC#

argopy.data_fetchers.gdacftp_data.FTPArgoDataFetcher([...])

Manage access to Argo data from a remote GDAC FTP.

argopy.data_fetchers.gdacftp_data.Fetch_wmo([...])

Manage access to GDAC ftp Argo data for: a list of WMOs.

argopy.data_fetchers.gdacftp_data.Fetch_box([...])

Manage access to GDAC ftp Argo data for: a rectangular space/time domain.

Argovis#

argopy.data_fetchers.argovis_data.ArgovisDataFetcher([...])

argopy.data_fetchers.argovis_data.Fetch_wmo([...])

argopy.data_fetchers.argovis_data.Fetch_box([...])