Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
6f82d43
feat: introduce mesh_layout argument with two-step coordinate/connect…
prajwal-tech07 Mar 2, 2026
63af996
test: add comprehensive tests for mesh_layout two-step architecture
prajwal-tech07 Mar 2, 2026
f417962
refactor: align API with Leif's final table — rename params, simplify…
prajwal-tech07 Mar 2, 2026
30ddb19
docs: add CHANGELOG entry for mesh_layout feature
prajwal-tech07 Mar 2, 2026
802b66a
Address all review feedback from PR #81
prajwal-tech07 Mar 4, 2026
21d33e8
refactor: add coords module with two-step mesh creation (primitives +…
prajwal-tech07 Mar 8, 2026
8d18530
refactor: use explicit keyword argument names in flat mesh functions
prajwal-tech07 Mar 8, 2026
4f5a8de
refactor: put default values in call signature for create_hierarchica…
prajwal-tech07 Mar 8, 2026
e7e3c03
refactor: use loguru logger.warning() and implement two-step mesh cre…
prajwal-tech07 Mar 8, 2026
ef478a2
refactor: update archetypes and tests to use mesh_layout parameter
prajwal-tech07 Mar 8, 2026
305e66a
test: update backward-compat tests to capture loguru warnings instead…
prajwal-tech07 Mar 8, 2026
b38fd64
Merge branch 'main' into feat/mesh-layout-rectilinear
prajwal-tech07 Mar 10, 2026
4372a3f
style: fix linting — run black, isort, remove empty f-strings
prajwal-tech07 Mar 10, 2026
4f48ed3
refactor: remove inline defaults and simplify m2m_connectivity_kwargs…
prajwal-tech07 Mar 20, 2026
0b6ff4a
refactor: rename mesh.kinds to mesh.connectivity, use **kwargs, updat…
prajwal-tech07 Mar 23, 2026
c7bdeac
Merge branch 'main' into feat/mesh-layout-rectilinear
leifdenby Mar 23, 2026
51ea189
fix: pre-commit linting + notebook max_num_refinement_levels
prajwal-tech07 Mar 23, 2026
220fa44
Merge branch 'main' into feat/mesh-layout-rectilinear
leifdenby Mar 24, 2026
edbce82
refactor: separate coordinate creation (Step 1) from connectivity cre…
prajwal-tech07 Mar 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [Unreleased](https://github.com/mllam/weather-model-graphs/compare/v0.3.0...HEAD)

### Added

- Add `mesh_layout` argument to mesh graph creation functions, with `rectilinear`
as the first supported layout. Uses a two-step architecture separating coordinate
creation from connectivity creation, enabling future alternative layouts (e.g. triangular).
[\#78](https://github.com/mllam/weather-model-graphs/issues/78), @prajwal-tech07

- Add `__version__` attribute to the package init
[\#56](https://github.com/mllam/weather-model-graphs/pull/56) @AdMub

Expand Down
61 changes: 26 additions & 35 deletions src/weather_model_graphs/create/archetype.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,15 @@ def create_keisler_graph(
"""
return create_all_graph_components(
coords=coords,
coords_crs=coords_crs,
graph_crs=graph_crs,
mesh_layout="rectilinear",
mesh_layout_kwargs=dict(mesh_node_spacing=mesh_node_distance),
m2m_connectivity="flat",
m2m_connectivity_kwargs=dict(mesh_node_distance=mesh_node_distance),
g2m_connectivity="within_radius",
g2m_connectivity_kwargs=dict(rel_max_dist=0.51),
m2g_connectivity="nearest_neighbours",
g2m_connectivity_kwargs=dict(
rel_max_dist=0.51,
),
m2g_connectivity_kwargs=dict(
max_num_neighbours=4,
),
coords_crs=coords_crs,
graph_crs=graph_crs,
m2g_connectivity_kwargs=dict(max_num_neighbours=4),
decode_mask=decode_mask,
return_components=return_components,
)
Expand Down Expand Up @@ -132,22 +129,19 @@ def create_graphcast_graph(
"""
return create_all_graph_components(
coords=coords,
m2m_connectivity="flat_multiscale",
m2m_connectivity_kwargs=dict(
mesh_node_distance=mesh_node_distance,
level_refinement_factor=level_refinement_factor,
max_num_levels=max_num_levels,
coords_crs=coords_crs,
graph_crs=graph_crs,
mesh_layout="rectilinear",
mesh_layout_kwargs=dict(
mesh_node_spacing=mesh_node_distance,
refinement_factor=level_refinement_factor,
max_num_refinement_levels=max_num_levels,
),
m2m_connectivity="flat_multiscale",
g2m_connectivity="within_radius",
g2m_connectivity_kwargs=dict(rel_max_dist=0.51),
m2g_connectivity="nearest_neighbours",
g2m_connectivity_kwargs=dict(
rel_max_dist=0.51,
),
m2g_connectivity_kwargs=dict(
max_num_neighbours=4,
),
coords_crs=coords_crs,
graph_crs=graph_crs,
m2g_connectivity_kwargs=dict(max_num_neighbours=4),
decode_mask=decode_mask,
return_components=return_components,
)
Expand Down Expand Up @@ -216,22 +210,19 @@ def create_oskarsson_hierarchical_graph(
"""
return create_all_graph_components(
coords=coords,
m2m_connectivity="hierarchical",
m2m_connectivity_kwargs=dict(
mesh_node_distance=mesh_node_distance,
level_refinement_factor=level_refinement_factor,
max_num_levels=max_num_levels,
coords_crs=coords_crs,
graph_crs=graph_crs,
mesh_layout="rectilinear",
mesh_layout_kwargs=dict(
mesh_node_spacing=mesh_node_distance,
refinement_factor=level_refinement_factor,
max_num_refinement_levels=max_num_levels,
),
m2m_connectivity="hierarchical",
g2m_connectivity="within_radius",
g2m_connectivity_kwargs=dict(rel_max_dist=0.51),
m2g_connectivity="nearest_neighbours",
g2m_connectivity_kwargs=dict(
rel_max_dist=0.51,
),
m2g_connectivity_kwargs=dict(
max_num_neighbours=4,
),
coords_crs=coords_crs,
graph_crs=graph_crs,
m2g_connectivity_kwargs=dict(max_num_neighbours=4),
decode_mask=decode_mask,
return_components=return_components,
)
Loading
Loading