Skip to content

Add neutral atmospheric boundary layer example#615

Merged
giordano merged 63 commits intomainfrom
eq/nabl_example
Apr 20, 2026
Merged

Add neutral atmospheric boundary layer example#615
giordano merged 63 commits intomainfrom
eq/nabl_example

Conversation

@ewquon
Copy link
Copy Markdown
Collaborator

@ewquon ewquon commented Apr 7, 2026

This is based on the shear-driven ABL case from Moeng & Sullivan's 1994 JAS paper -- and subsequently used to develop the NCAR LES SGS scheme (see also #534). This example uses a prescribed surface shear stress (through ustar). Currently, I'm using this to assess flowfield behaviors in the surface layer (e.g., due to the overshoot problem, cf. Brasseur & Wei 2010 Phys. Fluids). Runtime is ~15 min on a T4 GPU.

nabl_mean_profiles nabl_velocity_variances nabl_fluxes

Comment thread examples/neutral_atmospheric_boundary_layer.jl Outdated
Co-authored-by: Gregory L. Wagner <gregory.leclaire.wagner@gmail.com>
Comment thread examples/neutral_atmospheric_boundary_layer.jl Outdated
Comment thread examples/neutral_atmospheric_boundary_layer.jl
Comment thread docs/src/breeze.bib Outdated
at least temporarily to see how the example renders in the docs preview
Comment thread docs/src/breeze.bib Outdated
Comment thread docs/src/breeze.bib Outdated
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
Comment thread examples/neutral_atmospheric_boundary_layer.jl Outdated
Comment thread examples/neutral_atmospheric_boundary_layer.jl Outdated
Comment thread examples/neutral_atmospheric_boundary_layer.jl Outdated
@navidcy
Copy link
Copy Markdown
Member

navidcy commented Apr 15, 2026

The halo values are all 0. Unless it's a FieldTimeSeries loading issue.

I think it's because we take the Average...? So for some reason the output writer doesn't apply the operation in the halo region and save the Average halo?

I'm trying (with 8286c79) to take the derivative before the Average; let's see.

@navidcy
Copy link
Copy Markdown
Member

navidcy commented Apr 15, 2026

Now docs get a bunch of newton_div-related errors. Is this related to CliMA/Oceananigans.jl#5140?

cc @glwagner

@giordano
Copy link
Copy Markdown
Member

Is this related to CliMA/Oceananigans.jl#5140?

Most likely yes

@navidcy
Copy link
Copy Markdown
Member

navidcy commented Apr 16, 2026

Was it a breaking change?
I don't know how to fix it. Actually newton_div is never called in Breeze so perhaps this is an Oceananigans bug that isn't captured in the Oceananigans CI?

@ewquon
Copy link
Copy Markdown
Collaborator Author

ewquon commented Apr 16, 2026

It's caught by the unit tests

@giordano
Copy link
Copy Markdown
Member

Yeah, it's failing in CliMA/Oceananigans.jl#5491, which is what we're using here 😅

@ewquon
Copy link
Copy Markdown
Collaborator Author

ewquon commented Apr 16, 2026

Hmm, I tried running RICO separately and it failed for the same reason, this is the fix that Claude came up with #631

@ewquon
Copy link
Copy Markdown
Collaborator Author

ewquon commented Apr 18, 2026

Now waiting on JuliaRegistries/General#153245

Comment thread examples/neutral_atmospheric_boundary_layer.jl
@navidcy
Copy link
Copy Markdown
Member

navidcy commented Apr 20, 2026

The $J_θ$ looks good now. But the last plot doesn't show any difference between total and resolved. Is something just zeros by accident?

navidcy and others added 2 commits April 20, 2026 11:12
Co-authored-by: Mosè Giordano <765740+giordano@users.noreply.github.com>
@giordano
Copy link
Copy Markdown
Member

@navidcy navidcy self-requested a review April 20, 2026 07:50
@giordano giordano merged commit f2b982d into main Apr 20, 2026
4 checks passed
@giordano giordano deleted the eq/nabl_example branch April 20, 2026 18:43
@navidcy
Copy link
Copy Markdown
Member

navidcy commented Apr 21, 2026

Nice job!

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

Labels

build all examples 🏗️ PRs which should build all examples documentation 📜 improvements or additions to documentation examples 👩‍🏫 not _everyone_ was born knowing how to use Breeze

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants