cioos-siooc / ocean-data-parser

A Python package for parsing oceanographic proprietary data formats to xarray Dataset.
https://cioos-siooc.github.io/ocean-data-parser/
GNU General Public License v3.0
4 stars 1 forks source link

Add flags to dfo.odf for variables handling #69

Open JessyBarrette opened 9 months ago

JessyBarrette commented 9 months ago

Issue

As of now a number of different parsers are generating and or mapping the original variable store within a source file to a variable vocabulary.

Some of those variables map to multiple vocabulary terms, as example for the GF3 term TEMP_01 will map to the following BODC terms based on the organization (IML vs BIO), the variable label, its units and the instrument associated:

By default the tool outputs all the original variables as well as the mapped variables from BODC. This has for goal to make it easier to present all the potential mapping within ERDDAP. However this can significantly increase the size of the generated files with extra variables which are not mandatory.

Suggestion

In some cases, only the original variables are desired and within the others only the most precise BODC term would be needed.

It would good to add a optional flag within the dfo.odf parser to handle the different cases:

  1. original: Keep original variable names (still populate the variables attributes to the most accurate BODC term)
  2. rename: Map ODF variables to BODC's most accurate term
  3. multi: Generate all BODC associated variables (present stage)