#NEWLINE# def write_file( self ) : #NEWLINE# #INDENT# '\n        Write the package file.\n\n        Returns\n        -------\n        None\n\n        ' #NEWLINE# ( nrow , ncol , nlay , nper ) = self . parent . nrow_ncol_nlay_nper #NEWLINE# f = open ( self . fn_path , 'w' ) #NEWLINE# f . write ( '{}\n' . format ( self . heading ) ) #NEWLINE# f . write ( '{} {} {} {} {} {} {}\n' . format ( self . ipakcb , self . iswtoc , self . nsystm , self . ithk , self . ivoid , self . istpcs , self . icrcc ) ) #NEWLINE# t = self . lnwt . array #NEWLINE# for tt in t : #NEWLINE# #INDENT# f . write ( '{} ' . format ( ( tt + 1 ) ) ) #NEWLINE# #UNINDENT# f . write ( '\n' ) #NEWLINE# f . write ( '{} {} {} {} {} {} {} {} {} {}\n' . format ( self . izcfl , self . izcfm , self . iglfl , self . iglfm , self . iestfl , self . iestfm , self . ipcsfl , self . ipcsfm , self . istfl , self . istfm ) ) #NEWLINE# f . write ( self . gl0 . get_file_entry ( ) ) #NEWLINE# f . write ( self . sgm . get_file_entry ( ) ) #NEWLINE# f . write ( self . sgs . get_file_entry ( ) ) #NEWLINE# for k in range ( self . nsystm ) : #NEWLINE# #INDENT# f . write ( self . thick [ k ] . get_file_entry ( ) ) #NEWLINE# if ( self . icrcc != 0 ) : #NEWLINE# #INDENT# f . write ( self . sse [ k ] . get_file_entry ( ) ) #NEWLINE# f . write ( self . ssv [ k ] . get_file_entry ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# f . write ( self . cr [ k ] . get_file_entry ( ) ) #NEWLINE# f . write ( self . cc [ k ] . get_file_entry ( ) ) #NEWLINE# #UNINDENT# f . write ( self . void [ k ] . get_file_entry ( ) ) #NEWLINE# f . write ( self . sub [ k ] . get_file_entry ( ) ) #NEWLINE# #UNINDENT# for k in range ( nlay ) : #NEWLINE# #INDENT# if ( self . istpcs != 0 ) : #NEWLINE# #INDENT# f . write ( self . pcsoff [ k ] . get_file_entry ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# f . write ( self . pcs [ k ] . get_file_entry ( ) ) #NEWLINE# #UNINDENT# #UNINDENT# if ( self . iswtoc > 0 ) : #NEWLINE# #INDENT# for i in self . ids16 : #NEWLINE# #INDENT# f . write ( '{} ' . format ( i ) ) #NEWLINE# #UNINDENT# f . write ( '  #dataset 16\n' ) #NEWLINE# for k in range ( self . iswtoc ) : #NEWLINE# #INDENT# t = self . ids17 [ k , : ] #NEWLINE# t [ 0 : 4 ] += 1 #NEWLINE# for i in t : #NEWLINE# #INDENT# f . write ( '{} ' . format ( i ) ) #NEWLINE# #UNINDENT# f . write ( '  #dataset 17 iswtoc {}\n' . format ( ( k + 1 ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# f . close ( )