Page tree
Skip to end of metadata
Go to start of metadata


UnitConversions

UnitConversions are defined to map internal units to external units. For each unit to be converted, the conversion method can be defined. This may be a simple multiplication (e.g. feet to meters), as well as a possible increment (e.g. o F to o C). The converted value is (inputUnitTypeValue * multiplier) + increment. In DELFT-FEWS the convention for storing level data is that this is with reference to the local datum. If the external unit specifies that the datum is global, a Boolean flag can be used to indicate the data should be converted on import.

Each UnitConversion configured must be registered in the UnitConversionsDescriptors configuration (see Regional Configuration). The Id used in registering the UnitConversion is the same as the name of the configuration. When available on the file system, the name of the XML file for configuring a UnitConversion called for example NWPUnits may be:

NWPUnits 1.00 default.xml

NWPUnits

Fixed file name for the NWPUnits UnitConversions.

1.00

Version number

default

Unit to indicate the version is the default configuration (otherwise omitted).


Figure 156 Elements of the UnitConversions configuration.

addInverses

When set to true, the inverse unit conversions (from output to input unit) are automatically generated and added to this set of unitConversions

inputUnitType

Definition of the input unit. Depending on the conversion being used for import or for export this may be the unit as defined in DELFT-FEWS or that as defined in the external data source.

outputUnitType

Definition of the output unit. Depending on the conversion being used for import or for export this may be the unit as defined in DELFT-FEWS or that as defined in the external data source.

multiplier

Multiplier to be applied to data on import/export.

incrementer

Value to be added to data on import/export.

convertDatum

Boolean flag to indicate if the data is to be converted on input to local reference level. If this value is true, and the parameter to be imported to support datum conversion (see Parameter definition in Region Configuration), the "z" value of the location is subtracted from the data (see Location definition in Region Configuration).