Bay-Delta SELFE Tools

sms2gr3 Module

Created on Tue Dec 14 08:20:33 2010

@author: snegusse Script for converting SMS’ 2dm format to SELFE gr3

Usage: Input arguments: 1. Directory where the *.2dm and *.bc files are located. 2. number_of_boundaries: This is the total number of the boundary nodestrings in SMS which can also be found in the *.bc file , at the bottom - the index of the last boundary 3. boundarytype dictionary: This maps the different nodestring indices in *.bc file (the keys) to the respective SELFE boundary types and the names are assigned here which will be printed out in hgrid.gr3. The first value is used to group the different boundaries and control the order they will be printed in hgrid.gr3. The second value will be printed as the header line in the boundary list in hgrid.gr3. Note in SMS all external land and island boundaries are designated same index.

class sms2gr3.Boundary(name, btype, nodestring)

Bases: object

sms2gr3.addnode(list)
sms2gr3.convert_2dm(file, outfile=None, elev2depth=False)
sms2gr3.create_arg_parser()