csdms / standard_names_registry

Registry of CSDMS Standard Names
MIT License
0 stars 1 forks source link

Build Status

Master List of CSDMS Standard Names

Adding new names

If you would like to add new names to the official CSDMS Standard Names Registry, please do so by either submitting it as an issue to the GitHub issue tracker or as a pull request that adds your new names to names.txt.

Some basic rules

The CSDMS wiki provides a full description of the basic rules. Below are the basics.

For those so inclined, here is the current regular expression for a CSDMS Standard Names,

^[a-z]([a-zA-Z0-9~-]|_(?!_))*(__)[a-z0-9]([a-z0-9~-]|_(?!_))*[a-z0-9]$

With the standard_names package, this is the re attribute of the StandardName class (StandardName.re).

Helpful links

Scrape names from the CSDMS Wiki

There are many examples of CSDMS Standard Names on several pages of the CSDMS wiki. These names can be scraped with the snscrape command provided by the standard_names package.

$ snscrape --no-headers \
    https://csdms.colorado.edu/wiki/CSN_Quantity_Templates \
    http://csdms.colorado.edu/wiki/CSN_Object_Templates \
    http://csdms.colorado.edu/wiki/CSN_Operation_Templates \
    http://csdms.colorado.edu/wiki/CSN_Examples > scraped_names.txt

Merge two lists

The following command will merge two lists (one name per line, no leading or trailing whitespace) into one sorted list of unique names.

$ cat list1.txt list2.txt | sort | uniq