:c

Defines a numeric constant with units and (optionally) other attributes

c: (value) (units) :c

Arguments
labeltypedescription
value number/string numeric value of constant
units string units of constant (optional)
Returns
constant variable returned variable with value and units.

Description

The c: :c construct allows the user to define a constant with units. Units are optional, but must be enclosed within parentheses if included.

Example

SOURCES .NOAA .NCEP-NCAR .CDAS-1 .DAILY .Diagnostic .surface .prate
c: 0.001 (m3 kg-1) :c
mul
c: 1000 (mm m-1) :c
mul
c: 86400 (s day-1) :c
mul


This example uses the c: :c construct to convert the units of NCEP-NCAR Reanalysis precipitation from kg m-2 s-1 to mm/day through the use of three multiplied conversion factors.

Live Example Link



See also

units: unitconvert