xarray.Dataset.argo.content

xarray.Dataset.argo.content#

Dataset.argo.content(**kwargs)#

Nutrients and Carbonate System Variables predictor made consistent with chemistry constraints with CONTENT

This is an implementation of the CONTENT method: a combination of CANYON-B Bayesian neural network mappings of AT, CT, pH and pCO2 made consistent with carbonate chemistry constraints for any set of water column P, T, S, O2, location data as an alternative to (spatial) climatological interpolation ([1]).

When using this method, please cite the paper.

Examples

Load data, they must contain oxygen measurements:

from argopy import DataFetcher
# ArgoSet = DataFetcher(ds='bgc', mode='standard', params='DOXY', measured='DOXY').float(1902605)
ArgoSet = DataFetcher(ds='bgc', mode='standard', params='DOXY', measured='DOXY').region([-75, -60, 20, 30, 0, 1000, '20250101', '20250201'])
ds = ArgoSet.to_xarray()

Once input data are loaded, make parameters predictions with or without specifying input errors on pressure (epres, in dbar), temperature (etemp, in degC), salinity (epsal, in PSU) and oxygen (edoxy, in micromole/kg). For interested users, uncertainties on predicted parameters can also be included.

ds.argo.content.predict()
ds.argo.content.predict(include_uncertainties=True)
ds.argo.content.predict(epres=0.5, etemp=0.005, epsal=0.005, edoxy=0.01)
ds.argo.content.predict(epres=0.5, etemp=0.005, epsal=0.005, edoxy=0.01, include_uncertainties=True)
ds.argo.content.predict(epres=0.5, etemp=0.005, epsal=0.005, edoxy=np.array([...]))
By default, if no input errors are specified, the following default values are used:
  • epres = 0.5 dbar

  • etemp = 0.005 degC

  • epsal = 0.005 PSU

  • edoxy = 1% of DOXY value

Notes

This Python implementation is largely inspired by work from HCBSciencesProducts (HCBScienceProducts) which is available at HCBScienceProducts/CONTENT. This implementation relies heavily on the great PyCO2SYS package (mvdh7/PyCO2SYS) for carbonate chemistry calculations [2] which itself is a Python adaptation of the original CO2SYS software by C. Lewis and D. Wallace [3_] and subsequent Matlab functions CO2SYS.m by Van Heuven et al. [4] and errors.m and derivnum.m by Orr et al. [5].

References

[1]

Bittig, H. C., Steinhoff, T., Claustre, H., Fiedler, B., Williams, N. L., Sauzede, R., Kortzinger, A., and Gattuso, J. P. (2018). An alternative to static climatologies: Robust estimation of open ocean CO2 variables and nutrient concentrations from T, S, and O2 data using Bayesian neural networks. Frontiers in Marine Science, 5, 328. doi:10.3389/fmars.2018.00328

[2]

Humphreys, M. P., Lewis, E. R., Sharp, J. D., & Pierrot, D. (2022). PyCO2SYS v1.8: Marine carbonate system calculations in Python. Geoscientific Model Development, 15(1), 15-43. doi:10.5194/gmd-15-15-2022

[3]

Lewis, E. R., & Wallace, D. W. R. (1998). Program developed for CO2 system calculations (No. cdiac: CDIAC-105). Environmental System Science Data Infrastructure for a Virtual Ecosystem (ESS-DIVE)(United States). doi:10.15485/1464255

[4]

Van Heuven, S. M. A. C., Pierrot, D., Rae, J. W. B., Lewis, E., & Wallace, D. W. R. (2011). MATLAB program developed for CO2 system calculations. doi: 10.3334/CDIAC/otg.CO2SYS_MATLAB_v1.1

[5]

Orr, J. C., Epitalon, J. M., Dickson, A. G., & Gattuso, J. P. (2018). Routine uncertainty propagation for the marine carbon dioxide system. Marine Chemistry, 207, 84-107. doi: 10.1016/j.marchem.2018.10.006