Skip to content

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:

Copy link

codecov bot commented Jul 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.39%. Comparing base (a921acc) to head (5a0d973).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #612      +/-   ##
==========================================
+ Coverage   92.69%   98.39%   +5.70%     
==========================================
  Files          39        9      -30     
  Lines        1697      187    -1510     
==========================================
- Hits         1573      184    -1389     
+ Misses        124        3     -121     

☔ 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

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