PrescribedAtmosphere (src/Atmospheres/prescribed_atmosphere.jl) needs a refactor that combines three related threads. Deferred out of the NestedSimulations work on eq/era5_breeze_land so the v1 nesting PR can stay scoped.
1. Proper notation
Today's struct uses ad-hoc names: velocities.u, tracers.T, tracers.q, etc. These should align with the convention used elsewhere in the codebase (see examples/era5_breeze.jl): u, v, θˡⁱ, qᵗ, qᶜ, qⁱ, ρ.
2. Microphysical variables
tracers is currently (T, q). To support Breeze's prognostic moisture partition and downstream microphysics coupling, it should hold at minimum:
qᵗ — total water mixing ratio
qᶜ — cloud liquid mixing ratio
qⁱ — cloud ice mixing ratio
And potentially precipitating species when those land.
3. Surface-forcing vs 3D-nesting role distinction
The struct carries surface-only concepts (pressure, freshwater_flux, surface_layer_height, boundary_layer_height) that are meaningless when PrescribedAtmosphere is used as a 3D parent for limited-area nesting.
Two paths considered (decision postponed to this refactor):
- Nullable per-field defaults driven by grid dimensionality — a 3D grid defaults the surface-only fields to
nothing; user can override. More flexible; leaves design space open.
mode / role kwarg — SurfaceForcing vs NestingParent selects defaults. More self-documenting; locks in a named enum.
Leaning is toward the first, but worth revisiting with fresh eyes when this refactor happens.
Why deferred
The nesting work needs 3D PrescribedAtmosphere now, but a wholesale rename + tracer-set expansion would otherwise gate that PR. v1 of NestedSimulations adds 3D constructor variants only; this refactor lands separately so it's the only change in its PR.
Touch points (non-exhaustive)
src/Atmospheres/prescribed_atmosphere.jl
src/Atmospheres/prescribed_atmosphere_regridder.jl
src/Atmospheres/interpolate_atmospheric_state.jl
- Surface-flux callers under
src/EarthSystemModels/InterfaceComputations/
- Any JRA55 / ERA5 builders that construct
PrescribedAtmosphere
PrescribedAtmosphere(src/Atmospheres/prescribed_atmosphere.jl) needs a refactor that combines three related threads. Deferred out of the NestedSimulations work oneq/era5_breeze_landso the v1 nesting PR can stay scoped.1. Proper notation
Today's struct uses ad-hoc names:
velocities.u,tracers.T,tracers.q, etc. These should align with the convention used elsewhere in the codebase (seeexamples/era5_breeze.jl):u,v,θˡⁱ,qᵗ,qᶜ,qⁱ,ρ.2. Microphysical variables
tracersis currently(T, q). To support Breeze's prognostic moisture partition and downstream microphysics coupling, it should hold at minimum:qᵗ— total water mixing ratioqᶜ— cloud liquid mixing ratioqⁱ— cloud ice mixing ratioAnd potentially precipitating species when those land.
3. Surface-forcing vs 3D-nesting role distinction
The struct carries surface-only concepts (
pressure,freshwater_flux,surface_layer_height,boundary_layer_height) that are meaningless whenPrescribedAtmosphereis used as a 3D parent for limited-area nesting.Two paths considered (decision postponed to this refactor):
nothing; user can override. More flexible; leaves design space open.mode/rolekwarg —SurfaceForcingvsNestingParentselects defaults. More self-documenting; locks in a named enum.Leaning is toward the first, but worth revisiting with fresh eyes when this refactor happens.
Why deferred
The nesting work needs 3D
PrescribedAtmospherenow, but a wholesale rename + tracer-set expansion would otherwise gate that PR. v1 of NestedSimulations adds 3D constructor variants only; this refactor lands separately so it's the only change in its PR.Touch points (non-exhaustive)
src/Atmospheres/prescribed_atmosphere.jlsrc/Atmospheres/prescribed_atmosphere_regridder.jlsrc/Atmospheres/interpolate_atmospheric_state.jlsrc/EarthSystemModels/InterfaceComputations/PrescribedAtmosphere