Fill urban roughness gaps with the closure's bare-soil endpoint - #591
Merged
Merged
Conversation
`aerodynamic_parameters` marks cells of invalid morphometry NaN by design, so an (ℓᵐ, d) pair from a building dataset with missing tiles carries gaps that propagate NaN through u★, θ★ and q★ into the coupled state. `fill_aerodynamic_roughness_gaps!` replaces them with `aerodynamic_parameters(closure, 0, 0)`, filling the pair together. Closes #583 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
xkykai
marked this pull request as ready for review
August 26, 2026 00:33
…a gap `fill_aerodynamic_roughness_gaps!` takes `unbuilt = (ℓ, d)`, defaulting to the closure's bare-soil endpoint, so gaps known to be open water can be given a water roughness instead of soil. The pair is validated (ℓ > 0, d ≥ 0), and a non-positive ℓᵐ counts as a gap alongside the non-finite ones, as #583 asked. The docstring now says the fill only restores evaluability: bare soil is about two orders of magnitude rougher than water, and the land flux closure runs wherever the land component does. It also drops the unverified claim that GHSL marks open water no-data inside published tiles; the offshore gaps come from the all-ocean tiles GHSL does not publish. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
glwagner
reviewed
Oct 1, 2026
glwagner
reviewed
Oct 1, 2026
Co-authored-by: Gregory L. Wagner <gregory.leclaire.wagner@gmail.com>
glwagner
approved these changes
Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
aerodynamic_parametersmarks cells of invalid morphometryNaNby design, so an(ℓᵐ, d)pair fromurban_roughnessover a building dataset with missing tiles carries gaps, and there was no supported way to turn that into something a flux closure can consume.Gaps become the closure's own bare-soil endpoint
aerodynamic_parameters(closure, 0, 0); the pair is filled together, so a gap in either becomes unbuilt surface in both. Where the morphometry is still to hand, the docstring points at inpaintingλᵖandhinstead, which fills from horizontal neighbors and keeps a hole in a city a city.Closes #583
🤖 Generated with Claude Code