#NEWLINE# def write_file( self , check = True ) : #NEWLINE# #INDENT# '\n        Write the package file.\n\n        Parameters\n        ----------\n        check : boolean\n            Check package data for common errors. (default True)\n\n        Returns\n        -------\n        None\n\n        ' #NEWLINE# if check : #NEWLINE# #INDENT# self . check ( f = '{}.chk' . format ( self . name [ 0 ] ) , verbose = f_bas . parent . verbose , level = 1 ) #NEWLINE# #UNINDENT# f_bas = open ( self . fn_path , 'w' ) #NEWLINE# f_bas . write ( '{0:s}\n' . format ( self . heading ) ) #NEWLINE# self . options = '' #NEWLINE# if self . ixsec : #NEWLINE# #INDENT# self . options += 'XSECTION' #NEWLINE# #UNINDENT# if self . ichflg : #NEWLINE# #INDENT# self . options += ' CHTOCH' #NEWLINE# #UNINDENT# if self . ifrefm : #NEWLINE# #INDENT# self . options += ' FREE' #NEWLINE# #UNINDENT# if ( self . stoper is not None ) : #NEWLINE# #INDENT# self . options += ' STOPERROR {0}' . format ( self . stoper ) #NEWLINE# #UNINDENT# f_bas . write ( '{0:s}\n' . format ( self . options ) ) #NEWLINE# f_bas . write ( self . ibound . get_file_entry ( ) ) #NEWLINE# f_bas . write ( '{0:15.6G}\n' . format ( self . hnoflo ) ) #NEWLINE# f_bas . write ( self . strt . get_file_entry ( ) ) #NEWLINE# f_bas . close ( )