Skip to content

Every example is dimensional, or says plainly that it is not - #52

Open
lmoresi wants to merge 1 commit into
mainfrom
docs/examples-units
Open

lmoresi wants to merge 1 commit into
mainfrom
docs/examples-units

Conversation

@lmoresi

@lmoresi lmoresi commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

A number in a geodynamics script means nothing without its unit. A reader who
cannot tell whether 1e-6 is a diffusivity in m²/s or a non-dimensional group
can neither check the result nor reuse the script.

So an example either carries units:

kappa = uw.Param(1.0e-6, units="m**2/s", description="thermal diffusivity")

or states its scaling where the parameters are set, naming what was scaled by
what:

# Non-dimensional throughout: lengths by the layer depth D, time by D^2/kappa,
# temperature by the drop across the layer. Ra is then the only free number.

Not both, and never neither.

Tutorials are the exception, deliberately: they teach one idea at a time,
and units there can be the idea getting in the way.

This sits beside the existing clause pointing at Underworld3's own guides —
uw.Param is already units-aware, so for most examples this is a units=
argument rather than new machinery.

Underworld development team with AI support from Claude Code

A number in a geodynamics script means nothing without its unit, and a
reader who cannot tell whether 1e-6 is a diffusivity in m^2/s or a
non-dimensional group can neither check the result nor reuse the script.

So an example carries units, or states its scaling in a comment where the
parameters are set, naming what was scaled by what. Not both, and never
neither.

Tutorials are the exception, deliberately: they teach one idea at a time,
and units there can be the idea getting in the way.

Underworld development team with AI support from Claude Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant