imod.flow - Create iMODFLOW model¶
Create iMODFLOW model.
With this module full iMODFLOW models can be written to disk. In
this is done with classes that understand more about the model and can therefore
offer more help. Here a more rudimentary approach is used where you can pass a
dictionary with all data. This works, but you need to be extra careful about
writing a full and correct model definition, since no extra checks are done by
write(path, model, name=None, runfile_parameters=None, output_packages=['shd'])¶
Writes an iMODFLOW model, including runfile, as specified by
pathis created if it does not already exist.
runfile_parametersis specified, its values are used to fill in the runfile instead of those generated automatically from the data in
model. This is necessary when the default runfile parameters do not suffice, but you do not want to change the runfile after it is written.
modelmust have layer coordinates specified; use
path (str) – The directory to write the model to.
model (collections.OrderedDict) – Dictionary containing the package data as
name (str) – Name given to the runfile. Defaults to “runfile”.
runfile_parameters (dict) – Dictionary containing the runfile parameters. Defaults to None, in which case runfile_parameters is generated from data in
output_packages (list) – List of package names for which to write output, following the iMODFLOW conventions. For example, providing output_packages=[“shd”, “bnd”] writes heads, bdgfff, bdgflf, and bdgfrf.
- Return type
Write the model data in dictionary
aas iMODFLOW model files, to directory “example_dir”:
>>> imod.flow.write(path="example_dir", model=a)
Generate runfile parameters for data in dictionary
imod.run.get_runfile(), change the value for
hclose, and write:
>>> runfile_parameters = imod.run.get_runfile(model=a) >>> runfile_parameters["hclose"] = 0.00001 >>> imod.flow.write(path="example_dir", model=a, runfile_parameters=runfile_parameters)