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

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.

Problem

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.

Solution

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.

User mode details#

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 mode 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 includes 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.

Table of argopy user mode data processing details for physical parameters (phy dataset)#

expert

standard

research

πŸ„

🏊

🚣

Level of quality (QC flags) retained

all

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

good (QC=1)

Level of assessment (Data mode) retained

all: [R,D,A] modes

all: [R,D,A] modes, but PARAM_ADJUSTED and PARAM are merged in a single variable according to the mode

best only (D mode only)

Pressure error

any

any

smaller than 20db

Variables returned

all

all without jargon (DATA_MODE and QC_FLAG are retained)

comprehensive minimum

About the bgc dataset

The table of argopy user mode data processing details for biogeochemical parameters is being defined (#280) and will be implemented in a near future release.

How to select a user mode ?#

Let’s import the argopy data fetcher:

In [1]: import argopy

In [2]: 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 [3]: argopy.set_options(mode='standard')
Out[3]: <argopy.options.set_options at 0x7fd6f86398b0>
  • a temporary context:

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

In [5]: ArgoDataFetcher(mode='research').profile(6902746, 34)
Out[5]: 
<datafetcher.erddap>
Name: Ifremer erddap Argo data fetcher for profiles
API: https://erddap.ifremer.fr/erddap
Domain: WMO6902746_CYC34
Performances: cache=False, parallel=False
User mode: research
Dataset: phy

Example of differences in user modes#

To highlight differences in data returned for each user modes, let’s compare data fetched for one profile.

You will note that the standard and research modes have fewer variables to let you focus on your analysis. For expert, all Argo variables for you to work with are here.

In [6]: with argopy.set_options(mode='expert'):
   ...:     ds = ArgoDataFetcher(src='gdac').profile(6902755, 12).to_xarray()
   ...:     print(ds.data_vars)
   ...: 
Data variables:
    CONFIG_MISSION_NUMBER     (N_POINTS) int64 2 2 2 2 2 2 2 2 ... 2 2 2 2 2 2 2
    CYCLE_NUMBER              (N_POINTS) int64 12 12 12 12 12 ... 12 12 12 12 12
    DATA_CENTRE               (N_POINTS) <U2 'IF' 'IF' 'IF' ... 'IF' 'IF' 'IF'
    DATA_MODE                 (N_POINTS) <U1 'D' 'D' 'D' 'D' ... 'D' 'R' 'R' 'R'
    DATA_STATE_INDICATOR      (N_POINTS) <U4 '2C  ' '2C  ' ... '2B  ' '2B  '
    DC_REFERENCE              (N_POINTS) <U32 '                              ...
    DIRECTION                 (N_POINTS) <U1 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A'
    FIRMWARE_VERSION          (N_POINTS) <U32 '5611A02                       ...
    FLOAT_SERIAL_NO           (N_POINTS) <U32 'AR2000-16FR012                ...
    PI_NAME                   (N_POINTS) <U64 'Virginie THIERRY              ...
    PLATFORM_NUMBER           (N_POINTS) int64 6902755 6902755 ... 6902755
    PLATFORM_TYPE             (N_POINTS) <U32 'ARVOR                         ...
    POSITIONING_SYSTEM        (N_POINTS) <U8 'ARGOS   ' ... 'ARGOS   '
    POSITION_QC               (N_POINTS) int64 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1
    PRES                      (N_POINTS) float32 3.0 4.0 5.0 6.0 ... 0.0 1.0 2.0
    PRES_ADJUSTED             (N_POINTS) float32 3.0 4.0 5.0 6.0 ... nan nan nan
    PRES_ADJUSTED_ERROR       (N_POINTS) float32 2.4 2.4 2.4 2.4 ... nan nan nan
    PRES_ADJUSTED_QC          (N_POINTS) int64 1 1 1 1 1 1 1 1 ... 1 1 1 1 0 0 0
    PRES_QC                   (N_POINTS) int64 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1
    PROFILE_PRES_QC           (N_POINTS) <U1 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A'
    PROFILE_PSAL_QC           (N_POINTS) <U1 'A' 'A' 'A' 'A' ... 'A' 'F' 'F' 'F'
    PROFILE_TEMP_QC           (N_POINTS) <U1 'A' 'A' 'A' 'A' ... 'A' 'D' 'D' 'D'
    PROJECT_NAME              (N_POINTS) <U64 'ASFAR                         ...
    PSAL                      (N_POINTS) float32 34.87 34.87 ... 34.87 34.87
    PSAL_ADJUSTED             (N_POINTS) float32 34.87 34.87 34.87 ... nan nan
    PSAL_ADJUSTED_ERROR       (N_POINTS) float32 0.01 0.01 0.01 ... nan nan nan
    PSAL_ADJUSTED_QC          (N_POINTS) int64 1 1 1 1 1 1 1 1 ... 1 1 1 1 0 0 0
    PSAL_QC                   (N_POINTS) int64 1 1 1 1 1 1 1 1 ... 1 1 1 1 3 3 3
    TEMP                      (N_POINTS) float32 7.598 7.599 ... 7.598 7.599
    TEMP_ADJUSTED             (N_POINTS) float32 7.598 7.599 7.602 ... nan nan
    TEMP_ADJUSTED_ERROR       (N_POINTS) float32 0.002 0.002 0.002 ... nan nan
    TEMP_ADJUSTED_QC          (N_POINTS) int64 1 1 1 1 1 1 1 1 ... 1 1 1 1 0 0 0
    TEMP_QC                   (N_POINTS) int64 1 1 1 1 1 1 1 1 ... 1 1 1 1 3 3 1
    TIME_LOCATION             (N_POINTS) datetime64[ns] 2018-10-20T00:17:05.0...
    TIME_QC                   (N_POINTS) int64 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1
    VERTICAL_SAMPLING_SCHEME  (N_POINTS) <U256 'Primary sampling: averaged [1...
    WMO_INST_TYPE             (N_POINTS) int64 844 844 844 844 ... 844 844 844

Note

A note for expert users looking at standard and research mode results: they are no PARAM_ADJUSTED variables because they’ve been renamed PARAM wherever the DATA_MODE variable was ADJUSTED or DELAYED.