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)#
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] |
π’ |
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] |
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).
The list of radiometry parameters is available with utils.list_radiometry_parameters.
Particle backscattering at 700 nanometers
Concentration of coloured dissolved organic matter in seawater
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
In [3]: import argopy
In [4]: with argopy.set_options(mode='standard'):
...: ds = argopy.DataFetcher(src='erddap', ds='bgc').profile(5903248, 34).to_xarray()
...: print(ds.data_vars)
...:
Data variables:
CYCLE_NUMBER (N_POINTS) int64 560B 34 34 34 34 34 34 ... 34 34 34 34 34
DIRECTION (N_POINTS) <U1 280B 'A' 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A'
DOXY (N_POINTS) float32 280B 331.9 331.9 330.7 ... 202.9 203.7
DOXY_DATA_MODE (N_POINTS) <U1 280B 'D' 'D' 'D' 'D' 'D' ... 'D' 'D' 'D' 'D'
DOXY_ERROR (N_POINTS) float32 280B 9.958 9.957 9.921 ... 6.088 6.11
DOXY_QC (N_POINTS) int64 560B 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1
PLATFORM_NUMBER (N_POINTS) int64 560B 5903248 5903248 ... 5903248 5903248
POSITION_QC (N_POINTS) int64 560B 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1
PRES (N_POINTS) float32 280B 4.2 9.7 19.7 ... 1.9e+03 2e+03
PRES_DATA_MODE (N_POINTS) <U1 280B 'D' 'D' 'D' 'D' 'D' ... 'D' 'D' 'D' 'D'
PRES_ERROR (N_POINTS) float32 280B 2.4 2.4 2.4 2.4 ... 2.4 2.4 2.4 2.4
PRES_QC (N_POINTS) int64 560B 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1
PSAL (N_POINTS) float32 280B 33.86 33.86 33.86 ... 34.73 34.72
PSAL_DATA_MODE (N_POINTS) <U1 280B 'D' 'D' 'D' 'D' 'D' ... 'D' 'D' 'D' 'D'
PSAL_ERROR (N_POINTS) float32 280B 0.01 0.01 0.01 ... 0.01 0.01 0.01
PSAL_QC (N_POINTS) int64 560B 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1
TEMP (N_POINTS) float32 280B 4.301 4.106 4.039 ... 1.224 1.158
TEMP_DATA_MODE (N_POINTS) <U1 280B 'D' 'D' 'D' 'D' 'D' ... 'D' 'D' 'D' 'D'
TEMP_ERROR (N_POINTS) float32 280B 0.002 0.002 0.002 ... 0.002 0.002
TEMP_QC (N_POINTS) int64 560B 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1
TIME_QC (N_POINTS) int64 560B 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1
π£ Research 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] |
i.e.: float ID, profile number and direction and all parameter values, including error estimates
The list of radiometry parameters is available with utils.list_radiometry_parameters
Particle backscattering at 700 nanometers
Concentration of coloured dissolved organic matter in seawater
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
In [7]: import argopy
In [8]: with argopy.set_options(mode='research'):
...: ds = argopy.DataFetcher(src='erddap', ds='bgc').profile(5903248, 34).to_xarray()
...: print(ds.data_vars)
...:
Data variables:
CYCLE_NUMBER (N_POINTS) int64 560B 34 34 34 34 34 34 ... 34 34 34 34 34
DIRECTION (N_POINTS) <U1 280B 'A' 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A'
DOXY (N_POINTS) float32 280B 331.9 331.9 330.7 ... 202.9 203.7
DOXY_ERROR (N_POINTS) float32 280B 9.958 9.957 9.921 ... 6.088 6.11
PLATFORM_NUMBER (N_POINTS) int64 560B 5903248 5903248 ... 5903248 5903248
PRES (N_POINTS) float32 280B 4.2 9.7 19.7 ... 1.9e+03 2e+03
PRES_ERROR (N_POINTS) float32 280B 2.4 2.4 2.4 2.4 ... 2.4 2.4 2.4 2.4
PSAL (N_POINTS) float32 280B 33.86 33.86 33.86 ... 34.73 34.72
PSAL_ERROR (N_POINTS) float32 280B 0.01 0.01 0.01 ... 0.01 0.01 0.01
TEMP (N_POINTS) float32 280B 4.301 4.106 4.039 ... 1.224 1.158
TEMP_ERROR (N_POINTS) float32 280B 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
In [11]: import argopy
In [12]: with argopy.set_options(mode='expert'):
....: ds = argopy.DataFetcher(src='gdac', ds='bgc').profile(5903248, 34).to_xarray()
....: print(ds.data_vars)
....:
Data variables:
CONFIG_MISSION_NUMBER (N_POINTS) float64 560B 1.0 1.0 1.0 ... 1.0 1.0 1.0
CYCLE_NUMBER (N_POINTS) float64 560B 34.0 34.0 34.0 ... 34.0 34.0
DATA_CENTRE (N_POINTS) <U2 560B 'CS' 'CS' 'CS' ... 'CS' 'CS' 'CS'
DIRECTION (N_POINTS) <U1 280B 'A' 'A' 'A' 'A' ... 'A' 'A' 'A'
DOXY (N_POINTS) float32 280B 303.9 303.9 ... 185.8 186.4
DOXY_ADJUSTED (N_POINTS) float32 280B 331.9 331.9 ... 202.9 203.7
DOXY_ADJUSTED_ERROR (N_POINTS) float32 280B 9.958 9.957 ... 6.088 6.11
DOXY_ADJUSTED_QC (N_POINTS) float64 560B 1.0 1.0 1.0 ... 1.0 1.0 1.0
DOXY_DATA_MODE (N_POINTS) <U1 280B 'D' 'D' 'D' 'D' ... 'D' 'D' 'D'
DOXY_QC (N_POINTS) float64 560B 3.0 3.0 3.0 ... 3.0 3.0 3.0
DOXY_dPRES (N_POINTS) float32 280B 0.0 0.0 0.0 ... 0.0 0.0 0.0
FIRMWARE_VERSION (N_POINTS) <U32 9kB '93008 ...
FLOAT_SERIAL_NO (N_POINTS) <U32 9kB '4590 ...
PI_NAME (N_POINTS) <U64 18kB 'Susan Wijffels ...
PLATFORM_NUMBER (N_POINTS) float64 560B 5.903e+06 ... 5.903e+06
PLATFORM_TYPE (N_POINTS) <U32 9kB 'APEX ...
POSITIONING_SYSTEM (N_POINTS) <U8 2kB 'ARGOS ' ... 'ARGOS '
POSITION_QC (N_POINTS) float64 560B 1.0 1.0 1.0 ... 1.0 1.0 1.0
PRES (N_POINTS) float32 280B 4.3 9.8 ... 1.9e+03 2e+03
PRES_ADJUSTED (N_POINTS) float32 280B 4.2 9.7 ... 1.9e+03 2e+03
PRES_ADJUSTED_ERROR (N_POINTS) float32 280B 2.4 2.4 2.4 ... 2.4 2.4 2.4
PRES_ADJUSTED_QC (N_POINTS) float64 560B 1.0 1.0 1.0 ... 1.0 1.0 1.0
PRES_DATA_MODE (N_POINTS) <U1 280B 'D' 'D' 'D' 'D' ... 'D' 'D' 'D'
PRES_QC (N_POINTS) float64 560B 1.0 1.0 1.0 ... 1.0 1.0 1.0
PROFILE_DOXY_QC (N_POINTS) <U1 280B 'A' 'A' 'A' 'A' ... 'A' 'A' 'A'
PROFILE_PRES_QC (N_POINTS) <U1 280B 'A' 'A' 'A' 'A' ... 'A' 'A' 'A'
PROFILE_PSAL_QC (N_POINTS) <U1 280B 'A' 'A' 'A' 'A' ... 'A' 'A' 'A'
PROFILE_TEMP_QC (N_POINTS) <U1 280B 'A' 'A' 'A' 'A' ... 'A' 'A' 'A'
PROJECT_NAME (N_POINTS) <U64 18kB 'Argo Australia ...
PSAL (N_POINTS) float32 280B 33.86 33.86 ... 34.73 34.72
PSAL_ADJUSTED (N_POINTS) float32 280B 33.86 33.86 ... 34.73 34.72
PSAL_ADJUSTED_ERROR (N_POINTS) float32 280B 0.01 0.01 0.01 ... 0.01 0.01
PSAL_ADJUSTED_QC (N_POINTS) float64 560B 1.0 1.0 1.0 ... 1.0 1.0 1.0
PSAL_DATA_MODE (N_POINTS) <U1 280B 'D' 'D' 'D' 'D' ... 'D' 'D' 'D'
PSAL_QC (N_POINTS) float64 560B 1.0 1.0 1.0 ... 1.0 1.0 1.0
PSAL_dPRES (N_POINTS) float32 280B 0.0 0.0 0.0 ... 0.0 0.0 0.0
TEMP (N_POINTS) float32 280B 4.301 4.106 ... 1.224 1.158
TEMP_ADJUSTED (N_POINTS) float32 280B 4.301 4.106 ... 1.224 1.158
TEMP_ADJUSTED_ERROR (N_POINTS) float32 280B 0.002 0.002 ... 0.002 0.002
TEMP_ADJUSTED_QC (N_POINTS) float64 560B 1.0 1.0 1.0 ... 1.0 1.0 1.0
TEMP_DATA_MODE (N_POINTS) <U1 280B 'D' 'D' 'D' 'D' ... 'D' 'D' 'D'
TEMP_QC (N_POINTS) float64 560B 1.0 1.0 1.0 ... 1.0 1.0 1.0
TEMP_dPRES (N_POINTS) float32 280B 0.0 0.0 0.0 ... 0.0 0.0 0.0
TIME_LOCATION (N_POINTS) datetime64[ns] 560B 2011-01-19T07:44:26...
TIME_QC (N_POINTS) float64 560B 1.0 1.0 1.0 ... 1.0 1.0 1.0
WMO_INST_TYPE (N_POINTS) float64 560B 846.0 846.0 ... 846.0 846.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