{"id":21461155,"url":"https://github.com/itc-water-resources/shxarray","last_synced_at":"2025-07-18T23:01:51.866Z","repository":{"id":208517068,"uuid":"719643889","full_name":"ITC-Water-Resources/shxarray","owner":"ITC-Water-Resources","description":"Extension to xarray providing functionality to work with spherical harmonic datasets","archived":false,"fork":false,"pushed_at":"2024-11-22T13:39:45.000Z","size":27956,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-22T14:34:01.479Z","etag":null,"topics":["geodesy","gravimetry","numpy","satellite","xarray"],"latest_commit_sha":null,"homepage":"https://shxarray.wobbly.earth","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/ITC-Water-Resources.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-16T15:48:58.000Z","updated_at":"2024-11-22T13:39:50.000Z","dependencies_parsed_at":"2024-06-27T15:25:20.824Z","dependency_job_id":"07693e15-1820-4973-8fe9-19debb8a9099","html_url":"https://github.com/ITC-Water-Resources/shxarray","commit_stats":null,"previous_names":["itc-water-resources/shxarray"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITC-Water-Resources%2Fshxarray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITC-Water-Resources%2Fshxarray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITC-Water-Resources%2Fshxarray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITC-Water-Resources%2Fshxarray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ITC-Water-Resources","download_url":"https://codeload.github.com/ITC-Water-Resources/shxarray/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226012311,"owners_count":17559651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["geodesy","gravimetry","numpy","satellite","xarray"],"created_at":"2024-11-23T07:07:46.456Z","updated_at":"2025-07-15T02:32:28.469Z","avatar_url":"https://github.com/ITC-Water-Resources.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  Xarray Extension for working with spherical harmonic data\n[![DOI](https://zenodo.org/badge/719643889.svg)](https://doi.org/10.5281/zenodo.15236539)\n[![Build](https://github.com/ITC-Water-Resources/shxarray/actions/workflows/python-publish.yml/badge.svg)](https://github.com/ITC-Water-Resources/shxarray/actions/workflows/python-publish.yml)\n[![PyPI version](https://badge.fury.io/py/shxarray.svg)](https://badge.fury.io/py/shxarray)\n[![Documentation Status](https://readthedocs.org/projects/shxarray/badge/?version=latest)](https://shxarray.wobbly.earth/latest/?badge=latest)\n\n\nThis extension adds functionality to work with Spherical Harmonics to [Xarray](https://github.com/pydata/xarray).\n\n\n## Features and functionality \n* Gravity functionals: (convert from Stokes coefficients to various gravity functionals, such as equivalent water heights, geoid changes, etc.)\n* Filter (e.g. Gaussian or anisotropic filter applied in the spectral domain)\n* The use of Xarray-like operations allow for applying functionality to multi-dimensional datasets\n* A spectral sea level equation solver\n\n## Getting started\nThe tutorials in the [documentation](https://shxarray.wobbly.earth/stable/tutorial.html) provide Jupyter Notebooks with examples of how to make use of the module. The notebooks can also be found on the [github repository](https://github.com/ITC-Water-Resources/shxarray/tree/main/docs/source/notebooks).\n\nThe functionality of shxarray becomes available when importing the module together with Xarray:\n\n```\nimport shxarray\nimport xarray as xr\n```\nafter which the shxarray accessor becomes available for use, e.g.:\n```\nnmax=20\nnmin=2\ndazeros=xr.DataArray.sh.ones(nmax=nmax,nmin=nmin)\n```\n\n## Installation\nYou can install this package from PyPi using:\n```\npip install shxarray\n```\n\n## Backends\nShxarray comes with a default **shlib** backend written in C++ and Cython. In addition, a very fast 'shtns' backend can be used when [SHTns](https://nschaeff.bitbucket.io/shtns/) is installed. The backends can be specified in enabled routines as the options: `engine='shlib'` or `engine='shtns'`.\n\n## Development Installation\nIf you want to help in the development of this package, it's best to clone the repository to allow for modifications and pull requests. The extension makes use of [Cython](https://cython.readthedocs.io/en/latest/) generated code to speed up spherical harmonic synthesis and analysis.\n\n1. Create your own virtual environment with `venv` or Anaconda *(Optional but recommended, when a user installation is desired)*\n2. Clone this repository `git clone https://github.com/ITC-Water-Resources/shxarray.git`\n3. Change to the repository directory `cd shaxarray`\n4. Set the environment variable `export USE_CYTHON=1` *(Optional and only in the case Cython code is being developed or needs to be regenerated)*\n5. Install using pip  `pip install .` or use `pip install -e .` for an editable install\n \n### Cython build tip on an editable install\nFrom the repository root directory, regenerating the shared library running \n\n```python ./setup.py build_ext``` \n\nwill be much faster than using \n\n```pip install -e .``` \n\n\nThis will build the shared library in for example `./build/lib.linux-x86_64-cpython-3xx/shxarray/shlib.cpython-3xx-x86_64-linux-gnu.so`. To make sure changes are picked up in your editable install you should create a symbolic link in the Python part of the library e.g. :\n\n```\ncd src/shxarray/\nln -sf ../../build/lib.linux-x86_64-cpython-311/shxarray/shlib.cpython-311-x86_64-linux-gnu.so\n```\n\n### Numpy version issues\nThe provided c++ files are cythonized against numpy \u003e 2. When building against older numpy versions (\u003c2), the cpp files are re-cythonized upon install, this requires a working cython installation.\n\n\n## Contributing\nThis repository is under development and contributions and feedback is welcome.\n\n### Contributors\n* Main developer: Roelof Rietbroek (r.rietbroek@utwente.nl)\n* Kiana Karimi\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitc-water-resources%2Fshxarray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitc-water-resources%2Fshxarray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitc-water-resources%2Fshxarray/lists"}