{"id":41507499,"url":"https://github.com/meom-group/jaxparrow","last_synced_at":"2026-01-23T19:36:14.324Z","repository":{"id":199512371,"uuid":"702998298","full_name":"meom-group/jaxparrow","owner":"meom-group","description":"A package for computing the inversion of the cyclogeostrophic balance based on a variational formulation approach, using JAX.","archived":false,"fork":false,"pushed_at":"2025-12-01T08:21:15.000Z","size":124094,"stargazers_count":9,"open_issues_count":4,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-12-03T19:48:48.762Z","etag":null,"topics":["cyclogeostrophy","eddy","flow","geostrophy","jax","swirl","velocity"],"latest_commit_sha":null,"homepage":"https://jaxparrow.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meom-group.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-10-10T12:05:22.000Z","updated_at":"2025-12-01T08:21:19.000Z","dependencies_parsed_at":"2025-03-05T14:25:37.509Z","dependency_job_id":"935e3166-2896-42b3-a143-f427ac5c5a88","html_url":"https://github.com/meom-group/jaxparrow","commit_stats":null,"previous_names":["meom-group/jaxparrow"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/meom-group/jaxparrow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meom-group%2Fjaxparrow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meom-group%2Fjaxparrow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meom-group%2Fjaxparrow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meom-group%2Fjaxparrow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meom-group","download_url":"https://codeload.github.com/meom-group/jaxparrow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meom-group%2Fjaxparrow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28698926,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T17:25:48.045Z","status":"ssl_error","status_checked_at":"2026-01-23T17:25:47.153Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cyclogeostrophy","eddy","flow","geostrophy","jax","swirl","velocity"],"created_at":"2026-01-23T19:36:13.723Z","updated_at":"2026-01-23T19:36:14.319Z","avatar_url":"https://github.com/meom-group.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jaxparrow\n\n![Python](https://img.shields.io/badge/dynamic/yaml?url=https://raw.githubusercontent.com/meom-group/jaxparrow/master/.github/workflows/python-package.yml\u0026label=Python\u0026query=$.jobs.build.strategy.matrix[\"python-version\"])\n[![PyPi](https://img.shields.io/badge/dynamic/xml?url=https://pypi.org/rss/project/jaxparrow/releases.xml\u0026label=PyPi\u0026query=/rss/channel/item[1]/title)](https://pypi.org/project/jaxparrow/)\n![Tests](https://github.com/meom-group/jaxparrow/actions/workflows/python-package.yml/badge.svg)\n[![Docs](https://app.readthedocs.org/projects/jaxparrow/badge/)](https://jaxparrow.readthedocs.io/)\n[![DOI](https://zenodo.org/badge/702998298.svg)](https://zenodo.org/badge/latestdoi/702998298)\n\n`jaxparrow` implements a novel approach based on a minimization-based formulation to compute the inversion of the cyclogeostrophic balance.\n\nIt leverages the power of [`JAX`](https://jax.readthedocs.io/en/latest/), to efficiently solve the inversion as a minimization problem.\nGiven the Sea Surface Height (SSH) field of an ocean system, `jaxparrow` estimates the velocity field that best satisfies the cyclogeostrophic balance.\n\nA comprehensive documenation is available: [https://jaxparrow.readthedocs.io/en/latest/](https://jaxparrow.readthedocs.io/en/latest/)!\n\n## Installation\n\n`jaxparrow` is Pip-installable:\n\n```shell\npip install jaxparrow\n```\n\n**\u003cins\u003eHowever\u003c/ins\u003e**, users with access to GPUs or TPUs should first install `JAX` separately in order to fully benefit from its high-performance computing capacities.\nSee [JAX instructions](https://jax.readthedocs.io/en/latest/installation.html).\nBy default, `jaxparrow` will install a CPU-only version of JAX if no other version is already present in the Python environment.\n\n## Usage\n\nThe function you are most probably looking for is [`cyclogeostrophy`](https://jaxparrow.readthedocs.io/en/latest/api/#jaxparrow.cyclogeostrophy.cyclogeostrophy).\nIt computes the cyclogeostrophic velocity field (returned as two `2darray`) from:\n\n- a SSH field (a `2darray`),\n- the latitude and longitude grids at the T points (two `2darray`).\n\nIn a Python script, assuming that the input grids have already been initialised / imported, estimating the cyclogeostrophic velocities for a single timestamp would resort to:\n\n```python\nfrom jaxparrow import cyclogeostrophy\n\nucg, vcg = cyclogeostrophy(ssh_2d, lat_2d, lon_2d, return_grids=False)\n```\n\n*Because `jaxparrow` uses [C-grids](https://xgcm.readthedocs.io/en/latest/grids.html) the velocity fields are represented on two grids (U and V), and the tracer fields (such as SSH) on one grid (T).*\nWe provide functions computing some kinematics (such as velocities magnitude, normalized relative vorticity, or kinematic energy) accounting for these gridding system:\n\n```python\nfrom jaxparrow.tools.kinematics import magnitude\n\nuv_cg = magnitude(ucg, vcg)\n```\n\nTo vectorise the estimation of the cyclogeostrophy along a first time dimension, one aims to use `jax.vmap`.\n\n```python\nimport jax\n\nvmap_cyclogeostrophy = jax.vmap(cyclogeostrophy, in_axes=(0, None, None))\nu_cg_3d, v_cg_3d = vmap_cyclogeostrophy(ssh_3d, lat_2d, lon_2d)\n```\n\nBy default, the `cyclogeostrophy` function relies on our minimization-based method.\nIts `method` argument provides the ability to use the fixed-point method instead, as described by [Penven *et al.* (2014)](https://doi.org/10.1016/j.dsr2.2013.10.015).\nAdditional arguments also give a finer control over the different approaches hyperparameters.\n\nSee `jaxparrow` [documentation](https://jaxparrow.readthedocs.io/en/latest/) for more details (including the API description and step-by-step examples).\n\n## Contributing\n\nContributions are welcomed!\nSee [CONTRIBUTING.md](https://github.com/meom-group/jaxparrow/blob/main/CONTRIBUTING.md) and [CONDUCT.md](https://github.com/meom-group/jaxparrow/blob/main/CONDUCT.md) to get started.\n\n## How to cite\n\nIf you use this software, please cite it: [CITATION.cff](https://github.com/meom-group/jaxparrow/blob/main/CITATION.cff).\nThank you!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeom-group%2Fjaxparrow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeom-group%2Fjaxparrow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeom-group%2Fjaxparrow/lists"}