Skip to content

Prescribe a time-varying boundary-layer height, from ERA5 by default - #751

Open
ewquon wants to merge 4 commits into
mainfrom
eq/prescribed-boundary-layer-height
Open

ewquon wants to merge 4 commits into
mainfrom
eq/prescribed-boundary-layer-height

Conversation

@ewquon

@ewquon ewquon commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

PrescribedAtmosphere had a hard-coded boundary_layer_height = 512 m, a scalar that sets the mixed-layer depth in the convective gustiness, Uᴳ = β (Jᵇ h)^(1/3). Breeze and SpeedyWeather fall back to 600 m for the same quantity. This PR:

  • Defines one EarthSystemModels.default_boundary_layer_height = 600 m (the COARE mixed-layer depth) and uses it in PrescribedAtmosphere, Breeze, and SpeedyWeather. Under convective conditions this raises the default-configuration gustiness by (600/512)^(1/3) ≈ 5.4 %, which affects the iterative solution of similarity theory fluxes; stable conditions are unaffected.
  • Lets PrescribedAtmosphere take a 2D FieldTimeSeries for boundary_layer_height. It is interpolated in space and time onto the exchange grid through the same path as the tracers; a number becomes a ConstantField. The flux kernels read the regridded exchanger state ahead of boundary_layer_height(atmosphere).
  • Makes ERA5PrescribedAtmosphere load ERA5's boundary_layer_height (blh) by default; passing a number keeps a constant.

The ERA5 variable mapping overlaps with #709, which adds the same :boundary_layer_height entry; whichever merges second drops its copy.

Tests: test_prescribed_atmosphere.jl adds a linear boundary_layer_height time series on its own grid to the existing tracer-regridding test and checks the exchanger state against it exactly.

🤖 Generated with Claude Code

ewquon and others added 4 commits October 8, 2026 13:03
PrescribedAtmosphere defaulted to 512 m while the Breeze and SpeedyWeather
interfaces used 600 m. Define `default_boundary_layer_height = 600` once in
EarthSystemModels (the COARE mixed-layer depth) and use it everywhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PrescribedAtmosphere accepts a 2D FieldTimeSeries for `boundary_layer_height`,
interpolated onto the exchange grid alongside the tracers; a number becomes a
ConstantField. The regridded exchanger state takes precedence over the
atmosphere's `boundary_layer_height` in the flux kernels' atmosphere data.
ERA5PrescribedAtmosphere loads ERA5's `boundary_layer_height` (blh) unless a
number is passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The function returns the source fields before interpolation, so a past
participle misread as already regridded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...hSpeedyWeatherExt/speedy_atmosphere_simulations.jl 0.00% 1 Missing ⚠️
...c/DataWrangling/ERA5/ERA5_prescribed_atmosphere.jl 0.00% 1 Missing ⚠️
...InterfaceComputations/atmosphere_sea_ice_fluxes.jl 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
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