Show GaussianFilter usage in 2D turbulence example#232
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the 2D turbulence documentation example to demonstrate spatial low-pass filtering with GaussianFilter, adding filtered kinetic-energy diagnostics and visualizing them alongside existing KE/ε panels.
Changes:
- Adds
GaussianFilter(KE)andKEcomputed from Gaussian-filtered velocities (σ = π/8) to the NetCDF outputs. - Reads the new time series back and adds two new heatmap panels + colorbars to the animation layout.
- Minor cleanup of the figure-rendering prose around movie recording.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| hm_KE_filt = heatmap!(ax5, KE_filtₙ, colormap = :plasma, colorrange=(0, 2e-2)) | ||
| Colorbar(fig[5, 1], hm_KE_filt; vertical=false, height=8, ticklabelsize=12) | ||
|
|
||
| hm_KE_of_filt = heatmap!(ax6, KE_of_filtₙ, colormap = :plasma, colorrange=(0, 2e-2)) | ||
| Colorbar(fig[5, 2], hm_KE_of_filt; vertical=false, height=8, ticklabelsize=12) |
There was a problem hiding this comment.
@copilot apply changes based on this feedback. But keep the colorranges the same as they currently are. Adjust the text
There was a problem hiding this comment.
Applied in 32f22d3. I kept the existing colorranges unchanged and updated the example text to explicitly state that the filtered KE panels reuse the KE colormap but intentionally use a tighter colorrange.
Screenshot of the UI-text change:
# Now we plot the heatmaps, each with its own colorbar below. The filtered KE panels use the
# same colormap as KE but a tighter colorrange to emphasize their differences.
Agent-Logs-Url: https://github.com/tomchor/Oceanostics.jl/sessions/b67fd65a-a191-4816-959d-f9c96f07b192 Co-authored-by: tomchor <13205162+tomchor@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Summary
docs/examples/two_dimensional_turbulence.jl:GaussianFilter(KE)and theKineticEnergycomputed fromGaussianFiltered velocities (σ = π/8 ≈ 8 grid cells).KEcolormap/range so the filter–KE commutator gap is directly visible.Test plan
julia --project=docs docs/make.jlbuilds without errors.KEpanel and differ visibly from each other once turbulence develops.🤖 Generated with Claude Code