# iMOD User Manual version 4.4 (html)

#### 8.6MODEL-FUNCTIONS

##### 8.6.1IMPORTMODFLOW-Function

Use this function to import an existing MODFLOW configuration into iMOD files (e.g. IDFs, IPFs and GENs), see for more information Section 9.7.

Example 1

FUNCTION=IMPORTMODFLOW
MVERSION=1988
BASFILE=D:\IMOD-MODEL\VELUWE\MS1L5.BAS

This is the shortest version to import the MODFLOW model MS1L5.

Example 2

FUNCTION=IMPORTMODFLOW
MVERSION=2005
NAMFILE=D:\MODEL\GWR54\MODFLOW.NAM
LLCORNER=125000.0,432000.0
SDATE=20050101
PACKAGESUM=0
RIV5TH=1

This example shows how to import a (transient) MODFLOW2005 configuration.

##### 8.6.2IMPORTSOBEK-Function

Use this function to import a SOBEK configuration into ISG-files for iMOD, see for more information section Section 9.9.

Note: This function is only available in the X64-bits version of iMOD. The resulting ISG will be written in a double-precision format by default.

Example 1

FUNCTION=IMPORTSOBEK
ISGNAME=D:\IMPORT\HCMC0611.ISG
SOBEKDIR=D:\SOBEK\HCMC0611
CALCHIS=D:\SOBEK\HCMC0611\CALCPNT.HIS
STRUCHIS=D:\SOBEK\HCMC0611\STRUC.HIS

The above mentioned examples imports the SOBEK model (files) in the folder D:\SOBEK\HCM0611\* and combines this with the computed results from the two entered HIS files (CALCPNT.HIS and STRUC.HIS) and saves it in HCMC0611.ISG.

##### 8.6.3MODELCOPY-Function

The function MODELCOPY can be used to extract a separate data set for a sub model from a large model. It can also be applied to copy the entire dataset as specified by the entered RUNFILE or PRJFILE into a separate folder. In this process, all IDF and IPF files that can be identified in a given RUNFILE or PRJFILE, will be clipped to the given window. Other files that are mentioned in the RUNFILE or PRJFILE will be copied. As a result a complete copy of a part of the original model will be saved and can be simulated separately.

Note: Other files that might be referred to from files other than the specified runfile, will not be copied.

Example 1

FUNCTION=MODELCOPY
RUNFILE=D:\RUNFILES\MODEL.RUN
TARGETDIR=D:\MODEL\SUBMODEL

The above mentioned example copies all IDF and IPF files from the runfile D:\RUNFILES\MODEL.RUN and the result is saved in D:\MODEL\SUBMODEL. A new runfile is created that will be saved in D:\MODEL\SUBMODEL\MODEL.RUN. Use this configuration to create a cleaned up folder structure of the model.

Example 2

FUNCTION=MODELCOPY
RUNFILE=D:\PRJFILES\MODEL.PRJ
TARGETDIR=D:\MODEL\SUBMODEL
WINDOW=147000.0 448000.0 155000.0 452000.0
CLIPDIR=D:\MODEL

The above mentioned example is equal to example 1 except that it clips all IDF and IPF files from the PRJFILE D:\PRJFILES\MODEL.PRJ to the window 147000.0 448000.0 155000.0 452000.0 and the files remain their original file name under D:\MODEL. In this way complex structured in file name will be preserved.

##### 8.6.4CREATESUBMODEL-Function

Use this function to create submodels for iMODFLOW based on a pointer IDF that determines the active area to be simulated.

Example 1

FUNCTION=CREATESUBMODEL
DSIZE=10000.0
CSIZE=25.0
IBOUND=D:\DBASE\IBOUND_L1.IDF
SUBMODELFILE=D:\RUNFILE\SUBMODEL

The example above will create submodels with a maximum extent of 10000m (10km) and will write a runfile header with cellsizes of 25m. The IDF-file IBOUND.IDF will be used to determine the active areas of the model. iMOD creates boxes with 10x10km first and then decreases submodels whenever this is possible, moreover, whenever submodels become too small (25% of 10km), they will be joined together.

##### 8.6.5RUNFILE-Function

The function RUNFILE can be used to create a runfile (*.RUN) from a projectfile (*.PRJ), or create a projectfile from a runfile.

Example 1

FUNCTION=RUNFILE
RUNFILE_IN=D:\RUNFILES\MODEL.RUN
PRJFILE_OUT=D:\PRJFILES\MODEL.PRJ

The above mentioned example creates a projectfile D:\PRJFILES\MODEL.PRJ file out of the runfile D:\RUNFILES\MODEL.RUN.

Example 2

FUNCTION=RUNFILE
PRJFILE_IN=D:\PRJFILES\MODEL.PRJ
RUNFILE_OUT=D:\RUNFILES\MODEL.RUN
WINDOW=147000.0 448000.0 155000.0 452000.0
CELLSIZE=25.0
BUFFER=1500.0
SDATE=19940101120000
EDATE=20121231235959
ITT=3
IDT=2

The above mentioned example creates runfile D:\RUNFILES\MODEL.RUN, based on the content of the projectfile D:\PRJFILES\MODEL.PRJ for a specified window. The model starts at the $1^{\rm st}$ of January 1994 at 12:00:00 am and ends at the $31^{\rm st}$ of December 2012 at 23:59:59 am at uses two-weekly time steps.

Example 3

FUNCTION=RUNFILE
PRJFILE_IN=D:\PRJFILES\MODEL.PRJ
NAMFILE_OUT=D:\NAMFILES\MODEL.NAM
TIMFILE_OUT=D:\TIMFILES\MODEL.TIM
ISOLVE=1
MODFLOW=D:\PROGRAM\IMODFLOW.EXE

The above mentioned example creates a Modflow2005 configuration NAMFILE D:\NAMFILES\MODEL.NAM, based on the content of the projectfile D:\PRJFILES\MODEL.PRJ for a times discretisation specified in the *.TIM file D:\TIMFILES\MODEL.TIM. After that, it starts the simulation using the simulator D:\PROGRAM\IMODFLOW.EXE.

##### 8.6.6IMODPATH-Function

The function IMODPATH computes flowlines based on the budget terms that result from the iMODFLOW computation. The IMODPATH function uses a very simple runfile. For more information see Section 7.14.

Example 1

FUNCTION=IMODPATH
RUNFILE=D:\IMOD\IMODPATH.RUN

and the content of the IMODPATH.RUN file:

The above mentioned example will do a particle simulation.

Example 2

FUNCTION=IMODPATH
IRUN=0
IPOSTP=1
IFFFLOW=D:\RESULT\PATHLINES.IFF
IPFFLOW=D:\RESULT\PATHLINES.IPF