[2]:
import argopy
from argopy import DataFetcher as ArgoDataFetcher
/home/docs/checkouts/readthedocs.org/user_builds/argopy/checkouts/v0.1.4/argopy/plotters.py:33: UserWarning: argopy requires cartopy installed for full map plotting functionality
warnings.warn("argopy requires cartopy installed for full map plotting functionality")
User mode: standard vs expert¶
Problem
For beginners or 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 functionning, 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 standard users, we implemented in argopy different levels of verbosity and data processing to hide or simply remove variables only meaningful to experts.
Which type of user are you ?¶
If you don’t know in which user category you would place yourself, try to answer the following questions:
- what is a WMO number ?
- what is the difference between Delayed and Real Time data mode ?
- what is an adjusted parameter ?
- what a QC flag of 3 means ?
If you answered to no more than 1 question, you probably would feel more confortable with the standard user mode. Otherwise, you can give a try to the expert mode.
In standard mode, fetched data are automatically filtered to account for their quality (only good are retained) and level of processing by the data centers (wether they looked at the data briefly or not).
Setting the user mode¶
By default, all argopy data fetchers are set to work with a standard user mode.
If you want to change the user mode, or simply makes it explicit, you can use:
- argopy global options:
[3]:
argopy.set_options(mode='standard')
[3]:
<argopy.options.set_options at 0x7f8402498f98>
- a temporary context:
[4]:
with argopy.set_options(mode='standard'):
ArgoDataFetcher().profile(6902746, 34)
- option when instantiating the data fetcher:
[5]:
ArgoDataFetcher(mode='standard').profile(6902746, 34)
[5]:
<datafetcher 'Ifremer erddap Argo data fetcher for floats'>
Domain: phy_WMO6902746_CYC0034
Backend: erddap
User mode: standard
Differences in user modes¶
To highlight that, let’s compare data fetched for one profile with each modes.
You will note that the standard mode has fewer variables to let you focus on your analysis. For expert, all Argo variables for you to work with are here.
The difference is the most visible when fetching Argo data from a local copy of the GDAC ftp, so let’s use a sample of this provided by argopy tutorial datasets:
[6]:
ftproot, flist = argopy.tutorial.open_dataset('localftp')
argopy.set_options(local_ftp=ftproot)
[6]:
<argopy.options.set_options at 0x7f83f62b7278>
In standard mode:
[7]:
with argopy.set_options(mode='standard'):
ds = ArgoDataFetcher(src='localftp').profile(6901929, 2).to_xarray()
print(ds.data_vars)
Data variables:
CYCLE_NUMBER (N_POINTS) int64
DATA_MODE (N_POINTS) <U1
DIRECTION (N_POINTS) <U1
PLATFORM_NUMBER (N_POINTS) int64
POSITION_QC (N_POINTS) int64
PRES (N_POINTS) float64
PRES_QC (N_POINTS) int64
PSAL (N_POINTS) float64
PSAL_QC (N_POINTS) int64
TEMP (N_POINTS) float64
TEMP_QC (N_POINTS) int64
TIME_QC (N_POINTS) int64
In expert mode:
[8]:
with argopy.set_options(mode='expert'):
ds = ArgoDataFetcher(src='localftp').profile(6901929, 2).to_xarray()
print(ds.data_vars)
Data variables:
CONFIG_MISSION_NUMBER (N_POINTS) int64 2 2
CYCLE_NUMBER (N_POINTS) int64 2 2
DATA_CENTRE (N_POINTS) <U2 'BO' 'BO'
DATA_MODE (N_POINTS) <U1 'R' 'R'
DATA_STATE_INDICATOR (N_POINTS) <U4 '2B ' '2B '
DC_REFERENCE (N_POINTS) <U32 ' ' ' '
DIRECTION (N_POINTS) <U1 'A' 'A'
FIRMWARE_VERSION (N_POINTS) <U32 '5900A04 ' '5900A04 '
FLOAT_SERIAL_NO (N_POINTS) <U32 'AI2600-17EU01 ' 'AI2600-17EU01 '
JULD_LOCATION (N_POINTS) datetime64[ns] 2018-02-24T09:16:24.999998208 2018-02-24T09:16:24.999998208
PI_NAME (N_POINTS) <U64 "Diarmuid O'Conchubhair " "Diarmuid O'Conchubhair "
PLATFORM_NUMBER (N_POINTS) int64 6901929 6901929
PLATFORM_TYPE (N_POINTS) <U32 'ARVOR ' 'ARVOR '
POSITIONING_SYSTEM (N_POINTS) <U8 'GPS ' 'GPS '
POSITION_QC (N_POINTS) int64 1 1
PRES (N_POINTS) float32 0.4 0.5
PRES_ADJUSTED (N_POINTS) float32 nan nan
PRES_ADJUSTED_ERROR (N_POINTS) float32 nan nan
PRES_ADJUSTED_QC (N_POINTS) int64 0 0
PRES_QC (N_POINTS) int64 1 1
PROFILE_PRES_QC (N_POINTS) <U1 'A' 'A'
PROFILE_PSAL_QC (N_POINTS) <U1 'A' 'A'
PROFILE_TEMP_QC (N_POINTS) <U1 'F' 'F'
PROJECT_NAME (N_POINTS) <U64 'Argo Ireland ' 'Argo Ireland '
PSAL (N_POINTS) float32 35.342 35.343
PSAL_ADJUSTED (N_POINTS) float32 nan nan
PSAL_ADJUSTED_ERROR (N_POINTS) float32 nan nan
PSAL_ADJUSTED_QC (N_POINTS) int64 0 0
PSAL_QC (N_POINTS) int64 1 1
TEMP (N_POINTS) float32 10.028 10.028
TEMP_ADJUSTED (N_POINTS) float32 nan nan
TEMP_ADJUSTED_ERROR (N_POINTS) float32 nan nan
TEMP_ADJUSTED_QC (N_POINTS) int64 0 0
TEMP_QC (N_POINTS) int64 4 4
TIME_QC (N_POINTS) int64 1 1
VERTICAL_SAMPLING_SCHEME (N_POINTS) <U256 'Primary sampling: averaged [10 sec sampling, 5 dbar average from 2000 dbar to 500 dbar; 10 sec sampling, 2 dbar average from 500 dbar to 100 dbar; 10 sec sampling, 1 dbar average from 100 dbar to 0.0 dbar] ' 'Primary sampling: averaged [10 sec sampling, 5 dbar average from 2000 dbar to 500 dbar; 10 sec sampling, 2 dbar average from 500 dbar to 100 dbar; 10 sec sampling, 1 dbar average from 100 dbar to 0.0 dbar] '
WMO_INST_TYPE (N_POINTS) int64 844 844