Bay-Delta SELFE Tools

gr3 Module

A package to read a mesh in GR3 format.

class gr3.Gr3IO

Bases: base_io.BaseIO

A class that manages I/O of GR3 files


read(gr3_fname='hgrid.gr3', mode=0)

Read in a hgrid.gr3 file. If mode is 1, it does not read in boundary information.

write(mesh, fname, node_attr=None, boundary=False)

Write a GR3 format grid. mesh = SELFE mesh (selfe_mesh) instance fname = output file name node_attr = a list of node attribute boundary = If true, boundary information will be added. Otherwise, it will not be appended.