Skip to main content

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_grid allows 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_comparison Creates 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_plot Creates 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-serve
  • pixi run docs-build

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygridsio-1.8.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygridsio-1.8-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

Details for the file pygridsio-1.8.tar.gz.

File metadata

  • Download URL: pygridsio-1.8.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for pygridsio-1.8.tar.gz
Algorithm Hash digest
SHA256 80475fbace134de86bd2bf77675a59488868815c8bded6c60a5928e9bbd8c5aa
MD5 69d7491c4943d20659db8285f39b00b7
BLAKE2b-256 674bcb0f5a1133872fba83875b0d0838fe4dce29a143becf82446560ad88a591

See more details on using hashes here.

File details

Details for the file pygridsio-1.8-py3-none-any.whl.

File metadata

  • Download URL: pygridsio-1.8-py3-none-any.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for pygridsio-1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 91e30bc6fc8d9f7e5b72213b0d88f45fe8b83e11407ea6b4552c99e0f3199b57
MD5 d4af08fca1277f47f5f33d02b5c899b5
BLAKE2b-256 9d8258da08f7050af11361535c3c0fffcfa3a615f03c7694e216023373b2ccb4

See more details on using hashes here.

Release history Release notifications | RSS feed

2.1

2 files

2.0

2 files

This release

1.8 This release

2 files

1.7

2 files

1.6

2 files

1.5

2 files

1.4

2 files

1.3

2 files

1.2

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1

2 files

1.0

2 files

0.3.28

2 files

0.3.27

2 files

0.3.26

2 files

0.3.25

2 files

0.3.24

2 files

0.3.23

2 files

0.3.22

2 files

0.3.21

2 files

0.3.20

2 files

0.3.19

2 files

0.3.17

2 files

0.3.16

2 files

0.3.15

2 files

0.3.14

2 files

0.3.13

2 files

0.3.12

2 files

0.3.11

2 files

0.3.10

2 files

0.3.9

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.3

2 files

0.2.2

2 files

0.2.0

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page