Skip to content

Conversation

@nefrathenrici
Copy link
Member

@nefrathenrici nefrathenrici commented Sep 17, 2025

Purpose

Use ClimaCore's CommonGrids and CommonSpaces to create spaces.

To-do

Content

  • Added new grids.jl file with grid constructors: SphereGrid, ColGrid, BoxGrid, PlaneGrid. Topography is handled by a function hypsography_function_from_topography which returns a hypsography function passed to ClimaCore.
  • New get_spaces(grid, context) function replaces parsed-args dependent get_spaces(parsed_args, params, comms_ctx)
  • Removed old space creation functions: periodic_line_mesh, periodic_rectangle_mesh, make_hybrid_spaces
  • Replaced CTh (horizontal contravariant) with CT12
  • Updated ∂ᶜK_∂ᶜuₕ field type from DiagonalMatrixRow{Adjoint{FT, CTh{FT}}} to use CT12
  • Updated g³ʰ() to return explicit CT12 components using SMatrix
  • Updated is_column and do_dss to match new spaces
  • Updated ci_plots.jl and PrecompileCI
  • Updated gravity wave tests and other test helpers

  • I have read and checked the items on the review checklist.

@nefrathenrici nefrathenrici force-pushed the ne/grids branch 2 times, most recently from a878a51 to 1342d7b Compare November 5, 2025 18:18
@nefrathenrici nefrathenrici force-pushed the ne/grids branch 3 times, most recently from c1b1a4d to 725681b Compare November 21, 2025 18:27
@nefrathenrici nefrathenrici force-pushed the ne/grids branch 4 times, most recently from 7327a63 to 3fbfbfe Compare December 2, 2025 18:25
@nefrathenrici nefrathenrici marked this pull request as ready for review December 2, 2025 20:59
@nefrathenrici nefrathenrici force-pushed the ne/grids branch 9 times, most recently from 3f51371 to 3d809fd Compare December 4, 2025 22:55
Copy link
Member

@dennisYatunin dennisYatunin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Excited to have columns that are actually real columns after this PR

spaces = get_spaces(config.parsed_args, params, config.comms_ctx)
spaces = get_spaces(grid)
end
@info spaces.center_space.grid
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're planning to leave this in the PR, maybe use @show instead of @info, or add a string to clarify what's being printed

Copy link
Member Author

@nefrathenrici nefrathenrici Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this log line would replace the existing Resolution stats, but I can extract and log them to keep the existing format:

┌ Info: Resolution stats:
│   Nq = 4
│   h_elem = 6
│   z_elem = 10
│   ncols = 3456
└   ndofs_total = 34560

Here's what this PR prints (different grid from above):

┌ Info: ExtrudedFiniteDifferenceGrid:
│   horizontal:
│     context: SingletonCommsContext using CUDADevice
│     mesh: 100×1-element RectilinearMesh of RectangleDomain: x ∈ [0.0,100000.0] (periodic) × y ∈ [0.0,1000.0] (periodic)
│     quadrature: 4-point Gauss-Legendre-Lobatto quadrature
│   vertical:
└     mesh: 100-element IntervalMesh of IntervalDomain: z ∈ [0.0,21000.0] (:bottom, :top)

@nefrathenrici nefrathenrici force-pushed the ne/grids branch 2 times, most recently from 9671fce to be2682e Compare December 5, 2025 19:04
@info "Using $(nameof(typeof(topography))) orography"
end

if topography isa EarthTopography
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if topo_smoothing

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants