pygridsio
Introduction
This is a python submodule containing IO and plotting functionality for reading and writing .asc, .zmap .nc and .tif grids.
Read the documentation here
Installation
pygridsio is available via the pypi package registry:
pip install pygridsio
Usage
from pygridsio import *
The standard grid class used throughout this project is a Xarray DataArray (see: https://xarray.dev/) with 2 dimensions: x and y.
To read a grid file to this class use:
grid = read_grid(filename)
You can write a grid to .asc, .zmap, .nc or .tif using the following method:
write_grid(grid,filename)
The code will discern which filetype to write out to by the file extension in filename. Note: .asc and .zmap are ascii based files and take up a lot of space. .nc and .tif are binary file types.
There is some plotting functionality implemented in pygridsio, this can be accessed using the pygridsio.grid_plotting module:
- The method
pygridsio.grid_plotting.plot_gridallows you to plot a custom Grid class, or xr.DataArray with multiple options. See the description of the method for more detail. - The method
pygridsio.grid_plotting.plot_grid_comparisonCreates a plot comparing two grids values against each other. See the description of the method for more detail. - The method
pygridsio.grid_plotting.make_interactive_plotCreates a interactive .html plot using plotly, this saves to a .html file
Documentation
This repository now includes an MkDocs site under docs/ with usage guides and API reference pages.
To preview it locally after installing the docs dependencies:
pip install -e .[docs]mkdocs serve
If you use Pixi, you can also run:
pixi run docs-servepixi run docs-build
Metadata
Release files for pygridsio 2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pygridsio-2.1.tar.gz | 1.5 MB | Without provenance | Details for pygridsio-2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pygridsio-2.1-py3-none-any.whl | Python 3 | none | any | Details for pygridsio-2.1-py3-none-any.whl |
Total release size: 3.0 MB
Release files / pygridsio-2.1.tar.gz
| Download URL | pygridsio-2.1.tar.gz |
|---|---|
| Size | 1.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc905662654e294598e09d7aa772d8fb54c08efacd14c255655d41ebbba92074
|
|
BLAKE2b-256 checksum How to use checksums |
57fc69dc0810307ac277e2347c1014acc1d25a37e1b517fa024f85b12b0261a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.16
|
Release files / pygridsio-2.1-py3-none-any.whl
| Download URL | pygridsio-2.1-py3-none-any.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7974ddb35d9b787593c1857344731a590b6a60b9a133274765d95332b8d8708d
|
|
BLAKE2b-256 checksum How to use checksums |
b7327d28224ec7083e6a5bc6e4736fd5d6f843c00c8e0ede00742d6eb823ef1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.16
|
Security for pygridsio 2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.