DOI-USGS / modflow-setup

Python package for automating the setup of MODFLOW groundwater flow models
Other
48 stars 17 forks source link

difficulty building example model from scratch #31

Open wkitlasten opened 3 years ago

wkitlasten commented 3 years ago

Shouldn't it be possible to build the example "pleasant" model with no pre-existing model files in examples/data/pleasant? From the docs, I thought modflow-setup would build the entire model from the yml and supporting "source data", but I'm failing. Is there a list of required model files that need to be in examples/data/pleasant before modflow-setup will work?

For example, if I remove examples/data/pleasant/pleasant.sfr the build fails with the following, despite having an sfr block in the yml. I get a similar failure if I remove .rch, .chd, .nam, etc. So perhaps I am failing to understand something fundamental about the process?

mf6model.py in __init__(self, simulation, parent, cfg, modelname, exe_name, version, lgr, **kwargs)
     87         self.model_ws = self._get_model_ws(cfg=cfg)
     88         # update defaults with user-specified config. (loaded above)
---> 89         self._set_cfg(cfg)   # set up the model configuration dictionary

Edit: I now see the dependency on the regional model in the "parent" block (of pleasent_lgr_parent.yml... so parent of the parent?). So, now I am trying to build the original "parent" model with no dependency on any existing model files. If an example using modflow-setup already exists that would be helpful.

aleaf commented 3 years ago

Hi @wkitlasten, you need everything in examples/data/. When you run the Pleasant_lake_lgr_example.ipynb notebook, it creates the pleasant_lgr folder, which is simulation workspace for the MODFLOW-6 model that is produced. As you note, the pleasant_lgr model is inset with a parent model contained in `examples/data/pleasant``. The purpose of this is to show how an inset model can be created from another model (including parameter fields as well in addition to perimeter boundaries). I don't have a self-contained example for building the parent model.