Aquamoto: tsunami land/water shading + full-file variable loading#6
Merged
Conversation
Restore point on branch before further shading work. Current state: per-side land/water illumination via bakeAquaShade + bakeLayerRGBA base albedo, radio = shading-target selector, colorbar swap indicator. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- aquamoto.jl: replace all Abstract*/Real/Integer signatures with
concrete String/Int/Float64/Matrix{T}/Symbol; drop
Union{Nothing,Array{UInt8,3}} for the cached land image -- use an
empty Array{UInt8,3} sentinel (isempty test) so imgbat stays one
concrete type, no per-branch recompilation.
- 40_shading.cpp: bakeLayerRGBA used rgb8 outside its block scope
(C2065); use the in-scope cr/cg/cb the same values were copied to.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A fresh tsunami now opens showing the flat host-composited colours (the
full 256-colour :polar/:geo image the Julia side generates), Mirone-style.
Hillshade/PBR is opt-in via the Shading dock, never forced on at open --
the grdimage relight saturated the water's steep-gradient normals and
washed the palette toward white/dark, reading as a 2-colour collapse of
an image that is really 256.
The banding was a mismatched colour range, not too few palette entries:
_cpt_nodes_range already resamples to 256 nodes, so index each pixel in.
Also: concrete GMTgrid{Float32,2} for bat, drop useless Float64/Float32
copies of G.z, parenthesise conditions.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ts groups Variable discovery is pure _netcdf_subdatasets enumeration (bathymetry + the active time-varying quantity + any other static grid the file happens to carry) -- no hard-coded/guessed names beyond the pre-existing "bathymetry" convention. Each loaded variable becomes its own Scene Objects group, all nested under one parent group named for the file (new parentStack nesting support in rebuildSceneObjects, 50_scene.cpp). Only the active quantity variable starts checked; bathymetry and any extra grid start hidden (gmtvtk_set_object_visible, reused from the nested-grid blank-fill path). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…oncrete types
Variable discovery is pure _netcdf_subdatasets enumeration -- dropped the
_AQUA_VARNAMES guessed-name fallback probe entirely and the "prefer stage"
default-variable pick; this file class always has >1 variable so it always
shows up in GDAL's Subdatasets report.
Tsunami grids are guaranteed clean Float32 with no NaNs, so all isnan/isfinite
guards and manual min/max scans are gone: alllo/allhi now come straight from
each layer's own GMTgrid.range (already computed by GMT, never rescanned by
hand), the land colorbar's max elevation reads off bat.range instead of
filtering+scanning the whole array, and the Inf/-Inf dry-layer sentinel is a
plain Bool (wetany) instead of isfinite() checks. Kept the wet/dry split scan
itself (a genuine per-cell comparison against bathymetry, not something any
metadata carries).
_aqua_colorize/_aqua_composite_rgb dropped their `where {T<:Real}` generic
type params for concrete Matrix{Float32} signatures; test file updated to
match (Float32 test data, two NaN-behavior tests removed since that code path
no longer exists).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
_netcdf_subdatasetsenumeration, no guessed names) and nests each as its own Scene Objects group under one group named for the file; only the active quantity starts checked.Matrix{Float32}signatures instead ofwhere {T<:Real}.Test plan
deps/build.bat— clean buildPkg.test()— 300/300 pass🤖 Generated with Claude Code