Reference tables and NVS vocabulary server#
The Argo netcdf format is strict and based on a collection of variables fully documented and conventioned. All reference tables can be found in the Argo user manual.
However, a machine-to-machine access to these tables is often required. This is possible thanks to the work of the Argo Vocabulary Task Team (AVTT) that is a team of people responsible for the NVS collections under the Argo Data Management Team governance.
Note
The GitHub organization hosting the AVTT is the āNERC Vocabulary Server (NVS)ā, aka ānvs-vocabsā. This holds a list of NVS collection-specific GitHub repositories. Each Argo GitHub repository is called after its corresponding collection ID (e.g. R01, RR2, R03 etc.). The current list is given here.
The management of issues related to vocabularies managed by the Argo Data Management Team is done on this repository.
argopy provides the utility class ArgoNVSReferenceTables to easily fetch and get access to all Argo reference tables. If you already know the name of the reference table you want to retrieve, you can simply get it like this:
In [1]: from argopy import ArgoNVSReferenceTables
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[1], line 1
----> 1 from argopy import ArgoNVSReferenceTables
ImportError: cannot import name 'ArgoNVSReferenceTables' from 'argopy' (/home/docs/checkouts/readthedocs.org/user_builds/argopy/checkouts/latest/argopy/__init__.py)
In [2]: NVS = ArgoNVSReferenceTables()
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[2], line 1
----> 1 NVS = ArgoNVSReferenceTables()
NameError: name 'ArgoNVSReferenceTables' is not defined
In [3]: NVS.tbl('R01')
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[3], line 1
----> 1 NVS.tbl('R01')
NameError: name 'NVS' is not defined
The reference table is returned as a pandas.DataFrame. If you want the exact name of this table:
In [4]: NVS.tbl_name('R01')
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[4], line 1
----> 1 NVS.tbl_name('R01')
NameError: name 'NVS' is not defined
If you donāt know the reference table ID, you can search for a word in tables title and/or description with the search method:
In [5]: id_list = NVS.search('sensor')
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[5], line 1
----> 1 id_list = NVS.search('sensor')
NameError: name 'NVS' is not defined
This will return the list of reference table ids matching your search. It can then be used to retrieve table information:
In [6]: [NVS.tbl_name(id) for id in id_list]
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[6], line 1
----> 1 [NVS.tbl_name(id) for id in id_list]
NameError: name 'id_list' is not defined
The full list of all available tables is given by the ArgoNVSReferenceTables.all_tbl_name() property. It will return a dictionary with table IDs as key and table name, definition and NVS link as values. Use the ArgoNVSReferenceTables.all_tbl() property to retrieve all tables.
In [7]: NVS.all_tbl_name
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[7], line 1
----> 1 NVS.all_tbl_name
NameError: name 'NVS' is not defined