Convert units of ICPAC CHIRPS-BLENDED dekadal rainfall_indices rfe_merged_vs_meanrfe_merged from percent to

Units in the Data Library

This Data Library makes some effort to interpret and manipulate the units given for each variable. The code is based on the udunits package, though we had to make a number of changes in order to arrive at something suitable for our needs. Some of this documentation is taken from the udunits documentation.

A unit is the amount by which a physical quantity is measured. For example:

Physical QuantityPossible Unit
timeweeks
distancecentimeters
powerwatts

For the most part, units are purely multiplicitive, i.e. if we multiply a velocity in m/s times the time in s, we end up with a distance in m. This technique of dimensional analysis is a powerful constraint in checking scientific calculations.

Some units (also called scales) also have an implicit origin or base value. For example, zero on the Celsius scale corresponds to 273.15 on the Kelvin scale. So if we want to convert a Celsius temperature to a Kelvin temperature, we have to add 273.15. On the other hand, if we have a Celsius temperature anomaly (i.e. deviation from its normal value), it is already a Kelvin temperature anomaly, and requires no conversion. If we remove the mean, for example, from a temperature, it then loses its origin and becomes a 'anomaly' unit.

Unfortunately, we use the word Celsius or Kelvin to refer both to the scale and the anomaly unit. To help diminish the impact of this ambiguity, we have chosen the convention to refer to temperature units as Celsius_scale or Kelvin_scale, while the temperature anomaly equivalent is degree_Celsius or degree_Kelvin. (The plain names are considered to be scales.)

Note that scales (i.e. units with origins) do not really work properly in dimensional analysis, a reflection of the fact that in most cases a reference value should be removed before such a quantity is manipulated.

To create a units grammer that is readily manipulated by machine, we follow the convention that units are separated by spaces, / denotes division, and m2 corresponds to meters squared while m2 s-1 would be meters squared per second. The origin mentioned earlier is denoted by above, i.e. Celsius is defined as degree_Kelvin above 273.15. @, from, and since are all synonyms for above.