# iMOD User Manual version 5.2 (html)

#### 8.2IDF-FUNCTIONS

##### 8.2.1IDFCALC-Function

The IDFCALC function can be used to carry out simple arithmetical operations on maximal two different IDF-files to create a new IDF-file. See for more information section 6.7.3.

Example 1

FUNCTION=IDFCALC
FUNC= “C=A/B”
NREPEAT=2
ABC1=D:\KD_L1.IDF D:\THICKNESS_L1.IDF D:\K_L1.IDF
ABC2=D:\KD_L4.IDF D:\THICKNESS_L4.IDF D:\K_L4.IDF

The above mentioned example will compute the permeability (k) by dividing the transmissivity (KD) by the thickness (THICKNESS) for modellayer 1 and modellayer 4, subsequently.

Example 2

FUNCTION=IDFCALC
FUNC= C=A-B
USENODATA=1
NODATAVALUE=0.0
IEQUI=1
GENFILE=D:\AREA.GEN
WINDOW=100000.0,350000.0,150000.0,450000.0
SOURCEDIRC=D:\EFFECT\DIFF_*_L1.IDF

The above mentioned example will compute the differences within the polygon(s) described by the AREA.GEN and within the given WINDOW. If any NoDataValues are found in the IDF-files, they will be treated as if they were NODATAVALUE=0.0. Any file that agrees with the filename HEAD_*_L1.IDF in two different folders, D:\MODEL and D:\SCENARIO will be subtracted and the results will be saved, as an equidistant IDF, in the folder D:\EFFECT. Suppose HEAD_20101231_L1.IDF is found in D:\MODEL (SOURCEDIRA), an identical filename is searched for in D:\SCENARIO (SOURCEDIRB). The yielding IDF will be DIFF_20101231_L1.IDF and will be written in D:\EFFECT.

Example 3: batch-array definition

setlocal EnableDelayedExpansion
set n=0
for %%a in (1.30 0.80 0.70 0.75 0.85 1.25 0.75 0.75 0.85 1.10 1.15 ) do (
set RCH_factor[!n!]=%%a
set /A n+=1
)

setlocal EnableDelayedExpansion
set n=0
for %%a in (1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001) do (
set year[!n!]=%%a
set /A n+=1
)

for /L %%i in (0,1,11) do (
echo FUNCTION=IDFCALC >calc_idf.ini
echo !RCH[%%i]!
echo FUNC= ”C=!RCH_factor[%%i]!*A” >>calc_idf.ini
echo SOURCEDIRA=d:\RCH_grids\RCH_averaged_1990-2001.idf >>calc_idf.ini
echo SOURCEDIRC=d:\RCH_grids\RCH_!year[%%i]!.idf >>calc_idf.ini newline This example uses multiple arrays to end up with one recharge grid per year based on a given recharge factor.

##### 8.2.2IDFSCALE-Function

With this function it is possible to (re)scale IDF-files according to different methodologies, see section 6.7.3.

Example 1

FUNCTION=IDFSCALE
SCLTYPE_UP=1
SCALESIZE=250.0
SOURCEIDF=D:\DATA\BOUNDARY_L1.IDF
OUTFILE=D:\DATA\BOUNDARY_L1_250.IDF

This example shows how to upscale an IDF-file with boundary conditions.

Example 2

FUNCTION=IDFSCALE
SCLTYPE_DOWN=1
SCALESIZE=5.0

This example shows how to downscale an IDF-file with computed heads.

Example 3

FUNCTION=IDFSCALE
SCLTYPE_UP=3
SCALESIZE=500.0
WINDOW=100000.0,425000.0,150000.0,500000.0

This example shows how to upscale transmissivity for a specific window.

Example 4

FUNCTION=IDFSCALE
SCLTYPE_UP=14
SCALESIZE=100.0
SOURCEDIR=D:\GEOTOP\SEL*.IDF
OUTFILE=D:\GEOTOP\VERTICAL_C.IDF
BUFFER=5
ANI_X=3.0
DH_Z=1.0
DH_X=0.0
DH_Y=0.0

This examples show an example how to upscale permeability with a 3D Darcian simulation. The result will be vertical resistances.

##### 8.2.3IDFMEAN-Function

The IDFMEAN function can be used to compute a new IDF-file with the mean value (or minimum, maximum value) of different IDF-files. It is not necessary to have exactly similar IDF-files (see section 6.7.3).

Example 1

FUNCTION=IDFMEAN
NDIR=1
SOURCEDIR1=C:\DATA\DEM\VERSION*.IDF

This example shows the minimum configuration of this function. It yields 2 IDF files in the folder C:\DATA\DEM\:

• 1. MEAN_VERSION.IDF, containing the calculated MEAN value in each cell.

• 2. TOTAL_MEAN_VERSION.IDF, containing the number of cells (excluding NODATA cells) on which the MEAN value is calculated.

Example 2

FUNCTION=IDFMEAN
ILAYER=6
SDATE=19980714
EDATE=20110728
NDIR=1
SOURCEDIR1=C:\DATA\BDGFLF*.IDF

This example shows the mimimum configuration of this function and yield the MEAN values (default) for all BDGFLF*.IDF-files in the folder C:\DATA that are assigned to layer 6 (function searches for L6.IDF), and are within the periode 14${}^{th}$ of July 1998 and 28${}^{th}$ of July 2011.

The output file will be:

• 1. D:\DATA\BDGFLF_MEAN_1998-07-14_to_2011-07-28_L6.IDF;

• 2. D:\DATA\BDGFLF_COUNT_1998-07-14_to_2011-07-28_L6.IDF.

The latter shows the number of occurrences for each raster cell.

Example 3

FUNCTION=IDFMEAN
ILAYER=1,3
SDATE=19980101
EDATE=20000101
IYEAR=1999
NPERIOD=1
PERIOD1=1503-3110
ISEL=2
CFUNC=MAX
GENFILE=D:\DATA\AREA.GEN
NDIR=1

This example shows a more extended configuration and will yield maximum values for all IDF-files inside the folder D:\DATA that meet the requirement HEAD*.IDF. Furthermore, they contain the key combination L1.IDF where “1” is defined by ILAY=1. The date expression should be within the time domain of the 1${}^{th}$ of Januari 1998 (SDATE) and 31${}^{th}$ of December 2000 (EDATE), within the year 1999 (IYEAR) and within the period between the 15${}^{th}$ of March and the 31${}^{th}$ of October (PERIOD1). Finally the mean values is computed within the polygon(s) described by the polygon AREA.GEN, solely. The output file will be:

The latter shows the date (yyyymmdd) on which raster cell maximal values appeared.

##### 8.2.4IDFCONSISTENCY-Function

Use this function to make IDF-files consistent, meaning that the first IDF is always higher or equal to the second, which is higher or equal to the top of the IDF underneath, and so on. IDF files can represent anything, however, this tool is especially handy for consistencies applied on top- and bottom elevation of model layers.

Example

FUNCTION= IDFCONSISTENCY
NLAY=2
WINDOW=120000.0,298000.0,240000.0,430000.0
CELLSIZE=100.0
TOP_L1=D:\MODEL\TOP_L1.IDF
TOP_L2=D:\MODEL\TOP_L2.IDF
BOT_L1=D:\MODEL\BOT_L1.IDF
BOT_L2=D:\MODEL\BOT_L2.IDF
OUTPUTFOLDER=D:\OUTPUT

This example corrects the top and bottom IDF-files specified by the TOP_L{i} and BOT_L{i} keywords in a top-bottom consistent manner and scales the IDF-files to the specified WINDOW and CELL_SIZE.

##### 8.2.5IDFSTAT-Function

The IDFSTAT function can be used to perform some elementary statistical analyses on the content of IDF-files. You can use the IDF Info functionality in iMOD, alternatively (see section 6.3).

Example 1

FUNCTION=IDFSTAT
SOURCEDIR=D:\DATA\AHN*.IDF
OUTFILE=D:\DATA\STAT.CSV

This examples illustrated how to get the statistics of all IDF-files inside the folder D:\DATA that agree with the wildcard AHN*.IDF; results will be written in the file D:\DATA\STAT.CSV.

##### 8.2.6IDFMERGE-Function

The MERGE function can be used to merge different IDF-files into a new IDF-file. If these IDF-files might overlap, an interpolation between the overlapping IDF-files will be carried out.

Example 1

FUNCTION=IDFMERGE
NMERGE=2

This example merges two IDF-files, HEAD_L1.IDF and HEAD_L1.IDF from two different folders, into a single one D:\RESULTS\HEAD_L1.IDF.

Example 2

FUNCTION=IDFMERGE
WINDOW=120000.0,425000.0,165000.0,465000.0

This example merges all IDF-files in the folder D:\DATA that agree with the filename HEAD*_L1.IDF, such as HEAD_A1_L1.IDF, HEAD_A2_L1.IDF. The merged results will be “clipped” for the given extent by WINDOW and will be “masked” out by the given NoDataValues in the MASKIDF. Finally the results will be saved in HEAD_MERGED_L1.IDF.

##### 8.2.7IDFTRACE-Function

Use this function to make a spatial IDF file with unique zone numbers of non-connecting areas of a given IDF file.

Example

FUNCTION=IDFTRACE
IDF_IN=D:\DATA\LAKE.IDF
IDF_OUT=D:\DATA\LAKE_ID.IDF
MINT=10

This example creates an IDF file that can be used by the Lake package for the identification of indivual lakes, larger than 10 gridcells from the entered IDF file at IDF_IN.

##### 8.2.8CREATEIDF-Function

The CREATEIDF function can be used to create IDF-files out of ESRI ASC File Formats, see section 9.14. Be aware of the fact that you can open more of these ASC files in the iMOD Manager, alternatively (see section 5.4).
This function includes the option to make IDF files with a VOXEL representation. See section 6.3 for an example. (There is no option yet to transform an existing IDF into a VOXEL IDF. In that case, create an ASC file first)

Example 1

FUNCTION=CREATEIDF
SOURCEDIR=D:\DATA\TOP*.ASC

The above mentioned example transforms all ESRI ASCII gridfiles that agree with the wildcard TOP*.ASC into the IDF format. The yielding files will have identical names with the extension .IDF, and will be placed in the same folder as their ASCII files, so TOP1.ASC becomes TOP1.IDF.
Files will be overwritten without questioning!

Example 2

FUNCTION=CREATEIDF
SOURCEDIR=D:\DATA\SEL*.ASC
TOPWC=SEL_*.ASC
BOTEL=-0.5

The following example translates all ESRI ASCII gridfiles that agree with the wildcard SEL*.ASC. into SEL*.IDF-files. Moreover, a top elevation (TOPWC) will be extracted from the filename at the position of the wildcard, so the function tries to read a real value at the position of the asterix, suppose the filename is SEL_0.25.ASC, the value finally read is 0.25. It will be used to enter the TOP elevation inside the IDF (see section 9.5 for the syntax of IDF-files). The bottom elevation will be equal to the top elevation (0.25 in this example) plus the given value BOTEL, in this case -0.5, thus bottom elevation is 0.25+-0.5=-0.25.

##### 8.2.9CREATEASC-Function

The CREATEASC function can be used to create ESRI ASC files out of IDF File, see section 9.14. This function will always replace ’****" with a NODATA value.

Example 1

FUNCTION=CREATEASC
SOURCEDIR=D:\DATA\TOP*.IDF

The above mentioned example transforms all IDF gridfiles that agree with the wildcard TOP*.IDF into the ESRI ASCII format. The yielding files will have identical names with the extension .ASC, and will be placed in the same folder as their IDF files, so TOP1.IDF becomes TOP1.ASC.

Files will be overwritten without questioning!

##### 8.2.10XYZTOIDF-Function

Use this function to create an IDF from a plain data file(s) or IPF file(s) that contain x,y,z data at least. The column (“z”) can contain any type of (real) data. Also use this function to generate a 3D model of the subsoil via indicator-interpolation of various thressholds (lithology and permeability).

Example 1

FUNCTION=XYZTOIDF
XYZFILE=D:\DATA\28BN.XYZ
IDFFILE=D:\DATA\28BN.IDF
CS=5.0
GRIDFUNC=MEAN

Above an example is given how to rasterize, for a 5x5 resolution (CS=5.0), the content of an XYZ file by means of its mean values (GRIDFUNC=MEAN) inside the individual rastercells. The default NoDataValue of -999.99 will be assigned to those rastercells that doesn’t have any points inside, moreover, data points that have this particular value will be left out.

Example 2

FUNCTION=XYZTOIDF
SOURCEDIR=D:\DATA\*.XYZ
TARGETDIR=D:\DATA\IDF
IDFFILE=D:\DATA\28BN.IDF
CS=25.0
GRIDFUNC=PERC
PERCENTILE=5.0
NODATA=0.0

Example above shows how to rasterize, for a 25x25 resolution (CS=25.0), the content of all *.XYZ files in the folder D:\DATA, by means of its 5.0 percentile values (PERCENTILE=5.0; GRIDFUNC=PERC) inside the individual rastercells. A NoDataValue of 0.0 will be assigned to those rastercells that doesn’t have any points inside, moreover, data points that have this particular value will be left out.

From the above presented variogram, the SILL would be 30 and the corresponding RANGE approximately 1000m, at that distance the SILL value flattens. The NUGGET is zero in this example.