gridgeo

class gridgeo.gridgeo.GridGeo(nc, **kwargs)[source]

Bases: object

GridGeo class takes a nc-like object (netCDF4-python or a netCDF file/URL) and parse the grid information.

geometry
outline
save(filename, fmt=None, **kw)[source]
to_geojson(**kw)[source]

Return a GeoJSON representation of an grid object. The kw are based on the simplestyle-spec: https://github.com/mapbox/simplestyle-spec/tree/master/1.1.0

gridgeo.gridgeo.set_precision(coords, precision)[source]

cfvariable

class gridgeo.cfvariable.CFVariable(nc, **kwargs)[source]

Bases: object

axis(name)[source]
chartostring
chunking()[source]
coordinates
crs()[source]
datatype
dimensions
dtype
endian()[source]
field
filters()[source]
group()[source]
long_name
mask
name
ncattrs()[source]
ndim
polygons()[source]
scale
shape
size
standard_name
t_axis()[source]
topology()[source]
units
x_axis()[source]
y_axis()[source]
z_axis()[source]

ugrid

Lightweight UGRID-1.0 parser

gridgeo.ugrid.connectivity_array(connectivity, num_ind)[source]

Returns the connectivity array for its correspdonding netCDF4.Variable according to UGRID-1.0.

gridgeo.ugrid.get_mesh_var(nc)[source]

Returns the mesh_topology variable for nc (netCDF4.Dataset object).

gridgeo.ugrid.ugrid(nc)[source]

Parse UGRID conventions.

Take a netCDF4.Dataset object or a netCDF4 file/url string and returns a dictionary with the grid nodes, edges, and connectivy matrix.