#NEWLINE# def __init__( self , model , shape , dtype , value , name , fmtin = None , cnstnt = 1.0 , iprn = ( - 1 ) , locat = None , ext_unit_dict = None ) : #NEWLINE# #INDENT# '\n        3-D wrapper from Util2d - shape must be 3-D\n        ' #NEWLINE# if isinstance ( value , Util3d ) : #NEWLINE# #INDENT# for attr in value . __dict__ . items ( ) : #NEWLINE# #INDENT# setattr ( self , attr [ 0 ] , attr [ 1 ] ) #NEWLINE# #UNINDENT# self . model = self #NEWLINE# for ( i , u2d ) in enumerate ( self . util_2ds ) : #NEWLINE# #INDENT# self . util_2ds [ i ] = Util2d ( model , u2d . shape , u2d . dtype , u2d . _array , name = u2d . name , fmtin = u2d . format . fortran , locat = locat , cnstnt = u2d . cnstnt ) #NEWLINE# #UNINDENT# return #NEWLINE# #UNINDENT# assert ( len ( shape ) == 3 ) , 'Util3d:shape attribute must be length 3' #NEWLINE# self . model = model #NEWLINE# self . shape = shape #NEWLINE# self . dtype = dtype #NEWLINE# self . __value = value #NEWLINE# if isinstance ( name , list ) : #NEWLINE# #INDENT# self . name = name #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# t = [ ] #NEWLINE# for k in range ( shape [ 0 ] ) : #NEWLINE# #INDENT# t . append ( name ) #NEWLINE# #UNINDENT# self . name = t #NEWLINE# #UNINDENT# self . name_base = [ ] #NEWLINE# for k in range ( shape [ 0 ] ) : #NEWLINE# #INDENT# if ( 'Layer' not in self . name [ k ] ) : #NEWLINE# #INDENT# self . name_base . append ( ( self . name [ k ] + ' Layer ' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . name_base . append ( self . name [ k ] ) #NEWLINE# #UNINDENT# #UNINDENT# self . fmtin = fmtin #NEWLINE# self . cnstnt = cnstnt #NEWLINE# self . iprn = iprn #NEWLINE# self . locat = locat #NEWLINE# self . ext_filename_base = [ ] #NEWLINE# if ( model . external_path is not None ) : #NEWLINE# #INDENT# for k in range ( shape [ 0 ] ) : #NEWLINE# #INDENT# self . ext_filename_base . append ( os . path . join ( model . external_path , self . name_base [ k ] . replace ( ' ' , '_' ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# for k in range ( shape [ 0 ] ) : #NEWLINE# #INDENT# self . ext_filename_base . append ( self . name_base [ k ] . replace ( ' ' , '_' ) ) #NEWLINE# #UNINDENT# #UNINDENT# self . util_2ds = self . build_2d_instances ( )