User modes (πŸ„, 🏊, 🚣)#

Hint

argopy manipulates the raw data to make them easier to work with. To make sure you understand the data you’re getting, have a look to this section.

The problem we’re trying to solve

For non-experts of the Argo dataset, it can be quite complicated to get access to Argo measurements. Indeed, the Argo data set is very complex, with thousands of different variables, tens of reference tables and a user manual more than 100 pages long.

This is mainly due to:

  • Argo measurements coming from many different models of floats or sensors,

  • quality control of in situ measurements of autonomous platforms being really a matter of ocean and data experts,

  • the Argo data management workflow being distributed between more than 10 Data Assembly Centers all around the world,

  • the Argo autonomous profiling floats, despite quite a simple principle of functioning, is a rather complex robot that needs a lot of data to be monitored and logged.

The solution proposed by argopy

In order to ease Argo data analysis for the vast majority of users, we implemented in argopy different levels of verbosity and data processing to hide or simply remove variables only meaningful to experts.

Definitions#

argopy provides 3 user modes:

  • πŸ„ expert mode return all the Argo data, without any postprocessing,

  • 🏊 standard mode simplifies the dataset, remove most of its jargon and return a priori good data,

  • 🚣 research mode simplifies the dataset to its heart, preserving only data of the highest quality for research studies, including studies sensitive to small pressure and salinity bias (e.g. calculations of global ocean heat content or mixed layer depth).

In standard and research modes, fetched data are automatically filtered to account for their quality (using the quality control flags) and level of processing by the data centers (considering for each parameter the data mode which indicates if a human expert has carefully looked at the data or not). Both modes return a postprocessed subset of the full Argo dataset.

Hence the main difference between the standard and research modes is in the level of data quality insurance. In standard mode, only good or probably good data are returned and these may include real time data that have been validated automatically but not by a human expert. The research mode is the safer choice, with data of the highest quality, carefully checked in delayed mode by a human expert of the Argo Data Management Team.

🏊 Standard mode (default)#

Table 3 Table of argopy data processing details in standard user mode 🏊#

Parameters

Dataset

Level of assessment (data mode)

Level of quality (QC flags)

Pressure error

Return variables

Pressure, temperature, salinity

🟑+πŸ”΅ + 🟒

real time, adjusted and delayed mode data: [R,A,D] modes

good or probably good values (QC=[1,2])

not used

all without jargon [a]

Radiometry parameters [b] and BBP700 [c]

🟒

real time, adjusted and delayed mode data: [R,A,D] modes

good or probably good values, estimated or changed values (QC=[1,2,5,8])

not used

all without jargon [a]

CDOM [d]

🟒

None allowed

None allowed

not used

all without jargon [a]

All other BGC parameters [e]

🟒

real time data with adjusted values, delayed mode data: [A,D] modes

good or probably good data, estimated or changed values (QC=[1,2,5,8])

not used

all without jargon [a]

[a]

The complete list is available with utils.list_standard_variables. Note that DATA_MODE/PARAM_DATA_MODE and QC flags variables are retained while PARAM_ADJUSTED and PARAM variables are merged (i.e. PARAM_ADJUSTED is removed).

[b]

The list of radiometry parameters is available with utils.list_radiometry_parameters.

[c]

Particle backscattering at 700 nanometers

[d]

Concentration of coloured dissolved organic matter in seawater

[e]

The complete list of BGC parameters is available with utils.list_bgc_s_parameters.

In [1]: import argopy

In [2]: with argopy.set_options(mode='standard'):
   ...:     ds = argopy.DataFetcher(src='gdac').profile(6902746, 12).to_xarray()
   ...:     print(ds.data_vars)
   ...: 
Data variables:
    CYCLE_NUMBER     (N_POINTS) int64 864B 12 12 12 12 12 12 ... 12 12 12 12 12
    DATA_MODE        (N_POINTS) <U1 432B 'D' 'D' 'D' 'D' 'D' ... 'D' 'D' 'D' 'D'
    DIRECTION        (N_POINTS) <U1 432B 'A' 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A'
    PLATFORM_NUMBER  (N_POINTS) int64 864B 6902746 6902746 ... 6902746 6902746
    POSITION_QC      (N_POINTS) int64 864B 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1
    PRES             (N_POINTS) float32 432B 3.0 4.0 5.0 ... 1.963e+03 1.989e+03
    PRES_ERROR       (N_POINTS) float32 432B 2.4 2.4 2.4 2.4 ... 2.4 2.4 2.4 2.4
    PRES_QC          (N_POINTS) int64 864B 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1
    PSAL             (N_POINTS) float32 432B 35.03 35.03 35.03 ... 34.99 34.99
    PSAL_ERROR       (N_POINTS) float32 432B 0.01 0.01 0.01 ... 0.01 0.01 0.01
    PSAL_QC          (N_POINTS) int64 864B 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1
    TEMP             (N_POINTS) float32 432B 28.9 28.9 28.9 ... 3.734 3.693
    TEMP_ERROR       (N_POINTS) float32 432B 0.002 0.002 0.002 ... 0.002 0.002
    TEMP_QC          (N_POINTS) int64 864B 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1
    TIME_QC          (N_POINTS) int64 864B 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1

🚣 Research mode#

Table 4 Table of argopy data processing details in research user mode 🚣#

Parameters

Dataset

Level of assessment (data mode)

Level of quality (QC flags)

Pressure error

Return variables

Pressure, temperature, salinity

🟑+πŸ”΅ + 🟒

delayed mode data only: [D] mode

good values (QC=[1])

smaller than 20db

comprehensive minimum [a]

CDOM [d]

🟒

None allowed

None allowed

not used

comprehensive minimum [a]

All other BGC parameters [e]

🟒

delayed mode data only: [D] mode

good data, estimated or changed values (QC=[1,5,8])

not used

comprehensive minimum [a]

[a]

i.e.: float ID, profile number and direction and all parameter values, including error estimates

[b]

The list of radiometry parameters is available with utils.list_radiometry_parameters

[c]

Particle backscattering at 700 nanometers

[d]

Concentration of coloured dissolved organic matter in seawater

[e]

The complete list of BGC parameters is available with utils.list_bgc_s_parameters.

In [5]: import argopy

In [6]: with argopy.set_options(mode='research'):
   ...:     ds = argopy.DataFetcher(src='gdac').profile(6902746, 12).to_xarray()
   ...:     print(ds.data_vars)
   ...: 
Data variables:
    CYCLE_NUMBER     (N_POINTS) int64 864B 12 12 12 12 12 12 ... 12 12 12 12 12
    DIRECTION        (N_POINTS) <U1 432B 'A' 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A'
    PLATFORM_NUMBER  (N_POINTS) int64 864B 6902746 6902746 ... 6902746 6902746
    PRES             (N_POINTS) float32 432B 3.0 4.0 5.0 ... 1.963e+03 1.989e+03
    PRES_ERROR       (N_POINTS) float32 432B 2.4 2.4 2.4 2.4 ... 2.4 2.4 2.4 2.4
    PSAL             (N_POINTS) float32 432B 35.03 35.03 35.03 ... 34.99 34.99
    PSAL_ERROR       (N_POINTS) float32 432B 0.01 0.01 0.01 ... 0.01 0.01 0.01
    TEMP             (N_POINTS) float32 432B 28.9 28.9 28.9 ... 3.734 3.693
    TEMP_ERROR       (N_POINTS) float32 432B 0.002 0.002 0.002 ... 0.002 0.002

πŸ„ Expert mode#

No pre or post processing is performed, this user mode returns all the Argo data as they are in data source.

In [9]: import argopy

In [10]: with argopy.set_options(mode='expert'):
   ....:     ds = argopy.DataFetcher(src='gdac').profile(6902746, 12).to_xarray()
   ....:     print(ds.data_vars)
   ....: 
Data variables:
    CONFIG_MISSION_NUMBER     (N_POINTS) float64 888B 2.0 2.0 2.0 ... 2.0 2.0
    CYCLE_NUMBER              (N_POINTS) float64 888B 12.0 12.0 ... 12.0 12.0
    DATA_CENTRE               (N_POINTS) <U2 888B 'IF' 'IF' 'IF' ... 'IF' 'IF'
    DATA_MODE                 (N_POINTS) <U1 444B 'D' 'D' 'D' ... 'R' 'R' 'R'
    DATA_STATE_INDICATOR      (N_POINTS) <U4 2kB '2C  ' '2C  ' ... '2B  ' '2B  '
    DC_REFERENCE              (N_POINTS) <U32 14kB '                         ...
    DIRECTION                 (N_POINTS) <U1 444B 'A' 'A' 'A' ... 'A' 'A' 'A'
    FIRMWARE_VERSION          (N_POINTS) <U32 14kB '5605B04                  ...
    FLOAT_SERIAL_NO           (N_POINTS) <U32 14kB 'AR2000-16FR003           ...
    PI_NAME                   (N_POINTS) <U64 28kB 'Guillaume MAZE           ...
    PLATFORM_NUMBER           (N_POINTS) float64 888B 6.903e+06 ... 6.903e+06
    PLATFORM_TYPE             (N_POINTS) <U32 14kB 'ARVOR                    ...
    POSITIONING_SYSTEM        (N_POINTS) <U8 4kB 'ARGOS   ' ... 'ARGOS   '
    POSITION_QC               (N_POINTS) float64 888B 1.0 1.0 1.0 ... 1.0 1.0
    PRES                      (N_POINTS) float32 444B 3.0 4.0 5.0 ... 1.0 2.0
    PRES_ADJUSTED             (N_POINTS) float32 444B 3.0 4.0 5.0 ... nan nan
    PRES_ADJUSTED_ERROR       (N_POINTS) float32 444B 2.4 2.4 2.4 ... nan nan
    PRES_ADJUSTED_QC          (N_POINTS) float64 888B 1.0 1.0 1.0 ... 9.0 9.0
    PRES_QC                   (N_POINTS) float64 888B 1.0 1.0 1.0 ... 1.0 1.0
    PROFILE_PRES_QC           (N_POINTS) <U1 444B 'A' 'A' 'A' ... 'A' 'A' 'A'
    PROFILE_PSAL_QC           (N_POINTS) <U1 444B 'A' 'A' 'A' ... 'F' 'F' 'F'
    PROFILE_TEMP_QC           (N_POINTS) <U1 444B 'A' 'A' 'A' ... 'D' 'D' 'D'
    PROJECT_NAME              (N_POINTS) <U64 28kB 'CORIOLIS                 ...
    PSAL                      (N_POINTS) float32 444B 35.03 35.03 ... 35.03
    PSAL_ADJUSTED             (N_POINTS) float32 444B 35.03 35.03 ... nan nan
    PSAL_ADJUSTED_ERROR       (N_POINTS) float32 444B 0.01 0.01 0.01 ... nan nan
    PSAL_ADJUSTED_QC          (N_POINTS) float64 888B 1.0 1.0 1.0 ... 9.0 9.0
    PSAL_QC                   (N_POINTS) float64 888B 1.0 1.0 1.0 ... 3.0 3.0
    TEMP                      (N_POINTS) float32 444B 28.9 28.9 ... 28.9 28.9
    TEMP_ADJUSTED             (N_POINTS) float32 444B 28.9 28.9 28.9 ... nan nan
    TEMP_ADJUSTED_ERROR       (N_POINTS) float32 444B 0.002 0.002 ... nan nan
    TEMP_ADJUSTED_QC          (N_POINTS) float64 888B 1.0 1.0 1.0 ... 9.0 9.0
    TEMP_QC                   (N_POINTS) float64 888B 1.0 1.0 1.0 ... 3.0 1.0
    TIME_LOCATION             (N_POINTS) datetime64[ns] 888B 2017-09-01T07:38...
    TIME_QC                   (N_POINTS) float64 888B 1.0 1.0 1.0 ... 1.0 1.0
    VERTICAL_SAMPLING_SCHEME  (N_POINTS) <U256 114kB 'Primary sampling: avera...
    WMO_INST_TYPE             (N_POINTS) float64 888B 844.0 844.0 ... 844.0

How to select a user mode ?#

Let’s import the argopy data fetcher:

In [13]: import argopy

In [14]: from argopy import DataFetcher as ArgoDataFetcher

By default, all argopy data fetchers are set to work with a standard user mode.

If you want to change the user mode, or to simply makes it explicit in your code, you can use one of the following 3 methods:

  • the argopy global option setter:

In [15]: argopy.set_options(mode='standard')
Out[15]: <argopy.options.set_options at 0x74bc1d1d7e10>
  • a temporary context:

In [16]: with argopy.set_options(mode='expert'):
   ....:     ArgoDataFetcher().profile(6902746, 34)
   ....: 
  • or the fetcher option:

In [17]: ArgoDataFetcher(mode='research').profile(6902746, 34)
Out[17]: 
<datafetcher.erddap>
⭐ Name: Ifremer erddap Argo data fetcher for profiles
βš“ Domain: WMO6902746_CYC34
πŸ”— API: https://erddap.ifremer.fr/erddap
🚣 User mode: research
🟑+πŸ”΅ Dataset: phy
πŸŒ₯  Performances: cache=False, parallel=False