my_code_base.ocean.utils

Module Contents

my_code_base.ocean.utils.cond2sal(C, T, p)[source]

Compute salinity from conductivity, according to Lewis and Perkin [1981].

Example

>>> cond2sal(C=52, T=25, p=1013)
34.20810771080768
my_code_base.ocean.utils.ppm2uatm(xCO2, p_equ, input='wet', T=None, S=None)[source]

Convert mole fraction concentration (in ppm) into partial pressure (in µatm) following Dickson et al. [2007]

\[pCO_2 = xCO_2 \cdot p_\text{equ}\]
Parameters:
  • xCO2 (float or pandas.Series) – The measured CO2 concentration (in ppm)

  • p_equ (float or pandas.Series) – The measured pressure (in hPa, Pa or atm) at the equilibrator (hint: you might want to smoothen your time series)

  • input (str [default: "wet"]) – Either “wet” or “dry”, specifying the type of air, in which the concentration is measured. If the CO2 concentration is measured in dry air, one must correct for the water vapor pressure. In this case, make sure to also provide T (temperature in Kelvin) and S (salinity in PSU) as arguments.

  • T (float or pandas.Series [default: None]) – Temperature in Kelvin (needs to be provided if xCO2 is measured in dry air)

  • S (float or pandas.Series [default: None]) – Salinity in PSU (needs to be provided if xCO2 is measured in dry air)

my_code_base.ocean.utils.water_vapor_pressure(T, S)[source]

Compute the water vapor pressure by means of the temperature [K] and the salinity [PSU] following Weiss and Price [1980].

Parameters: