Skip to content

Release 0.2.0: corrected physics, exposed parameters, devices, derivatives - #4

Open
cfranken wants to merge 2 commits into
mainfrom
release-0.2.0
Open

cfranken wants to merge 2 commits into
mainfrom
release-0.2.0

Conversation

@cfranken

Copy link
Copy Markdown
Member

Prepares OceanOptics 0.2.0. Do not tag yet: a follow-up on the Raman defaults (coefficient, exponent, band shape) against newly added papers may still change results.

Two commits:

  1. Absorbed light per constituent, pigment partitions, chloroplast emission, ocean floor: the 0.2.0 development state as it was before the code overhaul.
  2. Release 0.2.0: corrected physics, exposed parameters, device support, derivatives, tests, docs.

Changed results

  • Phytoplankton{Bricaud1998} absorption is now A(λ)·Chl^E(λ), as the bundled HydroLight table defines it (ap = A·[chl]^E). Version 0.1.0 computes A·Chl^(1−E). The two agree at Chl = 1; at 440 nm the new value is 0.54× the old at Chl = 0.1 and 1.86× at Chl = 10. The quantity is particulate absorption (phytoplankton plus detritus), and the docs now say so.
  • Water Raman is an energy conversion by default, as in Mobley et al. (1993) and HydroLight. The source rises by ×1.135 at 350 nm and ×1.31 at 700 nm excitation. The previous behaviour is WaterRaman(conversion = PhotonConversion()).
  • FellMineral defaults follow Fell (1997): ω = 0.95 and B = 0.036 (were 0.96 and 0.03).
  • Pigment partitions hold the edge shares outside their tables, so excitation below 400 nm is no longer dropped. Photoprotective carotenoids are a separate class with zero transfer by default.

Breaking

  • layer_optics and column_optics take the element type as an optional first argument; the FT keyword is gone.
  • Result structs have array type parameters, so OceanLayerOptics{FT} is no longer concrete.
  • phase_id is a vector of content keys, one per expansion.
  • WaterRaman has conversion units and a linear_depolarization field (default 0.17, Mobley Eq. 9; the definition follows Porto 1966).
  • Gordon1992 is removed; it was never implemented.

The CHANGELOG lists all of them, and the docs have a "Migrating from 0.1" section with before/after code.

Added

  • Every physical parameter is a field or keyword with a documented default, listed in docs/src/reference/parameters.md. A test checks that each one changes the result.
  • Results and spectral tables move to device arrays with Adapt.adapt, tested on JLArrays and CUDA. Float32 models return Float32.
  • Model parameters (chlorophyll, CDOM, particles, temperature, salinity, Fournier–Forand backscatter fraction) can carry ForwardDiff dual numbers through layer_optics and column_optics.
  • Raman phase function and matrix, conversion-unit types, table lookup types.
  • Aqua, JET, ExplicitImports, inference, Float32, device and parameter tests, and published-value references. 37 deliberately wrong implementations were each caught by at least one test.

Packaging

  • Adapt is a new dependency; Interpolations is dropped (interpolated values are bit-identical).
  • The docs build is strict.
  • CI.yml runs the tests; Documentation.yml builds the docs on pull requests and deploys on main and tags.

Bundled data

The Fluspect emission and PROSPECT-D absorption tables were transcribed from the SCOPE parameter file. They are bundled as data with attribution; no SCOPE code is included. Their headers state what is known of their provenance.

Checks run locally

  • Julia 1.12: 2063/2063 tests on this commit.
  • Julia 1.10: 2062/2062 (on the tree just before the data-header edits; those touched only comment lines and the README).
  • CUDA (A100): 334/334 device tests.
  • Strict docs build passes.
  • Clean install on Julia 1.10 with the lowest allowed versions loads and runs.

macOS and GitHub CI have not run yet.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TRfrLS11vLye7ZcoRFSe5B

cfranken and others added 2 commits November 13, 2026 10:32
…ion, ocean floor

Development state of 0.2.0 before the code overhaul:

- OceanLayerOptics carries absorbers (one component per absorber or
  absorption part), scatterers and inelastic components.
- Pigment partitions of phytoplankton absorption (ProspectPigments,
  Bidigare1990Pigments) and absorption parts.
- Absorbed power, photons and PAR per component from the solver's scalar
  irradiance; inelastic emission per layer.
- Chlorophyll fluorescence driven by excitation pathways, with the
  chloroplast-level emission spectra used by Fluspect.
- TabulatedLambertianBottom.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TRfrLS11vLye7ZcoRFSe5B
…tives

Changed results (see CHANGELOG, "Changed results"):
- Phytoplankton{Bricaud1998} absorption is A(λ)·Chl^E(λ), as the bundled
  HydroLight table defines it (was A·Chl^(1−E)); it is particulate
  absorption (phytoplankton plus detritus). Unchanged at Chl = 1.
- Water Raman is an energy conversion by default (Mobley et al. 1993,
  HydroLight); the photon form is PhotonConversion().
- FellMineral defaults follow Fell (1997): ω = 0.95, B = 0.036.
- Pigment partitions hold the edge shares outside their tables;
  photoprotective carotenoids are a separate class with zero transfer.

Breaking (see "Breaking" and the migration section of the docs):
- layer_optics and column_optics take the element type as an optional
  first argument; the FT keyword is gone.
- Result structs have array type parameters and Adapt rules; phase_id is
  a vector of content keys; Gordon1992 is removed.
- WaterRaman carries its conversion units and linear_depolarization.

Added:
- Results and spectral tables move to device arrays with Adapt (tested on
  JLArrays and CUDA); Float32 models return Float32.
- Model parameters can carry ForwardDiff dual numbers through
  layer_optics and column_optics.
- Every physical parameter is a field or keyword with a documented
  default (docs: reference/parameters.md).
- Raman phase function, conversion-unit types, table lookup types.
- Tests: Aqua, JET, ExplicitImports, inference, Float32, device,
  published-value references, parameter exposure.

Packaging: Adapt is a dependency; Interpolations is dropped; docs build
is strict; version 0.2.0.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TRfrLS11vLye7ZcoRFSe5B
Copilot AI balanced review requested due to automatic review settings November 13, 2026 20:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants