Create the "standard_names" vocab¶

This section demonstrates setting up a vocabulary for CF standard_names to be used with known OMSA servers and assuming a set of variables of interest. These vocabularies can then be saved and combined to create one for regular use, or used individually, or input together to OMSA.run().

The workflow for making the vocabulary is to

  1. enter the variable nickname in the first text box
  2. enter strings to include and exclude to filter the list of variable names down
  3. select however many options that will be used as exact matches to be equivalent to your variable
  4. click save
  5. repeat with each variable for vocabulary
  6. save to disk

Shown below is example use of the built-in widget for selecting one variable in the given vocabulary, and then something similar was done for all the other variables. (The widget can be saved to html and show the last state but not to fully function without a kernel.)

In [1]:
import cf_pandas as cfp
import ocean_model_skill_assessor as omsa

CF Standard Names¶

In the best case scenarios, model and data variables will have a standard_name associated with them, so we create a vocabulary that can be used to exactly match those names. Even if a given server or file doesn't include many of these variables, they will be matched if present.

In [2]:
sn = cfp.standard_names()
w = cfp.Selector(options=sn)
In [4]:
# w.vocab.save(omsa.VOCAB_PATH("standard_names"))