<s> from . . mbase import BaseModel <EOL> from . . pakbase import Package <EOL> from . swtvdf import SeawatVdf <EOL> import os <EOL> class SeawatList ( Package ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , model , extension = '<STR_LIT:list>' ) : <EOL> Package . __init__ ( self , model , extension , '<STR_LIT>' , <NUM_LIT:7> ) <EOL> return <EOL> def __repr__ ( self ) : <EOL> return '<STR_LIT>' <EOL> def write_file ( self ) : <EOL> return <EOL> class Seawat ( BaseModel ) : <EOL> '''<STR_LIT>''' <EOL> def __init__ ( self , modelname = '<STR_LIT>' , namefile_ext = '<STR_LIT>' , <EOL> modflowmodel = None , mt3dmsmodel = None , <EOL> version = '<STR_LIT>' , exe_name = '<STR_LIT>' , model_ws = None , <EOL> verbose = False , external_path = None ) : <EOL> BaseModel . __init__ ( self , modelname , namefile_ext , exe_name = exe_name , <EOL> model_ws = model_ws ) <EOL> self . version_types = { '<STR_LIT>' : '<STR_LIT>' } <EOL> self . set_version ( version ) <EOL> self . __mf = modflowmodel <EOL> self . __mt = mt3dmsmodel <EOL> self . lst = SeawatList ( self ) <EOL> self . __vdf = None <EOL> self . verbose = verbose <EOL> self . external_path = external_path <EOL> return <EOL> def __repr__ ( self ) : <EOL> return '<STR_LIT>' <EOL> def getvdf ( self ) : <EOL> if ( self . __vdf == None ) : <EOL> for p in ( self . packagelist ) : <EOL> if isinstance ( p , SeawatVdf ) : <EOL> self . __vdf = p <EOL> return self . __vdf <EOL> def getmf ( self ) : <EOL> return self . __mf <EOL> def getmt ( self ) : <EOL> return self . __mt <EOL> mf = property ( getmf ) <EOL> mt = property ( getmt ) <EOL> vdf = property ( getvdf ) <EOL> def write_name_file ( self ) : <EOL> """<STR_LIT>""" <EOL> fn_path = os . path . join ( self . model_ws , self . namefile ) <EOL> f_nam = open ( fn_path , '<STR_LIT:w>' ) <EOL> f_nam . write ( '<STR_LIT>' % ( self . heading ) ) <EOL> f_nam . write ( '<STR_LIT>' % ( self . lst . name [ <NUM_LIT:0> ] , <EOL> self . lst . unit_number [ <NUM_LIT:0> ] , <EOL> self . lst . file_name [ <NUM_LIT:0> ] ) ) <EOL> f_nam . write ( '<STR_LIT>' % ( '<STR_LIT>' ) ) <EOL> f_nam . write ( '<STR_LIT:%s>' % self . __mf . get_name_file_entries ( ) ) <EOL> for u , f in zip ( self . mf . external_units , self . mf . external_fnames ) : <EOL> f_nam . write ( '<STR_LIT>' . format ( u ) + f + '<STR_LIT:\n>' ) <EOL> f_nam . write ( '<STR_LIT>' % ( '<STR_LIT>' ) ) <EOL> f_nam . write ( '<STR_LIT:%s>' % self . __mt . get_name_file_entries ( ) ) <EOL> for u , f in zip ( self . mt . external_units , self . mt . external_fnames ) : <EOL> f_nam . write ( '<STR_LIT>' . format ( u ) + f + '<STR_LIT:\n>' ) <EOL> f_nam . write ( '<STR_LIT>' % ( '<STR_LIT>' ) ) <EOL> f_nam . write ( '<STR_LIT:%s>' % self . get_name_file_entries ( ) ) <EOL> f_nam . close ( ) <EOL> return </s>
