jcm.dycore.dinosaur.DinosaurDycore

class jcm.dycore.dinosaur.DinosaurDycore(coords: CoordinateSystem, terrain: TerrainData, dt_seconds: float, *, constants: PhysicalConstants | None = None, tracer_specs: Mapping[str, Any] | None = None, diffusion: DiffusionFilter | None = None)

Spectral dynamical core backed by the dinosaur package.

Args:

coords: A dinosaur CoordinateSystem. terrain: Boundary conditions (orography, land-sea mask, SSO descriptors). dt_seconds: Integration timestep in seconds. tracer_specs: Mapping name -> TracerSpec declaring every tracer the

attached physics package needs. Used to seed the initial state and to drive the nondimensionalisation flag in jcm.dycore.dinosaur.state_bridge. May be None for dry-only runs. The user-facing jcm.model.Model writes this every time it is constructed.

diffusion: DiffusionFilter describing horizontal hyperdiffusion

scaling. Defaults to DiffusionFilter.default().

__init__(coords: CoordinateSystem, terrain: TerrainData, dt_seconds: float, *, constants: PhysicalConstants | None = None, tracer_specs: Mapping[str, Any] | None = None, diffusion: DiffusionFilter | None = None)

Initialise the dinosaur backend; see the class docstring for argument semantics.

Methods

__init__(coords, terrain, dt_seconds, *[, ...])

Initialise the dinosaur backend; see the class docstring for argument semantics.

build_terrain(*[, source_file])

Construct a TerrainData against the dinosaur basis.

initial_state(physics_state, *[, sim_time, ...])

Build a dinosaur State to seed the integration.

required_tracers_ok(specs)

Verify the dycore can carry the requested tracers.

sim_time(state)

Return the simulation-time (seconds) carried by state.

step(state, physics_tendency)

Advance state by one dt.

to_physics_state(state)

Project the dycore's native state into a gridpoint PhysicsState.

to_xarray(predictions, times, *[, ...])

Convert a saved trajectory to an xarray.Dataset.

with_sim_time(state, sim_time)

Return a copy of state whose sim-time has been replaced.