Fetching Argo data#

To fetch (i.e. access, download, format) Argo data, argopy provides the DataFetcher class. In this section of the documentation, we explain how to use it.

Several DataFetcher arguments exist to help you select the dataset, the data source and the user mode the most suited for your applications; and also to improve performances.

You define the selection of data you want to fetch with one of the DataFetcher methods: region, float or profile.

These methods and arguments are all explained in the following sections:

In a nutshell#

2 lines to download Argo data: import and fetch !

In [1]: import argopy

In [2]: ds = argopy.DataFetcher().region([-75, -45, 20, 30, 0, 10, '2011-01', '2011-06']).load().data
In [3]: ds
Out[3]: 
<xarray.Dataset>
Dimensions:          (N_POINTS: 998)
Coordinates:
  * N_POINTS         (N_POINTS) int64 0 1 2 3 4 5 6 ... 992 993 994 995 996 997
    LATITUDE         (N_POINTS) float64 24.54 24.54 25.04 ... 26.67 24.96 24.96
    LONGITUDE        (N_POINTS) float64 -45.14 -45.14 -51.58 ... -50.4 -50.4
    TIME             (N_POINTS) datetime64[ns] 2011-01-01T11:49:19 ... 2011-0...
Data variables: (12/15)
    CYCLE_NUMBER     (N_POINTS) int64 23 23 10 10 10 10 10 ... 1 5 2 10 10 38 38
    DATA_MODE        (N_POINTS) <U1 'D' 'D' 'D' 'D' 'D' ... 'D' 'D' 'D' 'D' 'D'
    DIRECTION        (N_POINTS) <U1 'A' 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A' 'A'
    PLATFORM_NUMBER  (N_POINTS) int64 1901463 1901463 ... 1901463 1901463
    POSITION_QC      (N_POINTS) int64 1 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1 1
    PRES             (N_POINTS) float64 5.0 10.0 2.0 4.0 ... 5.12 9.42 5.0 10.0
    ...               ...
    PSAL_ERROR       (N_POINTS) float32 0.01 0.01 0.01 ... 0.01 0.01091 0.01182
    PSAL_QC          (N_POINTS) int64 1 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1 1
    TEMP             (N_POINTS) float64 24.08 24.08 24.03 ... 25.64 25.1 24.79
    TEMP_ERROR       (N_POINTS) float32 0.002 0.002 0.002 ... 0.0025 0.002 0.002
    TEMP_QC          (N_POINTS) int64 1 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1 1
    TIME_QC          (N_POINTS) int64 1 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1 1
Attributes:
    DATA_ID:              ARGO
    DOI:                  http://doi.org/10.17882/42182
    Fetched_from:         https://erddap.ifremer.fr/erddap
    Fetched_by:           docs
    Fetched_date:         2024/04/22
    Fetched_constraints:  [x=-75.00/-45.00; y=20.00/30.00; z=0.0/10.0; t=2011...
    Fetched_uri:          ['https://erddap.ifremer.fr/erddap/tabledap/ArgoFlo...
    history:              Variables filtered according to DATA_MODE; Variable...

Workflow explained#

Letโ€™s explain what happened in the single line Argo data fetching above.

Import argopy and create a instance of DataFetcher:

In [4]: import argopy

In [5]: f = argopy.DataFetcher()

In [6]: f
Out[6]: 
<datafetcher.erddap> 'No access point initialised'
Available access points: float, profile, region
Performances: cache=False, parallel=False
User mode: standard
Dataset: phy

By default, argopy will load the phy dataset, in standard user mode from the erddap data source.