Skip to contents

Converts a measured or modeled CO2 mole fraction to dissolved CO2 concentration in mg/L. This is a volume-based companion to calc_CO2_molKg() and uses water density to convert from mol/kg.

Usage

calc_CO2_mgL(
  CO2_ppm,
  temp_water,
  water_depth_m,
  atmo_press,
  press_units,
  salinity = 0,
  waterDepth_m = lifecycle::deprecated()
)

Arguments

CO2_ppm

Numeric vector. Mole fraction of CO2 in air in parts per million.

temp_water

Numeric vector. Water temperature in degrees Celsius.

water_depth_m

Numeric vector. Water depth above the sensor in meters.

atmo_press

Numeric vector. Atmospheric pressure at the water surface.

press_units

Character string giving the units of atmo_press. See convert_pressure() for accepted pressure units.

salinity

Numeric vector. Salinity in practical salinity units. Defaults to freshwater (0).

waterDepth_m

[Deprecated] Use water_depth_m instead.

Value

Numeric vector of dissolved CO2 concentration in mg/L.

Examples

calc_CO2_mgL(
  CO2_ppm = c(420, 800, 1200),
  temp_water = 20,
  water_depth_m = 0.5,
  atmo_press = 101.325,
  press_units = "kPa"
)
#> [1] 0.7058479 1.3444723 2.0167084