qoccm¶
-
qoccm.
HILDA_response
(years, OceanMLDepth)¶ Mixed layer response function of the HILDA box-diffusion model (Shaffer and Sarmiento 1992, Sigenthaler and Joos 1996)
Parameters: - years (numpy.array or xarray.DataArray) – Points in time to at which the user wants calculate ocean flux.
- OceanMLDepth (int or float) – Ocean mixed layer depth, used as a tuning parameter.
Returns: return_val – An array of values of the response function at any point in time, times a conversion factor
Return type: numpy.array
-
qoccm.
Sarmiento92_response
(years, OceanMLDepth)¶ Mixed layer response function (GFDL model, Sarmiento et al. 1992) as described in Joos et al., 1996.
Parameters: - years (numpy.array or xarray.DataArray) – Points in time to at which the user wants calculate ocean flux.
- OceanMLDepth (int or float) – Ocean mixed layer depth, used as a tuning parameter.
Returns: return_val – An array of values of the response function at any point in time, times a conversion factor
Return type: numpy.array
-
qoccm.
delta_pco2_ocean
(surface_ocean_ddic)¶ Perturbation pCO2 calculated from parameterized carbonate chemistry as described in Joos et al., 1996.
Parameters: surface_ocean_ddic (float) – Anthropogenic carbon in the surface ocean (umol/kg) Returns: return_val – perturbation pCO2 in units of ppm Return type: float
-
qoccm.
delta_pco2_ocean_lin
(surface_ocean_ddic)¶ Perturbation pCO2 based on constant buffer factor. The buffer factor is calculated as the slope of delta_pco2_ocean at an ocean perturbation pCO2 of 0.001 ppm and anthropogenic carbon concentration (dDIC) of 0.001
Parameters: surface_ocean_ddic (float) – Anthropogenic carbon in the surface ocean (umol/kg) Returns: return_val – perturbation pCO2 in units of ppm Return type: float
-
qoccm.
flux_TC_CC
(yr_ind, datmos_co2, air_sea_gas_exchange_coeff, surface_ocean_ddic, dpco2_oc)¶ Air-sea flux at constant temperature and constant carbonate chemistry
Parameters: - yr_id (int) – Array index corresponding to the time value of the current timestep
- datmos_co2 (float) – Atmospheric perturbation pCO2 (ppm)
- air_sea_gas_exchange_coeff (float) – Air-sea gas exchange coefficient (1/(m2 year))
- surface_ocean_ddic (float) – Anthropogenic carbon in the surface ocean (umol/kg)
- dpco2_oc (numpy.array) – Ocean perturbation pCO2 (ppm)
Returns: air-sea flux in units of ppm/timestep
Return type: float
-
qoccm.
flux_TC_CV
(yr_ind, datmos_co2, air_sea_gas_exchange_coeff, surface_ocean_ddic, dpco2_oc)¶ air-sea flux at constant temperature but variable carbonate chemistry
Parameters: - yr_id (int) – Array index corresponding to the time value of the current timestep
- datmos_co2 (float) – Atmospheric perturbation pCO2 (ppm)
- air_sea_gas_exchange_coeff (float) – Air-sea gas exchange coefficient (1/(m2 year))
- surface_ocean_ddic (float) – Anthropogenic carbon in the surface ocean (umol/kg)
- dpco2_oc (numpy.array) – Ocean perturbation pCO2 (ppm)
Returns: air-sea flux in units of ppm/timestep
Return type: float
-
qoccm.
flux_TV_CC
(yr_ind, datmos_co2, air_sea_gas_exchange_coeff, surface_ocean_ddic, dpco2_oc, pco2_oc, pco2_oc_pi, atmos_co2, DT)¶ Air-sea flux at variable temperature but constant carbonate chemistry
Parameters: - yr_id (int) – Array index corresponding to the time value of the current timestep
- datmos_co2 (float) – Atmospheric perturbation pCO2 (ppm)
- air_sea_gas_exchange_coeff (float) – Air-sea gas exchange coefficient (1/(m2 year))
- surface_ocean_ddic (float) – Anthropogenic carbon in the surface ocean (umol/kg)
- dpco2_oc (numpy.array) – Ocean perturbation pCO2 (ppm)
- pco2_oc (numpy.array) – Ocean pCO2 (ppm)
- pco2_oc_pi (int or float) – Preindustrial ocean pCO2 (ppm)
- atmos_co2 (numpy.array) – Atmopsheric pCO2 (ppm)
- DT (numpy.array or xarray.DataArray) – Warming since preindustrail (degrees celsius)
Returns: air-sea flux in units of ppm/timestep
Return type: float
-
qoccm.
flux_TV_CV
(yr_ind, datmos_co2, air_sea_gas_exchange_coeff, surface_ocean_ddic, dpco2_oc, pco2_oc, pco2_oc_pi, atmos_co2, DT)¶ Actual air-sea flux (variable temperature, variable carbonate chemistry)
Parameters: - yr_id (int) – Array index corresponding to the time value of the current timestep
- datmos_co2 (float) – Atmospheric perturbation pCO2 (ppm)
- air_sea_gas_exchange_coeff (float) – Air-sea gas exchange coefficient (1/(m2 year))
- surface_ocean_ddic (float) – Anthropogenic carbon in the surface ocean (umol/kg)
- dpco2_oc (numpy.array) – Ocean perturbation pCO2 (ppm)
- pco2_oc (numpy.array) – Ocean pCO2 (ppm)
- pco2_oc_pi (int or float) – Preindustrial ocean pCO2 (ppm)
- atmos_co2 (numpy.array) – Atmopsheric pCO2 (ppm)
- DT (numpy.array or xarray.DataArray) – Warming since preindustrail (degrees celsius)
Returns: air-sea flux in units of ppm/timestep
Return type: float
-
qoccm.
ocean_flux
(atmos_co2, OceanMLDepth=109, HILDA=True, DT=None, temperature='constant', chemistry='variable')¶ Calculate ocean carbon uptake as in Joos et al. 1996
Parameters: - atmos_co2 (xarray.DataArray) – Atmopsheric pCO2 (ppm)
- OceanMLDepth (int or float) – Ocean mixed layer depth, used as a tuning parameter.
- HILDA (bool) – When set to True, use the HILDA response function. When False, use Sarmiento et al. 1992 response. Default value is True
- DT (numpy.array or xarray.DataArray) – Warming since preindustrail (degrees celsius)
- temperature (str) – ‘variable’ or ‘constant’, determines whether surface ocean experiences temperature increase
- chemistry (str) – ‘variable’ or ‘constant’, determines whether carbonate chemistry is linear or variable
Returns: ds – This Dataset contains time (year), ocean flux ((Pg C)/yr), surface ocean anthropogenic carbon (umol/kg), surface ocean perturbation pCO2 (ppm)
Return type: xarray.Dataset
-
qoccm.
plot_experiments
(atmos_co2, DT, OceanMLDepth=109)¶ Run multiple experiments and plot the results. Same as the example on readthedocs