Skip to content

Add examples as PyMPDATA-MPI dependency, dynamic_advector option w/ stashes, fully JIT-able SWE code, interpolated indexers logic (for 1D & 2D), multiple advectees in solver, AnteStep class#612

Merged
slayoo merged 57 commits intomainfrom
interpolation_refactor
Dec 10, 2025

Conversation

@Sfonxu
Copy link
Collaborator

@Sfonxu Sfonxu commented Jul 23, 2025

This PR is a first in series of PRs of API refactoring described in #510.

The aim is to replace repeated definitions of interpolate around the code to a single function in PyMPDATA.impl.

Current tasks:

  • Replace interpolate as in shallow-water examples
  • Make interpolate JIT-compilable
  • Look for other places where such functions are defined
  • Look into replacing interpolate in those places

@slayoo
Copy link
Member

slayoo commented Jul 23, 2025

* [ ]  Look for other places where such functions are defined
* [ ]  Look into replacing interpolate in other places, such as `Shipway and Hill (2012)`

The interpolation happens only when advecting momentum. Shipway and Hill (2012) example features only vapour mass advection, so it is not relevant. Other locations where we can refactor the interpolation code are:

@codecov
Copy link

codecov bot commented Jul 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.93%. Comparing base (ed8d8c1) to head (559bd76).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #612      +/-   ##
==========================================
+ Coverage   92.69%   92.93%   +0.23%     
==========================================
  Files          39       40       +1     
  Lines        1697     1754      +57     
==========================================
+ Hits         1573     1630      +57     
  Misses        124      124              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Sfonxu
Copy link
Collaborator Author

Sfonxu commented Jul 23, 2025

It seems that, according to numba docs, the argument axis in np.diff is not supported.

@slayoo
Copy link
Member

slayoo commented Jul 24, 2025

It seems that, according to numba docs, the argument axis in np.diff is not supported.

IIUC, usage of np.diff is anyhow out of question here as it allocates new memory

@github-actions
Copy link

Stale pull request message

@Sfonxu Sfonxu removed the no-activity label Nov 2, 2025
@Sfonxu Sfonxu force-pushed the interpolation_refactor branch from f667bd5 to 5b9f157 Compare November 28, 2025 18:21
@Sfonxu Sfonxu changed the title Add dedicated interpolate function Add examples as PyMPDATA dependency, dynamic_advector option w/ stashes, fully JIT-able SWE code, interpolated indexers logic (for 1D & 2D), multiple advectees in solver, AnteStep class, Dec 8, 2025
@slayoo slayoo changed the title Add examples as PyMPDATA dependency, dynamic_advector option w/ stashes, fully JIT-able SWE code, interpolated indexers logic (for 1D & 2D), multiple advectees in solver, AnteStep class, Add examples as PyMPDATA dependency, dynamic_advector option w/ stashes, fully JIT-able SWE code, interpolated indexers logic (for 1D & 2D), multiple advectees in solver, AnteStep class Dec 8, 2025
@Sfonxu Sfonxu changed the title Add examples as PyMPDATA dependency, dynamic_advector option w/ stashes, fully JIT-able SWE code, interpolated indexers logic (for 1D & 2D), multiple advectees in solver, AnteStep class Add examples as PyMPDATA-MPI dependency, dynamic_advector option w/ stashes, fully JIT-able SWE code, interpolated indexers logic (for 1D & 2D), multiple advectees in solver, AnteStep class Dec 8, 2025
@Sfonxu Sfonxu requested a review from slayoo December 9, 2025 17:41
@slayoo slayoo added this pull request to the merge queue Dec 10, 2025
Merged via the queue into main with commit c37a0fa Dec 10, 2025
38 checks passed
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.

2 participants