def __init__(self, simulation, parent=None, cfg=None, modelname='model', exe_name='mf6', version='mf6', lgr=False, **kwargs): mf6.ModflowGwf.__init__(self, simulation, modelname, exe_name=exe_name, version=version, **kwargs) MFsetupMixin.__init__(self, parent=parent) # default configuration self._is_lgr = lgr self._package_setup_order = ['tdis', 'dis', 'ic', 'npf', 'sto', 'rch', 'oc', 'ghb', 'sfr', 'lak', 'riv', 'wel', 'maw', 'obs'] self.cfg = load(self.source_path + self.default_file) #'/mf6_defaults.yml') self.cfg['filename'] = self.source_path + self.default_file #'/mf6_defaults.yml' self._set_cfg(cfg) # set up the model configuration dictionary self.relative_external_paths = self.cfg.get('model', {}).get('relative_external_paths', True) self.model_ws = self._get_model_ws() # property attributes self._idomain = None # other attributes self._features = {} # dictionary for caching shapefile datasets in memory self._drop_thin_cells = self.cfg.get('dis', {}).get('drop_thin_cells', True) # arrays remade during this session self.updated_arrays = set()
def __init__(self, parent=None, cfg=None, modelname='model', exe_name='mfnwt', version='mfnwt', model_ws='.', external_path='external/', **kwargs): Modflow.__init__(self, modelname, exe_name=exe_name, version=version, model_ws=model_ws, external_path=external_path, **kwargs) MFsetupMixin.__init__(self, parent=parent) # default configuration self._package_setup_order = [ 'dis', 'bas6', 'upw', 'rch', 'oc', 'ghb', 'lak', 'sfr', 'riv', 'wel', 'mnw2', 'gag', 'hyd' ] # default configuration (different for nwt vs mf6) self.cfg = load(self.source_path + self.default_file) # '/mfnwt_defaults.yml') self.cfg[ 'filename'] = self.source_path + self.default_file #'/mfnwt_defaults.yml' self._set_cfg(cfg) # set up the model configuration dictionary self.relative_external_paths = self.cfg.get('model', {}).get( 'relative_external_paths', True) self.model_ws = self._get_model_ws() # set the list file path self.lst.file_name = [ self.cfg['model']['list_filename_fmt'].format(self.name) ] # property arrays self._ibound = None
def __repr__(self): return MFsetupMixin.__repr__(self)