#NEWLINE# def check( self , f = None , verbose = True , level = 1 ) : #NEWLINE# #INDENT# "\n        Check sfr2 package data for common errors.\n\n        Parameters\n        ----------\n        f : str or file handle\n            String defining file name or file handle for summary file\n            of check method output. If a string is passed a file handle\n            is created. If f is None, check method does not write\n            results to a summary file. (default is None)\n        verbose : bool\n            Boolean flag used to determine if check method results are\n            written to the screen\n        level : int\n            Check method analysis level. If level=0, summary checks are\n            performed. If level=1, full checks are performed.\n\n        Returns\n        -------\n        None\n\n        Examples\n        --------\n\n        >>> import flopy\n        >>> m = flopy.modflow.Modflow.load('model.nam')\n        >>> m.sfr2.check()\n        " #NEWLINE# chk = check ( self , verbose = verbose , level = level ) #NEWLINE# chk . numbering ( ) #NEWLINE# chk . routing ( ) #NEWLINE# chk . overlapping_conductance ( ) #NEWLINE# chk . elevations ( ) #NEWLINE# chk . slope ( ) #NEWLINE# if ( f is not None ) : #NEWLINE# #INDENT# if isinstance ( f , str ) : #NEWLINE# #INDENT# pth = os . path . join ( self . parent . model_ws , f ) #NEWLINE# f = open ( pth , 'w' ) #NEWLINE# #UNINDENT# f . write ( '{}\n' . format ( chk . txt ) ) #NEWLINE# #UNINDENT# return chk