jcm.physics_interface

Dycore-agnostic physics interface types and helpers.

This module defines the gridpoint-space data structures that physics packages consume and produce — PhysicsState and PhysicsTendency — and the Physics base class that they implement.

It is dycore-agnostic: no spectral transforms or dinosaur symbols appear here. The actual dycore↔physics conversion is owned by each backend under jcm/dycore/<backend>/state_bridge.py (see jcm.dycore.dinosaur.state_bridge for the canonical example).

Functions

compute_physics_step_gridpoint(...)

Run the operator-split physics step in gridpoint space.

verify_state(state)

Ensure the physical validity of the state variables.

verify_tendencies(state, tendencies, time_step)

Adjust tendencies to prevent the state from becoming physically invalid in the next time step.

Classes

Physics()

PhysicsState(u_wind, v_wind, temperature, ...)

Represents the state of the atmosphere in physical (nodal) space.

PhysicsTendency(u_wind, v_wind, temperature, ...)

Represents the tendencies (rates of change) of physical variables.