Parameter Definition Consolidation

Part of [OOIION-579](https://jira.oceanobservatories.org/tasks/browse/OOIION-579).

Consolidates the schema for defining additional parameters and organization for the various parameter, parameter types and collections, known as Parameter Dictionaries. 

# Adding Parameters

All parameters to be used for datasets are _currently_ defined in the Google Docs 
[R2 Preload Resources](https://docs.google.com/spreadsheet/ccc?key=0AttCeOvLP6XMdG82NHZfSEJJOGdQTkgzb05aRjkzMEE#gid=57) 
spread sheet. Under the tab for ParameterDefs, authors can define additional parameters to be used by the ION system.

## Columns

 - **Scenario**: This column declares the group that the parameter is a part of. When the system loads resources from
   the spreadsheet, they are loaded based on their scenario. Scenario defines the order and the group of resources to
   load at any given time. 

 - **confluence**: Any reference material pertaining to the parameter defined in the confluence documentation should be
   listed in this column; specifically, this refers to data product specifications.

 - **Name**: The canonical name for the parameter. Names should practice the programming practice of being underscore
   '\_' delimited. Example names include: `battery_voltage_main` `pump_mode` `temperature` `sound_velocity`

 - **ID**: **This column must be unique**. The ID column contains a unique identifier used to reference the parameter in
   other sheets of the spreadsheet. Resource identification numbers are generated at runtime (when the system actually
   loads them), and they are random, so in order to refer to parameters in the spreadsheet, we use the ID columns.

 - **ID Conflict**: Identifies a conflicting ID number, not to be filled in.

 - **HID**: A deprecated column that shows the parameter and pertinent information in an underscore delimited format. Do
   not fill this in.

 - **HID Conflict**: No longer used

 - **ParameterType**: The computational type that the parameter is, described in the parameter type section.

 - **Value Encoding**: The primitive characterization for the parameter, described below in the paramater type section.

 - **Code Set**: Only used if the parameter type is a `category<>`, described in the parameter type section.

 - **Unit of Measure**: The UDUnits system to describe the units that the parameter measures.

 - **Fill Value**: A value to represent the absence of a value. This lets operators and programs to understand that the
   parameter's value is missing or invalid. Note: `NaN` is not allowed to be a fill value.

## Parameter Types

#### QuantityType

A numerical primitive representation, this is the most widely used parameter type. This type is a container for numeric
values and is optimized for various types of numeric values. To use this parameter type use `quantity` in the Parameter
Type column and fill in the appropriate value encoding and fill value.

Appropriate value encodings are:

 - Integer types: `int8 int16 int32 int64`
 - Unsigned Integers (positive values only): `uint8 uint16 uint32 uint64`
 - Floating Point Values: `float32 float64`

#### Array

A single record that holds multiple values, the values could be either a string of characters or multiple numeric
values. To represent an array use `array<` _parameter type_ `>` where the value inside the angle brackets are the type of
the values inside each array. The two most common exampes are `array<str>` to represent a variable length string or
`array<quantity>` to represent an array of values. The value encoding must be appropriate for the inside parameter type,
like `float32` for an `array<quantity>` or `str` for `array<str>`.

#### Boolean

A record that is either true or false. Parameters of this type should be defined as `boolean`. Conditional expressions
and boolean values are actually numeric expressions where any non-zero value is considered true and zero is false. Value
encoding is not needed for these parameter types but the fill value should be either `true` or `false`.  

#### Range

A record that represent a range of numeric values. The appropriate parameter type for this is `range<quantity>`. 


#### Constants

Two specific constants are used, a numeric constant `constant<quantity>` or a constant string `constant<str>`. If a
constant string is used a **valid length must be specified in the value encoding column**: the length is defined by
using 'S' followed by the length.  Examples: S8 represents an 8 character string, S12 a 12 character string etc.
Standard practice is to leave a little extra room, so if you know the string takes up only 11 characters make it S16
just to leave room for error and growth.

#### Record

Represents a complex value composed of Python primitives, typically a dictionary.

#### Category

This is an enumerated type, internally represented as an integer but externally represented as a meaningful string. They
are defined similar to C enumeration types. The proper parameter type is `category<` _integer type_ `:str>` and the code
set defines the enumeration, the value encoding should be an integer type, `int8` is the common. An example is:

```
Parameter Type: category<int8:str>
Value Encoding: int8
Code Set: {0: 'apples', 1:'oranges', 2:'bananas', -9: 'no fruit'}
Fill Value: -9
Unit of Measure: 1
```