{"id":14812602,"url":"https://github.com/underworldcode/stripy","last_synced_at":"2025-10-21T19:50:43.801Z","repository":{"id":34825105,"uuid":"62543849","full_name":"underworldcode/stripy","owner":"underworldcode","description":"2D spherical and Cartesian triangulation toolkit using tripack, stripack, srfpack and ssrfpack ","archived":false,"fork":false,"pushed_at":"2024-09-13T04:48:55.000Z","size":331145,"stargazers_count":53,"open_issues_count":6,"forks_count":13,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-09-13T16:24:57.684Z","etag":null,"topics":["fortran","meshes","python","spherical-geometry","triangulation-delaunay"],"latest_commit_sha":null,"homepage":"https://underworldcode.github.io/stripy/2.0.5b2_api","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/underworldcode.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING.LESSER","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":"2016-07-04T08:11:47.000Z","updated_at":"2024-09-13T04:46:32.000Z","dependencies_parsed_at":"2023-02-11T23:46:06.642Z","dependency_job_id":"e4016ff9-2fba-4364-b7ce-96f274f05a9e","html_url":"https://github.com/underworldcode/stripy","commit_stats":{"total_commits":556,"total_committers":18,"mean_commits":30.88888888888889,"dds":0.670863309352518,"last_synced_commit":"8daf676ecef01468ace480cd7ec2a965041d5de0"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/underworldcode%2Fstripy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/underworldcode%2Fstripy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/underworldcode%2Fstripy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/underworldcode%2Fstripy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/underworldcode","download_url":"https://codeload.github.com/underworldcode/stripy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219803136,"owners_count":16545632,"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":["fortran","meshes","python","spherical-geometry","triangulation-delaunay"],"created_at":"2024-09-18T09:01:51.684Z","updated_at":"2025-09-16T16:30:51.922Z","avatar_url":"https://github.com/underworldcode.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook"],"sub_categories":[],"readme":"# Stripy\n\n[![Docker Cloud Automated build](https://img.shields.io/docker/cloud/automated/underworldcode/stripy.svg)](https://hub.docker.com/r/underworldcode/stripy)\n[![PyPI](https://img.shields.io/pypi/v/stripy.svg)](https://pypi.org/project/stripy/)\n\n[![pip builds](https://github.com/underworldcode/stripy/workflows/pip%20builds/badge.svg)](https://github.com/underworldcode/stripy/actions?query=workflow%3A%22pip+builds%22)\n\n![Conda Deployment](https://github.com/underworldcode/stripy/workflows/Conda%20Deployment/badge.svg)\n\n\nA Python interface to TRIPACK and STRIPACK Fortran code for (constrained) triangulation in Cartesian coordinates and on a sphere. Stripy is an object-oriented package and includes routines from SRFPACK and SSRFPACK for interpolation (nearest neighbor, linear and hermite cubic) and to evaluate derivatives (Renka 1996a,b and 1997a,b).\n\n`stripy` is bundled with `litho1pt0` which is a python interface to the _crust 1.0_ dataset and the lithospheric part of the _litho 1.0_ dataset (Laske et al, 2013 and Pasyanos et al, 2014) which both requires and demonstrates the triangulation / searching and interpolation on the sphere that is provided by `stripy`.\n\n\n![Examples](https://github.com/underworldcode/stripy/blob/master/stripy/Notebooks/Images/seafloor-age-topo.png?raw=true)\n\n_Sample images created with `stripy` illustrating the meshing capability: ocean age data can be triangulated on the sphere with no need for points on land. Once `stripy` ingests your data points, you can sample another dataset to your grid (bathymetry on the right), smooth, find the derivatives of your data, or interpolate to another set of points._\n\n## Documentation\n\nThere are two matching sets of `stripy` notebooks - one set for [Cartesian Triangulations](#Cartesian) and one for [Spherical Triangulations](#Spherical). For most geographical applications, the spherical triangulations are the natural choice as they expect longitude and latitude coordinates (admittedly in radians).  There are some worked examples\nwhich use the companion package litho1pt0\n\n### Stable code \n\n  - Documentation / Notebooks [https://underworldcode.github.io/stripy/2.0.5b2](https://underworldcode.github.io/stripy/2.0.5b2)\n  - API documentation [https://underworldcode.github.io/stripy/2.0.5b2_api](https://underworldcode.github.io/stripy/2.0.5b2_api)\n\n### Bleeding edge code \n\n\n  - Documentation / Notebooks [https://underworldcode.github.io/stripy/2.1.0b1](https://underworldcode.github.io/stripy/2.1.0b1)\n  - API documentation [https://underworldcode.github.io/stripy/2.1.0b1_api](https://underworldcode.github.io/stripy/2.1.0b1_api)\n\nFor previous versions, see the [changelog](Changelog.md)\n\n### Installation \u0026 Running in the cloud\n\n#### Binder\n\nLaunch the demonstration \u003c!-- at [links.underworldcode.org/stripy-live (mybinder.org)](http://links.underworldcode.org/stripy-live) --\u003e\n\n[![Binder](https://mybinder.org/badge_logo.svg)](http://links.underworldcode.org/stripy-live)\n\n(This is the development branch)\n\n[![Binder-dev](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/underworldcode/stripy/dev?filepath=Notebooks%2F0-StartHere.ipynb)\n\n\n#### Citation\n\n[![DOI](http://joss.theoj.org/papers/10.21105/joss.01410/status.svg)](https://doi.org/10.21105/joss.01410)\n\nMoresi, L. and Mather, B.R., (2019). Stripy: A Python module for (constrained) triangulation in Cartesian coordinates and on a sphere.. Journal of Open Source Software, 4(38), 1410, [https://doi.org/10.21105/joss.01410](https://doi.org/10.21105/joss.01410)\n\n## Navigation / Notebooks\n\n\nThere are two matching sets of `stripy` notebooks - one set for [Cartesian Triangulations](#Cartesian) and one for [Spherical Triangulations](#Spherical). For most geographical applications, the spherical triangulations are the natural choice as they expect longitude and latitude coordinates (admittedly in radians).\n\nNote: the Cartesian and Spherical notebooks can be obtained / installed from `stripy` itself as follows:\n\n```bash\n   python -c 'import stripy; stripy.documentation.install_documentation(path=\"Notebooks\")'\n```\n\n### Cartesian\n\n  - [Ex1-Cartesian-Triangulations.ipynb](stripy/Notebooks/CartesianTriangulations/Ex1-Cartesian-Triangulations.ipynb)\n  - [Ex2-CartesianGrids.ipynb](stripy/Notebooks/CartesianTriangulations/Ex2-CartesianGrids.ipynb)\n  - [Ex3-Interpolation.ipynb](stripy/Notebooks/CartesianTriangulations/Ex3-Interpolation.ipynb)\n  - [Ex4-Gradients.ipynb](stripy/Notebooks/CartesianTriangulations/Ex4-Gradients.ipynb)\n  - [Ex5-Smoothing.ipynb](stripy/Notebooks/CartesianTriangulations/Ex5-Smoothing.ipynb)\n  - [Ex6-Scattered-Data.ipynb](stripy/Notebooks/CartesianTriangulations/Ex6-Scattered-Data.ipynb)\n  - [Ex7-Refinement-of-Triangulations.ipynb](stripy/Notebooks/CartesianTriangulations/Ex7-Refinement-of-Triangulations.ipynb)\n  - [Ex8-Spline-Tension.ipynb](stripy/Notebooks/CartesianTriangulations/Ex8-Spline-Tension.ipynb)\n  - [Ex9-Voronoi-Diagram.ipynb](stripy/Notebooks/CartesianTriangulations/Ex9-Voronoi-Diagram.ipynb)\n\n### Spherical\n\n  - [Ex1-Spherical-Triangulations.ipynb](stripy/Notebooks/SphericalTriangulations/Ex1-Spherical-Triangulations.ipynb)\n  - [Ex2-SphericalGrids.ipynb](stripy/Notebooks/SphericalTriangulations/Ex2-SphericalGrids.ipynb)\n  - [Ex3-Interpolation.ipynb](stripy/Notebooks/SphericalTriangulations/Ex3-Interpolation.ipynb)\n  - [Ex4-Gradients.ipynb](stripy/Notebooks/SphericalTriangulations/Ex4-Gradients.ipynb)\n  - [Ex5-Smoothing.ipynb](stripy/Notebooks/SphericalTriangulations/Ex5-Smoothing.ipynb)\n  - [Ex6-Scattered-Data.ipynb](stripy/Notebooks/SphericalTriangulations/Ex6-Scattered-Data.ipynb)\n  - [Ex7-Refinement-of-Triangulations.ipynb](stripy/Notebooks/SphericalTriangulations/Ex7-Refinement-of-Triangulations.ipynb)\n  - [Ex8-Spline-Tension.ipynb](stripy/Notebooks/SphericalTriangulations/Ex8-Spline-Tension.ipynb)\n  - [Ex9-Voronoi-Diagram.ipynb](stripy/Notebooks/SphericalTriangulations/Ex9-Voronoi-Diagram.ipynb)\n\n\n### Examples\n\nNote, these examples are the notebooks from `litho1pt0` which are installed from the\npackage itself:\n\n```bash\n   python -c 'import litho1pt0; litho1pt0.documentation.install_documentation(path=\"Notebooks\")'\n```\n\nThe first three notebooks are an introduction to `litho1pt0` that does not explicitly mention `stripy` but\nthe next two worked examples show how to search, interpolate and plot with the help of `stripy` routines.\n\n  - [Ex1-Litho1Layers.ipynb](https://github.com/underworldcode/litho1pt0/blob/master/litho1pt0/Notebooks/litho1pt0/Ex1-Litho1Layers.ipynb)\n  - [Ex2-Litho1Properties.ipynb](https://github.com/underworldcode/litho1pt0/blob/master/litho1pt0/Notebooks/litho1pt0/Ex2-Litho1Properties.ipynb)\n  - [Ex3-CrustalRegionalisation.ipynb](https://github.com/underworldcode/litho1pt0/blob/master/litho1pt0/Notebooks/litho1pt0/Ex3-CrustalRegionalisation.ipynb)\n  - [WorkEx1-CratonAverageProperties.ipynb](https://github.com/underworldcode/litho1pt0/blob/master/litho1pt0/Notebooks/litho1pt0/WorkEx1-CratonAverageProperties.ipynb)\n  - [WorkEx2-OceanDepthAge.ipynb](https://github.com/underworldcode/litho1pt0/blob/master/litho1pt0/Notebooks/litho1pt0/WorkEx2-OceanDepthAge.ipynb)\n\n\n## Installation\n\n### Dependencies\n\nYou will need **Python 3.6+**.\nAlso, the following packages are required:\n\n - [`gfortran`](https://www.fatiando.org/verde/latest/install.html) (or any Fortran compiler)\n - [`numpy`](http://numpy.org)\n - [`scipy`](https://scipy.org)\n\n**Recommended Packages** for running the notebooks:\n\n - [`litho1pt0`](https://pypi.org/project/litho1pt0/)\n - [`matplotlib`](https://matplotlib.org/)\n - [`imageio`](https://imageio.github.io/)\n - [`cartopy`](https://scitools.org.uk/cartopy/docs/latest/)\n - [`k3d`](https://github.com/K3D-tools/K3D-jupyter)\n - [`xarray`](http://xarray.pydata.org/en/stable/)\n - [`netcdf4`](https://unidata.github.io/netcdf4-python/)\n\nAll of which should be available from pip or anaconda (conda-forge) for most platforms.\n\n### Installing using pip\n\nYou can install `stripy` using the\n[`pip package manager`](https://pypi.org/project/pip/) with either version of Python:\n\n```bash\npython3 -m pip install stripy\n```\n\nAll the dependencies will be automatically installed by `pip`, except for `gfortran`\n(or any Fortran compiler). It must be installed in your system before installing\n`stripy` with `pip`.\n\nIf you change the Fortran compiler, you may have to add the\nflags `config_fc --fcompiler=\u003ccompiler name\u003e` when `setup.py` is run\n(see docs for [numpy.distutils](http://docs.scipy.org/doc/numpy-dev/f2py/distutils.html)).\n\n### Installing with conda\n\nIf you use the anaconda packaging system, then you should be able to \n\n```bash\nconda install -c geo-down-under stripy\n```\n\n## Usage\n\nTwo classes are included as part of the Stripy package:\n\n- `sTriangulation` (Spherical coordinates)\n- `Triangulation` (Cartesian coordinates)\n\nThese classes share similar methods and can be easily interchanged.\nIn addition, there are many helper functions provided for building meshes.\n\nA series of tests are located in the *tests* subdirectory.\nIn order to perform these tests clone the repository and run [`pytest`](https://pypi.org/project/pytest/):\n\n```bash\ngit checkout https://github.com/underworldcode/stripy.git\ncd stripy\npytest -v\n```\n\n\n## References\n\n   1. Laske, G., G. Masters, and Z. Ma (2013), Update on CRUST1. 0—A 1-degree global model of Earth's crust, Geophys Research Abstracts, 15, EGU2013–2658.\n\n   1. Pasyanos, M. E., T. G. Masters, G. Laske, and Z. Ma (2014), LITHO1.0: An updated crust and lithospheric model of the Earth, Journal of Geophysical Research-Solid Earth, 119(3), 2153–2173, doi:10.1002/2013JB010626.\n\n   1. R. J. Renka, \"ALGORITHM 751: TRIPACK: A Constrained Two- Dimensional Delaunay Triangulation Package\" ACM Trans. Math. Software, Vol. 22, No. 1, 1996, pp. 1-8.\n\n   1. R. J. Renka, \"ALGORITHM 752: SRFPACK: Software for Scattered Data Fitting with a Constrained Surface under Tension\", ACM Trans. Math. Software, Vol. 22, No. 1, 1996, pp. 9-17.\n\n   1. R. J. Renka, \"ALGORITHM 772: STRIPACK: Delaunay Triangulation and Voronoi Diagram on the Surface of a Sphere\" ACM Trans. Math. Software, Vol. 23, No. 3, 1997, pp. 416-434.\n\n   1. R. J. Renka, \"ALGORITHM 773: SSRFPACK: Interpolation of Scattered Data on the Surface of a Sphere with a Surface under Tension\", ACM Trans. Math. Software, Vol. 23, No. 3, 1997, pp. 437-439.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funderworldcode%2Fstripy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funderworldcode%2Fstripy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funderworldcode%2Fstripy/lists"}