This is a basic function with no inputs. It prints to the console the units
that can be used in the functions convert_DO(), convert_MR(),
convert_rate(), and convert_rate.ft().
unit_args()A print out to the console of accepted units
Note that some oxygen unit conversions require temperature (t), salinity
(S), and atmospheric pressure (P) to be specified.
Note the difference between percent air saturation (%Air), where air
saturated water is ~100%, and percent oxygen saturation (%Oxy), where air
saturated water is ~20.946% oxygen saturated. In other words, %Oxy = %Air x 0.20946.
For most units a fuzzy string matching algorithm is used to accept different
formatting styles. For example, "mg/l", "mg/L", "mgL-1", "mg l-1",
"mg.l-1" are all parsed the same.
convert_DO()from and to:
Oxygen concentration units. Should use SI units (L or kg) for the
denominator.
Do NOT require t, S and P for conversions:
"mg/L", "ug/L", "mol/L", "mmol/L", "umol/L", "nmol/L", "pmol/L"
Require t, S and P for conversions:
"uL/L", "mL/L", "mm3/L", "cm3/L", "mg/kg", "ug/kg", "mol/kg", "mmol/kg", "umol/kg",
"nmol/kg", "pmol/kg", "uL/kg", "mL/kg", "ppm" (i.e. parts per
million, equivalent to mg/kg).
Percentage saturations (require t, S and P):
"%Air" (i.e. % Air Saturation), "%Oxy" (i.e. % Oxygen Saturation)
Pressure units (require t, S and P):
"Torr", "hPa", "kPa", "mmHg", "inHg"
convert_rate() and convert_rate.ft()oxy.unit:
See above.
time.unit or as part of flowrate.unit:"sec", "min", "hour", "day"
flowrate.unit (convert_rate.ft only):
For example, in 'ml/min', 'L/s', etc.
"uL", "mL", "L"
Combining units for output.unit in convert_rate() and
convert_rate.ft(), or for use in convert_MR(), must follow these
orders:
Absolute rates: Oxygen/Time e.g. "mg/s", "umol/min", "mL/h"
Mass-specific rates: Oxygen/Time/Mass e.g. "mg/s/ug", "umol/min/g",
"mL/h/kg"
Area-specific rates: Oxygen/Time/Area e.g. "mg/s/mm2",
"umol/min/cm2", "mL/h/m2"
Oxygen amount units:
"ug", "mg", "pmol", "nmol", "umol", "mmol", "mol", "uL", "mL", "mm3", "cm3"
Note "mm3" and "cm3" (i.e. cc) are used in some older publications.
These are equivalent to "uL" and "mL" respectively.
Time units:
"sec", "min", "hour", "day"
Mass units for mass-specific rates:
"ug", "mg", "g", "kg"
Area units for area-specific rates:
"mm2", "cm2", "m2", "km2"
# Run the function:
unit_args()
Run the code above in your browser using DataLab