Skip to main content

This is a utility package to read in .zmap and .asc grids to numpy or xarrays

Project description

pygridsio

Introduction

This is a python submodule containing IO functionality for reading and writing .asc and .zmap grids.

Usage

from pygridsio.pygridsio import *

To read a grid file into the custom grid class:

grid = read_grid(filename)

To read a grid file into an xarray, with dimensions x, y, grid:

grid = read_grid_to_xarray(filename)

Or if you want to read multiple grids into an xarray provide a list of filenames:

grids = read_grids_to_xarray([file1, file2])

You can optionally provide labels fo the multiple grid:

grids = read_grids_to_xarray([file1, file2], labels=["grid1","grid2"])

Installation

Pip

pip install pygridsio

Anaconda virtual environment

Create/update anaconda environment

The file environment.yml can be used to create a working python environment with the needed packages. For this open an Anaconda Prompt and:

conda env create -f environment.yml

Or to update the existing anaconda environment (with an updated version of theenvironment.ymlfile :

conda env update -n pygridsio -f environment.yml

Export (updated) anaconda environment

The environment.yml file needs to be updated when new packages are added:

conda env export --from-history -n pygridsio > environment.yml

Use anaconda environment in PyCharm

To connect the anaconda environment to Pycharm you can go to File , Settings, Project, Python Interpreter, add interpreter, add local interpreter, conda environment and then select the environment you created using the above steps.

Verify Installation

You can verify the installation of the different python packages by running the tests stored in tests. In pycharm: Right click on the folder marked tests and click on Run python tests in test

Project details


Download files

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

Source Distribution

pygridsio-0.1.8.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

pygridsio-0.1.8-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pygridsio-0.1.8.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.20

File hashes

Hashes for pygridsio-0.1.8.tar.gz
Algorithm Hash digest
SHA256 981b9f4ca28891d66d2227274936e3b11c81468d1e8158a826b2991456eb2fce
MD5 f4cd7d75bb059b425a59937feb54699e
BLAKE2b-256 dd98b683c7b63b62833eace78919b8467dfc440f4218dca181b60710014aac47

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pygridsio-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.20

File hashes

Hashes for pygridsio-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 a35e1fd228398dc29182ddf686b7ec0b8223f391f5d9a26136e8797d241006e6
MD5 f027fd4ac8e8dec4bf9a239055cf186d
BLAKE2b-256 9bc5ed14767b969eb2b9d1e498e1c35979af63033a5bf3f00b2fd30ff4aa8cd7

See more details on using hashes here.

Supported by

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