systems/ddt.py::_as_float (used by every DDt flavour's update_pre_solve through the _dt bookkeeping, and by the BDF coefficient update) carries a TODO(BUG): a raw pint.Quantity reaching uw.non_dimensionalise() is not scaled by the active reference quantities, and the helper then takes .magnitude. Measured with set_reference_quantities(length=1000 km, time=1 Myr) and an SLCN solver stepped with timestep=100 kyr: DuDt._dt = 100.0 kiloyear, and the DDt's runtime constant delta_t.sym = 100.0 where the non-dimensional value is 0.1. The semi-Lagrangian solvers do not read that constant (they pass their own non-dimensional delta_t into the kernels), and the composing solvers of #688 non-dimensionalise before writing it, so no current solve is wrong; a solver that composes DDt.time_derivative() while passing a quantity straight to update_pre_solve would be. The fix belongs in uw.non_dimensionalise (accept a raw quantity) or in one shared timestep helper used by the solvers and the DDt alike (solvers._nondimensionalise_timestep does it right). Found by the review of #688.
🤖 Generated with Claude Code
https://claude.ai/code/session_018T2VHUGaZiQVJ95qQ4DiSL
systems/ddt.py::_as_float(used by every DDt flavour'supdate_pre_solvethrough the_dtbookkeeping, and by the BDF coefficient update) carries aTODO(BUG): a rawpint.Quantityreachinguw.non_dimensionalise()is not scaled by the active reference quantities, and the helper then takes.magnitude. Measured withset_reference_quantities(length=1000 km, time=1 Myr)and an SLCN solver stepped withtimestep=100 kyr:DuDt._dt = 100.0 kiloyear, and the DDt's runtime constantdelta_t.sym = 100.0where the non-dimensional value is 0.1. The semi-Lagrangian solvers do not read that constant (they pass their own non-dimensionaldelta_tinto the kernels), and the composing solvers of #688 non-dimensionalise before writing it, so no current solve is wrong; a solver that composesDDt.time_derivative()while passing a quantity straight toupdate_pre_solvewould be. The fix belongs inuw.non_dimensionalise(accept a raw quantity) or in one shared timestep helper used by the solvers and the DDt alike (solvers._nondimensionalise_timestepdoes it right). Found by the review of #688.🤖 Generated with Claude Code
https://claude.ai/code/session_018T2VHUGaZiQVJ95qQ4DiSL