jcm.dycore.dinosaur.state_bridge

Gridpoint ↔ modal conversions for the dinosaur dynamical core.

These functions used to live in jcm.physics_interface. They are dinosaur-specific (they call into dinosaur.spherical_harmonic and dinosaur.primitive_equations) and so they belong on the dycore side of the DynamicalCore protocol — outside this subpackage, the rest of jax-gcm only sees the dycore-agnostic PhysicsState / PhysicsTendency types.

The three functions here are pure JAX (no side effects, no Python conditionals on traced values) and the implementations match what was in physics_interface.py line-for-line up to import paths; the dinosaur-side refactor regression in jcm.dycore.dinosaur.regression_test is the bit- level guardrail.

Functions

dynamics_state_to_physics_state(state, dynamics)

Convert a dinosaur modal State into a gridpoint PhysicsState.

physics_state_to_dynamics_state(...[, ...])

Convert a gridpoint PhysicsState back into a dinosaur State.

physics_tendency_to_dynamics_tendency(...[, ...])

Convert gridpoint physics tendencies into a dinosaur dynamics-tendency State.