# pastax
<p align="center">
<img src="https://raw.githubusercontent.com/vadmbertr/pastax/refs/heads/main/docs/_static/pastax-md.png" alt="pastax logo" width="33%">
</p>
<p align="center">
<b>P</b>arameterizable <b>A</b>uto-differentiable <b>S</b>imulators of ocean <b>T</b>rajectories in j<b>AX</b>.
</p>
## Installation
`pastax` is Pip-installable:
```shell
pip install pastax
```
## Usage
Documentation is under construction but you can already have a look at the [getting started notebook](docs/getting_started.ipynb) and the (messy) [API documentation](https://pastax.readthedocs.io/en/latest/api/).
## Work in progress
This package in under active developement and should still be considered as work in progress.
In particular, the following changes are considered:
- `pastax.gridded`
- add support for C-grids,
- maybe some refactoring of the structures,
- `pastax.trajectory`
- use `unxt.Quantity` in place of `Unitful` (see [unxt](https://unxt.readthedocs.io/en/latest/)),
- remove `__add__` and like methods in favour of registered functions (see [quax](https://docs.kidger.site/quax/)),
- `pastax.simulator`
- improve how the product operation is performed between the vector field and the control (support for `Location`, `Time` or `State` objects) (see `diffrax` doc [here](https://docs.kidger.site/diffrax/api/terms/#diffrax.ControlTerm)),
- add support/examples for interrupting the solve when a trajectory reaches land (see `diffrax` doc [here](https://docs.kidger.site/diffrax/api/events/)).
And I should stress that the package lacks (unit-)tests for now.
## Related projects
Several other open-source projects already exist with similar objectives.
The closest ones are probably [(Ocean)Parcels](https://github.com/OceanParcels/parcels), [OpenDrift](https://github.com/OpenDrift/opendrift) and [Drifters.jl](https://github.com/JuliaClimate/Drifters.jl).
Here is a (probably) non-comprehensive (and hopefuly correct, please reach-out if not) use-cases comparison between them:
- you use Python: go with `pastax`, `OpenDrift` or `Parcels`,
- you use Julia: go with `Drifters.jl`,
- you want I/O inter operability with `xarray` Datasets: go with `pastax`, `OpenDrift`, `Parcels` or `Drifters.jl`,
- you need support for Arakawa C-grid: go with `OpenDrift`, `Parcels` or `Drifters.jl` (but keep an eye on `pastax` as it might come in the future),
- you want some post-processing routines: go with `Drifters.jl` (but keep an eye on `pastax` as some might come in the future),
- you want a better control of the right-hand-side term of your Differential Equation: go with `pastax` (probably the most flexible) or `Parcels`,
- you solve Stochastic Differential Equations: go with `pastax`, `OpenDrift` or `Parcels`,
- you need a **wide** range of solvers: go with `pastax` or `Drifters.jl` (if you solve ODE),
- you want to calibrate your simulator ***on-line*** (i.e. by differenting through your simulator): go with `pastax`,
- you want to run on both CPUs and GPUs (or TPUs): go with `pastax`.
Worth mentionning that I did not compare runtime performances (especially for typical use-cases with `OpenDrift`, `Parcels` or `Drifters.jl` of advecting a very large amount of particules with the same velocity field).
I could also cite [py-eddy-tracker](https://github.com/AntSimi/py-eddy-tracker), altough it targets more specifically eddy related routines.
## Contributing
Contributions are welcomed!
See [CONTRIBUTING.md](https://github.com/vadmbertr/pastax/blob/main/CONTRIBUTING.md) and [CONDUCT.md](https://github.com/vadmbertr/pastax/blob/main/CONDUCT.md) to get started.
Raw data
{
"_id": null,
"home_page": null,
"name": "pastax",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "differentiable, drift, jax, lagrangian, ocean, parameterizable, sampler, sea, simulator, stochastic, trajectory",
"author": null,
"author_email": "Vadim Bertrand <vadim.bertrand@univ-grenoble-alpes.fr>, Emmanuel Cosme <emmanuel.cosme@univ-grenoble-alpes.fr>, Adeline Leclercq Samson <adeline.leclercq-samson@univ-grenoble-alpes.fr>, Julien Le Sommer <julien.lesommer@univ-grenoble-alpes.fr>",
"download_url": "https://files.pythonhosted.org/packages/80/a6/4da1576557afa5ea4743fd9cb0380d8009077effa1a421bdb260382defa4/pastax-0.0.2.tar.gz",
"platform": null,
"description": "# pastax\n\n<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/vadmbertr/pastax/refs/heads/main/docs/_static/pastax-md.png\" alt=\"pastax logo\" width=\"33%\">\n</p>\n\n<p align=\"center\">\n <b>P</b>arameterizable <b>A</b>uto-differentiable <b>S</b>imulators of ocean <b>T</b>rajectories in j<b>AX</b>.\n</p>\n\n## Installation\n\n`pastax` is Pip-installable:\n\n```shell\npip install pastax\n```\n\n## Usage\n\nDocumentation is under construction but you can already have a look at the [getting started notebook](docs/getting_started.ipynb) and the (messy) [API documentation](https://pastax.readthedocs.io/en/latest/api/).\n\n## Work in progress\n\nThis package in under active developement and should still be considered as work in progress.\n\nIn particular, the following changes are considered:\n\n- `pastax.gridded`\n - add support for C-grids,\n - maybe some refactoring of the structures,\n- `pastax.trajectory`\n - use `unxt.Quantity` in place of `Unitful` (see [unxt](https://unxt.readthedocs.io/en/latest/)),\n - remove `__add__` and like methods in favour of registered functions (see [quax](https://docs.kidger.site/quax/)),\n- `pastax.simulator`\n - improve how the product operation is performed between the vector field and the control (support for `Location`, `Time` or `State` objects) (see `diffrax` doc [here](https://docs.kidger.site/diffrax/api/terms/#diffrax.ControlTerm)),\n - add support/examples for interrupting the solve when a trajectory reaches land (see `diffrax` doc [here](https://docs.kidger.site/diffrax/api/events/)).\n\nAnd I should stress that the package lacks (unit-)tests for now.\n\n## Related projects\n\nSeveral other open-source projects already exist with similar objectives.\nThe closest ones are probably [(Ocean)Parcels](https://github.com/OceanParcels/parcels), [OpenDrift](https://github.com/OpenDrift/opendrift) and [Drifters.jl](https://github.com/JuliaClimate/Drifters.jl).\n\nHere is a (probably) non-comprehensive (and hopefuly correct, please reach-out if not) use-cases comparison between them:\n\n- you use Python: go with `pastax`, `OpenDrift` or `Parcels`,\n- you use Julia: go with `Drifters.jl`,\n- you want I/O inter operability with `xarray` Datasets: go with `pastax`, `OpenDrift`, `Parcels` or `Drifters.jl`,\n- you need support for Arakawa C-grid: go with `OpenDrift`, `Parcels` or `Drifters.jl` (but keep an eye on `pastax` as it might come in the future),\n- you want some post-processing routines: go with `Drifters.jl` (but keep an eye on `pastax` as some might come in the future),\n- you want a better control of the right-hand-side term of your Differential Equation: go with `pastax` (probably the most flexible) or `Parcels`,\n- you solve Stochastic Differential Equations: go with `pastax`, `OpenDrift` or `Parcels`,\n- you need a **wide** range of solvers: go with `pastax` or `Drifters.jl` (if you solve ODE),\n- you want to calibrate your simulator ***on-line*** (i.e. by differenting through your simulator): go with `pastax`,\n- you want to run on both CPUs and GPUs (or TPUs): go with `pastax`.\n\nWorth mentionning that I did not compare runtime performances (especially for typical use-cases with `OpenDrift`, `Parcels` or `Drifters.jl` of advecting a very large amount of particules with the same velocity field).\n\nI could also cite [py-eddy-tracker](https://github.com/AntSimi/py-eddy-tracker), altough it targets more specifically eddy related routines.\n\n## Contributing\n\nContributions are welcomed!\nSee [CONTRIBUTING.md](https://github.com/vadmbertr/pastax/blob/main/CONTRIBUTING.md) and [CONDUCT.md](https://github.com/vadmbertr/pastax/blob/main/CONDUCT.md) to get started.\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "**P**arameterizable **A**uto-differentiable **S**imulators of ocean **T**rajectories in j**AX**.",
"version": "0.0.2",
"project_urls": {
"Bug Tracker": "https://github.com/vadmbertr/pastax/issues",
"Homepage": "https://github.com/vadmbertr/pastax"
},
"split_keywords": [
"differentiable",
" drift",
" jax",
" lagrangian",
" ocean",
" parameterizable",
" sampler",
" sea",
" simulator",
" stochastic",
" trajectory"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e6b0247b4a57d65ca0c3f729e5eabd57c501407d9d23bde85bce7d39d15dd0f3",
"md5": "50d8097c7665d43138641e9cabb2aed9",
"sha256": "4c26f441991d297237746e980a5bb13eeb26dce5f95b34e551daed858f1f92a2"
},
"downloads": -1,
"filename": "pastax-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "50d8097c7665d43138641e9cabb2aed9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 51083,
"upload_time": "2025-01-06T11:07:01",
"upload_time_iso_8601": "2025-01-06T11:07:01.068094Z",
"url": "https://files.pythonhosted.org/packages/e6/b0/247b4a57d65ca0c3f729e5eabd57c501407d9d23bde85bce7d39d15dd0f3/pastax-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "80a64da1576557afa5ea4743fd9cb0380d8009077effa1a421bdb260382defa4",
"md5": "92682cc514fe73004abb59ea3b53eae2",
"sha256": "72f4a75202d7852f4173611c81de12e2f142ba61b200913720761ad3bfebe3f3"
},
"downloads": -1,
"filename": "pastax-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "92682cc514fe73004abb59ea3b53eae2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 39518,
"upload_time": "2025-01-06T11:07:02",
"upload_time_iso_8601": "2025-01-06T11:07:02.188174Z",
"url": "https://files.pythonhosted.org/packages/80/a6/4da1576557afa5ea4743fd9cb0380d8009077effa1a421bdb260382defa4/pastax-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-06 11:07:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "vadmbertr",
"github_project": "pastax",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "cartopy",
"specs": []
},
{
"name": "cmocean",
"specs": []
},
{
"name": "diffrax",
"specs": []
},
{
"name": "equinox",
"specs": []
},
{
"name": "interpax",
"specs": []
},
{
"name": "jax",
"specs": []
},
{
"name": "jaxtyping",
"specs": []
},
{
"name": "lineax",
"specs": []
},
{
"name": "matplotlib",
"specs": []
},
{
"name": "numpy",
"specs": []
},
{
"name": "xarray",
"specs": []
}
],
"lcname": "pastax"
}