Skip to content

[Feat] Support irregular/unstructured grid graphs via Delaunay triangulation #124

@jainsaksham2006

Description

@jainsaksham2006

Motivation

Currently weather-model-graphs only supports rectilinear mesh layouts.
This limits neural-lam to datasets on regular grids, excluding:

  • Unstructured NWP model output (e.g. ICON icosahedral, OpenIFS)
  • Sparse observational data (ship tracks, surface stations, radiosondes)

Proposed Solution

Introduce mesh_layout="delaunay" as a new archetype that:

  1. Accepts an arbitrary set of (lat, lon) coordinates as input
  2. Computes a Delaunay triangulation via scipy.spatial.Delaunay
  3. Optionally applies Lloyd relaxation for mesh quality improvement
  4. Builds g2m, m2m, m2g edges using KD-tree neighbour search
  5. Returns output in the same NetworkX format as existing archetypes

Graph Quality Metrics

Alongside this, I propose adding a wmg.metrics.graph_quality_report()
function that computes:

  • Node degree variance
  • Edge length coefficient of variation
  • Triangle quality (min angle distribution)
  • Coverage ratio

Questions for maintainers

  • Is mesh_layout="delaunay" the right API extension point, or would
    you prefer a separate factory function?
  • Should sparse observational data (different node type from mesh nodes)
    be handled in the same PR or a follow-up?

This is part of my GSoC 2026 proposal for Project 1 (Flexible Graph Construction).

— Saksham Jain (@jainsaksham2006)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions