#NEWLINE# def __init__( self , model , ihedfm = 0 , iddnfm = 0 , chedfm = None , cddnfm = None , cboufm = None , compact = True , stress_period_data = { #NEWLINE# #INDENT# ( 0 , 0 ) : [ 'save head' ] , #NEWLINE# #UNINDENT# } , extension = [ 'oc' , 'hds' , 'ddn' , 'cbc' ] , unitnumber = [ 14 , 51 , 52 , 53 ] ) : #NEWLINE# #INDENT# '\n        Package constructor.\n\n        ' #NEWLINE# hds_fmt = 'DATA(BINARY)' #NEWLINE# ddn_fmt = 'DATA(BINARY)' #NEWLINE# if ( chedfm is not None ) : #NEWLINE# #INDENT# hds_fmt = 'DATA' #NEWLINE# #UNINDENT# if ( cddnfm is not None ) : #NEWLINE# #INDENT# ddn_fmt = 'DATA' #NEWLINE# #UNINDENT# ibouun = 0 #NEWLINE# ibndsav = False #NEWLINE# for key in list ( stress_period_data . keys ( ) ) : #NEWLINE# #INDENT# t = stress_period_data [ cddnfm ] #NEWLINE# if ( len ( t ) > 0 ) : #NEWLINE# #INDENT# for option in t : #NEWLINE# #INDENT# if ( 'ibound' in option . lower ( ) ) : #NEWLINE# #INDENT# ibndsav = True #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# name = [ 'OC' , hds_fmt , ddn_fmt , 'DATA(BINARY)' ] #NEWLINE# extra = [ '' , 'REPLACE' , 'REPLACE' , 'REPLACE' ] #NEWLINE# if ( ibndsav == True ) : #NEWLINE# #INDENT# if ( cboufm == None ) : #NEWLINE# #INDENT# name . append ( 'DATA(BINARY)' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# name . append ( 'DATA' ) #NEWLINE# #UNINDENT# extension . append ( 'ibo' ) #NEWLINE# unitnumber . append ( 114 ) #NEWLINE# ibouun = unitnumber [ ( - 1 ) ] #NEWLINE# extra . append ( 'REPLACE' ) #NEWLINE# #UNINDENT# Package . __init__ ( self , model , extension = extension , name = name , unit_number = unitnumber , extra = extra ) #NEWLINE# self . heading = ( '# Output control package file' + ' for MODFLOW, generated by Flopy.' ) #NEWLINE# self . url = 'oc.htm' #NEWLINE# self . ihedfm = ihedfm #NEWLINE# self . iddnfm = iddnfm #NEWLINE# self . chedfm = chedfm #NEWLINE# self . cddnfm = cddnfm #NEWLINE# self . ibouun = ibouun #NEWLINE# self . cboufm = cboufm #NEWLINE# self . compact = compact #NEWLINE# self . stress_period_data = stress_period_data #NEWLINE# self . parent . add_package ( self )