Skip to content

roy-shuvashish/pygridtools

 
 

Repository files navigation

pygridtools

image

image

image

A high-level interface for curvilinear-orthogonal grid generation, manipulation, and visualization.

Depends heavily on gridgen and pygridgen

The full documentation for this for library is here.

Installation

conda-forge generously maintains Linux and Mac OS X conda builds of pygridtools.

Install with

conda install pygridtools --channel=conda-forge

Building (gridgen-c) on Windows has been a tough nut to crack and help is very much wanted in that department. Until we figure that out, you can do the following in the source directory.

conda install seaborn geopandas
pip install -e .

You won't be able to generate new grids, but you should be able to manipulate existing grids.

Dependencies

Basics

The remaining python depedencies are the following:

  • numpy
  • matplotlib
  • pandas (for easy data I/O and manipulation)
  • geopandas (for shapfile I/O)

Grid Generation

If you wish to generate new grids from scratch, you'll need pygridgen, which is also available through the conda-forge channel.

conda install pygridgen --channel=conda-forge

The documentation pygridgen has a more detailed tutorial on generating new grids.

Testing

Tests are written using the pytest package. From the source tree, run them simply with by invoking pytest in a terminal. If you're editing the source code, it helps to have pytest-pep8 installed to check code style.

Alternatively, from the source tree you can run python check_pygridtools.py --strict to run the units tests, style checker, and doctests.

Documentation

Building the HTML documentation requires:

  • sphinx
  • sphinx_rtd_theme
  • numpydoc
  • jupyter-notebook
  • nbsphinx
  • pandas
  • seaborn

Source code and Issue Tracker

The source code is available on Github at Geosyntec/pygridtools.

Please report bugs, issues, and ideas there.

Contributing

  1. Feedback is a huge contribution
  2. Get in touch by creating an issue to make sure we don't duplicate work
  3. Fork this repo
  4. Submit a PR in a separate branch
  5. Write a test (or two (or three))
  6. Stick to PEP8-ish -- I'm lenient on the 80 chars thing (<100 is probably a smart move though).

About

🌐 Miscellaneous utilities to accompany pygridgen

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%