Extend test coverage to HydrostaticFreeSurfaceModel#231
Merged
Conversation
Three test groups previously exercised only NonhydrostaticModel even though the underlying diagnostics support both model types. - TKE shear production rates: removed the NonhydrostaticModel guard so the four shear production diagnostics now run inside the existing model_types loop. - Canonical flows (uniform strain, solid body rotation, uniform shear): added HydrostaticFreeSurfaceModel to the iteration. The set! call is now branched on model type because HFSM's set! does not accept enforce_incompressibility or a w field. Relaxed the strain-flow vorticity comparison to atol=10eps() to absorb roundoff from HFSM's operator paths (~6e-16). - Progress messengers: added a HydrostaticFreeSurfaceModel iteration with a ScalarDiffusivity closure (the other LES closures in the existing list are not compatible with HFSM). Co-Authored-By: Claude Opus 4.7 (1M context) <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
Three test groups previously exercised only
NonhydrostaticModeleven though the underlying diagnostics support both model types. This PR closes those gaps.test/test_turbulent_kinetic_energy_equation.jl) — removed theNonhydrostaticModel-only guard aroundtest_shear_production_termsso it now runs inside the existingfor model_type in model_typesloop. The four shear-production constructors (X/Y/Z/total) already accept any model in the source.test/test_canonical_flows.jl) — addedHydrostaticFreeSurfaceModelto the outer iteration for the uniform strain, solid body rotation, and uniform shear flow tests. Theset!call branches on model type because HFSM'sset!does not acceptenforce_incompressibilityor awfield. The strain-flow vorticity-zero comparison was relaxed toatol=10eps()to absorb HFSM's ~6e-16 roundoff (the same pattern is already used elsewhere in the file withatol=eps()).test/test_progress_messengers.jl) — restructured the test loop to iterate over(model_type, closures)pairs. HFSM is tested withScalarDiffusivityonly; the LES closures in the existing list (SmagorinskyLilly,DynamicSmagorinsky,AnisotropicMinimumDissipation) are not generally compatible with HFSM.Diagnostics that remain
NonhydrostaticModel-only (KineticEnergyTendency,KineticEnergyAdvection,KineticEnergyForcing,KineticEnergyPressureRedistribution,BuoyancyProduction,TracerVarianceTendency) are restricted at the source-method level and are out of scope here.Test plan
TEST_GROUP=tke_diagnostics julia --project -e 'using Pkg; Pkg.test()'— 438/438 passTEST_GROUP=canonical_flows julia --project -e 'using Pkg; Pkg.test()'— 260/260 passTEST_GROUP=progress_messengers julia --project -e 'using Pkg; Pkg.test()'— 24/24 pass🤖 Generated with Claude Code