Skip to content

Coupling LandModel with full surface energy balance to SpeedyWeather#110

Open
bgroenks96 wants to merge 28 commits intomainfrom
bg/speedy-coupling-v2
Open

Coupling LandModel with full surface energy balance to SpeedyWeather#110
bgroenks96 wants to merge 28 commits intomainfrom
bg/speedy-coupling-v2

Conversation

@bgroenks96
Copy link
Copy Markdown
Collaborator

@bgroenks96 bgroenks96 commented Apr 22, 2026

This PR updates the old SpeedyWeather script for the PrimitiveDryModel air-soil temperature coupling and adds a new script with prototype coupling to a PrimitiveWetModel via the full SEB.

In the process of implementing this, I am also fixing bugs in the surface energy/water flux calculations.

  • The ground heat flux calculation was previously using an incorrect sign convention. It should be G = R_net + H_s + H_l corresponding to balance equation R_net + H_s + H_l - G = 0 with all fluxes positive upwards (towards the atmosphere).
  • The soil moisture evaporation resistance factor code was broken (we should add more tests...)
  • SoilMoistureResistanceFactor is now the default choice for BareGroundEvaporation.
  • Default values for incoming shortwave and longwave radiation now match the standard values for the global energy balance

@bgroenks96 bgroenks96 self-assigned this Apr 22, 2026
@bgroenks96 bgroenks96 added the surface fluxes Issue or feature related to the surface energy and water balance label Apr 22, 2026
Comment thread examples/simulations/speedy_wet_land.jl Outdated
Comment thread examples/Project.toml
Comment thread examples/simulations/speedy_dry_land.jl
Comment thread examples/simulations/speedy_wet_land.jl Outdated
Comment thread examples/simulations/speedy_wet_land.jl
Comment thread src/models/soil/soil_model_init.jl
@bgroenks96 bgroenks96 requested a review from milankl April 26, 2026 16:54
@bgroenks96 bgroenks96 marked this pull request as ready for review April 26, 2026 16:54
@bgroenks96
Copy link
Copy Markdown
Collaborator Author

@milankl Since @maximilian-gelbrecht is on vacation, it would be great if you could approve this PR.

@bgroenks96
Copy link
Copy Markdown
Collaborator Author

@maximilian-gelbrecht and @milankl I have verified that the coupled model runs for up to 1 month of simulated time without errors, though I did not check the output. This is without the Richard's equation soil hydrology since this currently has problems unless you reduce the step size to an unbearably small number (like <10 seconds). This is, to some extent, expected; Richards' equation really needs implicit timestepping to be efficient.

Copy link
Copy Markdown
Member

@milankl milankl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some comments from my side skimming through!!!

Comment thread examples/simulations/speedy_dry_land.jl
Comment thread examples/simulations/speedy_dry_land.jl
Comment thread src/processes/atmosphere/prescribed_atmosphere.jl
Comment thread src/processes/surface_energy/turbulent_fluxes.jl
Comment thread examples/simulations/speedy_wet_land.jl
@maximilian-gelbrecht
Copy link
Copy Markdown
Collaborator

Do you want to merge this PR first, and then in a follow up adjust to Speedy 0.19, or still do that here? I am also happy to help with that adjustment.

@bgroenks96
Copy link
Copy Markdown
Collaborator Author

#114 already updates to Speedy v0.19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

surface fluxes Issue or feature related to the surface energy and water balance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants