jcm.dycore.protocol_test

Protocol-canary tests on a non-lat/lon horizontal layout.

This is the Phase-1 design spike: a deliberately minimal cubed-sphere fake exercises the DynamicalCore protocol end-to-end (state init → gridpoint projection → forward-Euler add of a physics tendency → next state), on arrays shaped (nlev, nelem, gll, gll). If anything in the rest of jax-gcm silently assumed lat/lon layout, the round-trip here would shape-mismatch.

The fake FakeCubedSphereDycore doesn’t run real dynamics — it’s identity-with-physics-Euler-add — so the assertions are about plumbing, not about science. The Phase-2 PyscesDycore will reuse the same test harness once it lands.

Classes

TestFakeCubedSphereDycoreProtocol([methodName])

The protocol must work on a horizontal layout that is not (nlon, nlat).

TestVerifyStatePreservesCubedSphereShape([...])

verify_state is dycore-agnostic; it must not reshape on output.