Skip to content

Feat: add CO2CONTENT.m algo, #9

Merged
RaphaelBajon merged 3 commits into
mainfrom
feat/content
May 28, 2026
Merged

Feat: add CO2CONTENT.m algo, #9
RaphaelBajon merged 3 commits into
mainfrom
feat/content

Conversation

@RaphaelBajon

Copy link
Copy Markdown
Owner

This pull request introduces a major new feature to the canyonbpy package: the addition of the CONTENT method for generating internally-consistent carbonate system estimates, alongside significant improvements to input broadcasting and documentation. The update also refines the handling of input shapes and coordinates, making predictions more robust and user-friendly when working with multi-dimensional xarray datasets. The package version is bumped to 0.4.0 to reflect these changes.

New CONTENT functionality:

  • Added the content method to the CanyonBAccessor class, enabling users to compute internally-consistent carbonate system variables (AT, CT, pH, pCO₂) by combining CANYON-B neural network outputs with CO2SYS estimates, including uncertainty propagation and options to include raw or full sub-outputs.
  • Implemented the _pack_content_results method to correctly package CONTENT outputs as xarray.Dataset objects, preserving dimensions and coordinates, and supporting optional output details.

Input broadcasting and shape handling:

Documentation and usability:

  • Expanded the accessor docstrings to document the new CONTENT workflow, provide clearer usage examples, and clarify input requirements and options.
  • Improved parameter documentation for input error arguments in canyonb and clarified default values and units.

Tests:

  • Updated tests to import and check the new CONTENT functionality and ensure merge compatibility with xarray.

@RaphaelBajon RaphaelBajon added documentation Improvements or additions to documentation enhancement New feature or request labels May 28, 2026
@RaphaelBajon RaphaelBajon self-assigned this May 28, 2026
@RaphaelBajon RaphaelBajon merged commit b15640e into main May 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant