Skip to content

Delete unused examples; clean up examples; minor improvements to MetadataSet#277

Open
glwagner wants to merge 8 commits into
mainfrom
glw/jldoctest-metadata-set-and-examples-cleanup
Open

Delete unused examples; clean up examples; minor improvements to MetadataSet#277
glwagner wants to merge 8 commits into
mainfrom
glw/jldoctest-metadata-set-and-examples-cleanup

Conversation

@glwagner
Copy link
Copy Markdown
Member

@glwagner glwagner commented May 22, 2026

Summary

  • Prunes ten outdated standalone examples now covered by tests, doctests, or the surviving end-to-end simulations.
  • Modernizes global_climate_simulation.jl, near_global_ocean_simulation.jl, and one_degree_simulation.jl:
    • pass Fields / AbstractOperations / Observables straight to heatmap! (Oceananigans Makie extension auto-NaNs immersed land cells),
    • rename component-specific velocities/temperatures to unicode subscripts (uᵒᶜ, uᵃᵗ, uˢⁱ, etc.),
    • in one_degree_simulation, drive both ocean and sea-ice init from one MetadataSet and add a JRA55PrescribedLand component.
  • Replaces the illustrative ```julia block in the set!(model, ::MetadataSet, names) docstring with a runnable ```jldoctest that builds a real ocean_simulation, calls set!(ocean.model, mset) with a multi-component ECCO4Monthly MetadataSet, and reports rounded min/max/mean of the resulting temperature field. The sea-ice route is mentioned in a comment alongside the call (no existing test/doctest exercises the ECCO sea-ice download path, so we don't run it here).

glwagner and others added 2 commits May 21, 2026 22:34
Removes ten standalone examples that are now covered by tests, doctests, or
the surviving end-to-end simulations (download_glorys_data, ecco_inspect_*,
generate_bathymetry, generate_surface_fluxes, idealized_single_column,
inspect_JRA55_data, inspect_woa_*, mediterranean_simulation_with_ecco_restoring,
meridional_heat_transport_ecco).

Updates the remaining examples (global_climate_simulation,
near_global_ocean_simulation, one_degree_simulation) to:
- pass Fields, AbstractOperations, and Observables directly to `heatmap!`
  (Oceananigans Makie extension fills immersed land cells with `NaN`),
- use unicode subscripts (uᵒᶜ/vᵒᶜ, uᵃᵗ/vᵃᵗ, uˢⁱ) for component-specific
  velocities and temperatures,
- bundle multi-component initialization through a single MetadataSet and a
  `JRA55PrescribedLand` component.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Builds a real `ocean_simulation` on a small LatitudeLongitudeGrid and runs
`set!(ocean.model, mset)` with a multi-component ECCO4Monthly MetadataSet,
so the routing claim is actually exercised. The expected output reports
rounded min/max/mean of `T`, which is stable across runs at this grid
resolution. The sea-ice route is described in a comment alongside the call
rather than executed, because no existing test/doctest exercises the ECCO
sea-ice download path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@glwagner glwagner changed the title Convert set!(::MetadataSet) docstring to jldoctest; trim and modernize examples Delete unused examples; clean up examples; minor improvements to MetadataSet May 22, 2026
@glwagner glwagner added the build all examples add this label to build all the examples in the PR label May 22, 2026
@glwagner glwagner closed this May 22, 2026
@glwagner glwagner reopened this May 22, 2026
@glwagner glwagner requested a review from navidcy May 22, 2026 04:37
@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/DataWrangling/metadata.jl 80.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@navidcy
Copy link
Copy Markdown
Member

navidcy commented May 24, 2026

I took the Metatdatset improvements + Metadatase-related fixes in examples into #283. I suggest we merge that and then continue here with visualization improvements, variable changes etc.

I did that because building all examples takes ~7hrs so iterating is cumbersome. I also wanna get a docs built on main that succeeds because it's been a while and test whether #237 fixes the issue of tagged releases not having a Docs version; see #60.

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

Labels

build all examples add this label to build all the examples in the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants