of curvilinear-orthogonal grids • The Foundation (suite of C libraries) • The Abstraction (basic python tools) • The Community (conda-forge) • The Enhancements (interactivity) • Questions
the code • Robert Hetland at Texas A&M – wrote the python bindings • Filipe Fernandes, Phil Elson, Rich Signell (USGS) • Lucas Nguyen & Rica Enriquez at Geosyntec (our employer) • Scipy conference organizers and reviewers
• Turning Point – Point on the boundary that is defined to either close the polygon (β=+1) or open a new side channel (β = -1) • Node or Vertex – a single point in the generated grid • Shape – number of nodes in each direction • Cell – The quadrilateral formed by 4 adjacent nodes • Centroid – The geometric center of a cell
Bureau of Meteorology) • Hard to compile from source (*nix systems, very difficult) • Still can’t compile on Windows • Breadth of examples serving as user docs • Central control file points to boundary file, defined other parameters (e.g., number of nodes) • Called executable from terminal
for the C libraries using ctypes • Vendored C sources • Authored by Dr. Robert Hetland at Texas A&M with contributions from Rich Signell at USGS. • Allows users to use familiar numpy arrays • Interactive grid boundary creation via MPL widgets • Exposed and API to utilize Focus…
and link properly • Equally difficult to link the Python bindings • Growing demand from oceanographers, hydrodynamic modelers • conda-forge saved us all
“feedstocks” in individual Github repositories • Commits (changes to the repo) trigger continuous integration that build packages for all platforms when possible) conda install <pkg_name> --channel=conda-forge
miles of braided river for a sediment and pollutant fate and transport model • Fixed a few bugs • Added and clarified some docstrings • Cached slow-to-compute grid domain properties (the σ’s, β’s, & ζ’s) • Sphinx docs at http://phobson.github.io/pygridgen/
via matplotlib • Spatial data I/O via fiona • “Pandas-like” operations for manipulating the grids • Merging • Spliting • Refining • Masking • Etc • Docs at http://geosyntec.github.io/pygridtools/
pgg.Focus() # tighten the grid in the channels # around the big island & coarsen upstream focus.add_focus(5./ny, 'y', 4., extent=8./ny) focus.add_focus(14.5/ny, 'y', 4., extent=4./ny) focus.add_focus(52./nx, 'x', 4., extent=20./nx) focus.add_focus(98./nx, 'x', 0.25, extent=4./nx) # generate the main grid grid = pgt.makeGrid(domain=gridbounds, nx=nx, ny=nx, focus=focus)