Migration status

Although the new site is live, work is still in progress to improve it.

Known issues:

  1. Forums: The organization of (sub-)categories and threads is disrupted. Please use the search box inside the "Message boards" to navigate.
Back

RE: Transient model simulation

MZ
Maurits Zoutendijk, modified 4 Months ago.

Transient model simulation

Youngling Posts: 4 Join Date: 5/20/16 Recent Posts
Hello,

For my master thesis research I'm currently working on a small scale groundwater model, on the topic of phreatic groundwater in a specific local area. The model is about 600x800 cells with a cell size of 1m. I have managed to create a steady-state model, consisting of 2 layers, which gives decent results.

Now I'd like to do a transient simulation, to simulate a historic event, using time series. I've got time series from preciptation and evaporation and have combined the two to create a list for the RCH package (sometimes a value is negative, but I understood that it would not be a problem). The timeseries feature daily data, from 2009 to somewhere 2016, featurng some 4000 lines of data.
I would like to use this timeseries in my model, in the RCH package, and I would like to have daily groundwater head throughout the series as output.

I don't know how I should put this in my runfile (runfile is below this paragraph). Reading the manual (2017 version) I found out that the 3rd line in the runfile is concerned with timeseries. And in the 2nd line a number of IPF files should be defined. It seems like I have to set up one, or multiple IPF files. The files need to contain data fro mthe sime series as also coordinates. In my case the area of study is small, so recharge is taken as being the same throughout the entire model. How should I define this in the IPF-file? Also, How do I define the use of IPF-files for certain packages under 'modules for each layer' and 'packages for each layer and stress-period'?

At the moment my runfile looks like this:


C:\iMOD\IMOD_USER\MODELS\BASELINE
2,2,1,0,1,0,0,0 ! #lagen, #maxlagen, #time periods, SDATE, NSCL, IFTEST (0), DRN/OLF/RIV off, time series
1,0,0,0,0 ! zie manual, time series
150,20,0.001,10.0,0.98,1.0,5 ! iteraties, nauwkeurigheid
93014.06,440889.16,93659.06,441706.66,0.50,0.00 ! coördinaten, ll, ur, cellgrootte, multiplier
ACTIVE MODULES
1 2,1,2 (BND) ! BOUNDARY
1 2,1,2 (SHD) ! GROUNDWATERHEAD
1 2,1,2 (KDW) ! FLUX FRONT/RIGHT FACE
1 1,1 (VCW) ! FLUX LOWER FACE
1 1,1 (TOP)
1 1,1 (RIV) ! RIVERS
1 1,1 (RCH) ! RECHARGE
C:\iMOD\IMOD_USER\files\IDF\BND_LAYER1.IDF
MODULES FOR EACH LAYER
2,(BND)
0001, 1.000000 , 0.000000 ,C:\iMOD\IMOD_USER\files\IDF\BND_LAYER1.IDF
0002, 1.000000 , 0.000000 ,C:\iMOD\IMOD_USER\files\IDF\BND_LAYER2.IDF
2,(SHD)
0001, 1.000000 , 0.000000 ,C:\iMOD\IMOD_USER\files\IDF\SHD_LAYER1.IDF
0002, 1.000000 , 0.000000 ,C:\iMOD\IMOD_USER\files\IDF\SHD_LAYER2.IDF
2,(KDW)
0001, 1.000000 , 0.000000 ,C:\iMOD\IMOD_USER\files\IDF\KDW_LAYER1.IDF
0002, 1.000000 , 0.000000 ,C:\iMOD\IMOD_USER\files\IDF\KDW_LAYER3.IDF
1,(VCW)
0001, 1.000000 , 0.000000 ,C:\iMOD\IMOD_USER\files\IDF\VCW_HOL_F_V3.IDF
1,(TOP)
0001, 1.000000 , 0.000000 ,C:\iMOD\IMOD_USER\files\IDF\AN_TOP.IDF
PACKAGES FOR EACH LAYER AND STRESS-PERIOD
1, 0,STEADY-STATE,-1
1,(RIV)
0001, 1.000000 , 0.000000 ,C:\iMOD\IMOD_USER\files\IDF\RIV_COND.IDF
0001, 1.000000 , 0.000000 ,C:\iMOD\IMOD_USER\files\IDF\RIV_STAGE.IDF
0001, 1.000000 , 0.000000 ,C:\iMOD\IMOD_USER\files\IDF\RIV_BTM-1.IDF
0001, 1.000000 , 0.000000 ,C:\iMOD\IMOD_USER\files\IDF\RIV_INF.IDF
1,(RCH)
0001, 1.000000 , 0.000000 ,0.69




Thanks in advance!

Maurits
Frans Roelofsen, modified 4 Months ago.

RE: Transient model simulation (Answer)

Padawan Posts: 59 Join Date: 11/11/13 Recent Posts
Hi Maurits,

Of course it is no problem to create a RUN file for the groundwater problem you describe.
Let me give you some suggestions.

First, the timeseries as mentioned in Dataset 3 of the run file are only used to describe locations where iMODFLOW should save the calculated heads as a timeseries.
This is helpful, especially in the case timeseries of observations are available. iMODFLOW will add the calculated values to the observed timeseries.
You can not use it as input for your model variable like Recharge.

For the time dependent import of model data there is the data block below the line "PACKAGES FOR EACH LAYER AND STRESS-PERIOD".
From there iMOD expects a data block of input variables (RIV and RCH) for every timestep (see also Dataset 10, 11 and 12).
An example for your RUN I give below. It shows the first 5 stimesteps of the total of 2921 timesteps your model will consist of.
See Dataset 12 for the export/save options.

********************* RUN FILE **********************
C:\iMOD\IMOD_USER\MODELS\BASELINE
2,2,2921,0,1,0,0,0
....
....
PACKAGES FOR EACH LAYER AND STRESS-PERIOD
1, 1.0000000,20090101,1,1,20090101
1,(RIV)
0001, 1.000000 , 0.000000 ,C:\iMOD\IMOD_USER\files\IDF\RIV_COND.IDF
0001, 1.000000 , 0.000000 ,C:\iMOD\IMOD_USER\files\IDF\RIV_STAGE.IDF
0001, 1.000000 , 0.000000 ,C:\iMOD\IMOD_USER\files\IDF\RIV_BTM-1.IDF
0001, 1.000000 , 0.000000 ,C:\iMOD\IMOD_USER\files\IDF\RIV_INF.IDF
1,(RCH)
0001, 1.000000 , 0.000000 ,0.69
2, 1.0000000,20090102,1,1,20090102
-1,(RIV)
1,(RCH)
0001, 1.000000 , 0.000000 ,0.10
3, 1.0000000,20090103,1,1,20090103
-1,(RIV)
1,(RCH)
0001, 1.000000 , 0.000000 ,-0.05
4, 1.0000000,20090104,1,1,20090104
-1,(RIV)
1,(RCH)
0001, 1.000000 , 0.000000 ,0.5
5, 1.0000000,20090105,1,1,20090105
-1,(RIV)
1,(RCH)
0001, 1.000000 , 0.000000 ,0.15
.....
********************* RUN FILE **********************

There are some options to fill this RUN file to the total of 2921 timesteps with RCH data.
You can use scripting (e.g. Pyton) to add all RCH data to the RUN file
Another suggestion is to prepare an iMOD Project File (*.prj) and use that one to create your RUN file.
The advantage of a Project File is that you can more easily fill the RCH block with 2921 values, e.g. using Excel.
An example of the RCH block in a PRJ file for the first 5 stress periods in your model you find below.

************* PRJ file ********************
........
2009-01-01 00:00:00
001,001
1,1, 001, 1.000000 , 0.000000 ,0.69 ,''
2009-01-02 00:00:00
001,001
1,1, 001, 1.000000 , 0.000000 ,0.10 ,''
2009-01-03 00:00:00
001,001
1,1, 001, 1.000000 , 0.000000 ,-0.05 ,''
2009-01-04 00:00:00
001,001
1,1, 001, 1.000000 , 0.000000 ,0.5 ,''
2009-01-05 00:00:00
001,001
1,1, 001, 1.000000 , 0.000000 ,0.15 ,''
.........
************* PRJ file ********************

Read about the Project Manager in the Manual in chapter 5.5 "iMOD Project Manager".
Like to use/create a PRJ file yourself?
- create your RUN file for 5 timesteps first.
- open your RUN file in the iMOD Project Manager and see all your model data appear
- save the model data to the PRJ format and close the Project Manager
- extend the PRJ file to 31-12-2016 with Excel, Python or your preferential tool.

Last but not least, in case you create an IDF file for your RCH data for every timestep, you can use the subwindow "Define Characteristics for:. " form the Project Manager window.
Than iMOD will automatically search the corresponding IDF file with Recharge for each time step and add it to your Project File.

Good luck.

Frans
MZ
Maurits Zoutendijk, modified 4 Months ago.

RE: Transient model simulation

Youngling Posts: 4 Join Date: 5/20/16 Recent Posts
Hi Frans,

Thank you for the clear reply! I think I can figure out how to define the input timeseries for the RCH.

One more question:
Currently I have the groundwater head in Layer 2 defined as constant. This is defined as a SHD of -4,8m with a BND of -1, thus being constant throughout the simulation. At some point I would like to include seasonal variety. What would be a good way to include a varying groundwater head for this 2nd Layer? Do I have to use the GHB package in that case and add timeseries comparable to the one you described for RCH?
Frans Roelofsen, modified 4 Months ago.

RE: Transient model simulation (Answer)

Padawan Posts: 59 Join Date: 11/11/13 Recent Posts
... in order to add a variable head on your 2nd layer, I suggest you use the constant-head package (CHD).

Chapter 12.25 of the manual gives you the following description:
The constant head package defines the elevation (L) of groundwater heads at cells where the BND value < 0 by one IDF (or a constant value).
The CHD package is comparable to the definition of the CHD in the BAS package of MODFLOW.
MZ
Maurits Zoutendijk, modified 3 Months ago.

RE: Transient model simulation

Youngling Posts: 4 Join Date: 5/20/16 Recent Posts
1 more question. I would like to generate timeseries for several locations in my model and to compare them afterwards with measured timeseries (which I have in Excel). Reading the mnaual I found that it is possible to make iMOD write time series, I then have to use data set 3 in the runfile. I've set up IPF files for the transient simulation and also for a steady-state simulation (I read that for the steady-state situation it is possible to do some statistics). However I currently keep getting errors whenever I load the runfile in the 'Start model simulation'-screen, which look like this:

Non-existing files:

Line File
3 [value which is at last in the 3rd line]

I've attached the ipf files and the runfiles I use for both the transient simulation as the steady-state simulation.
Below also the top few data sets from the funfiles.

STEADY-STATE

[indent]C:\iMOD\IMOD_USER\MODELS\BASELINE
2,2,1,0,1,0,0,0
C:\iMOD\IMOD_USER\RESULTS\statrun\OBSWELLoh.ipf, 1, 1, 2, 3, 4, 5
1,0,0,0,0
150,20,0.001,10.0,0.98,1.0,5
93014.06,440889.16,93659.06,441706.66,0.50,0.00 [/indent]

TRANSIENT

[indent]C:\iMOD\IMOD_USER\MODELS\BASELINE
2,2,4352,0,1,0,0,-1
C:\iMOD\IMOD_USER\RESULTS\nonstatrun\OBSWELLoh_transient.ipf, 2, 1, 2, 3, 0,-0.15
1,0,0,0,0
150,20,0.001,10.0,0.98,1.0,5
93014.06,440889.16,93659.06,441706.66,0.50,0.00[/indent]

Thanks in advance!
Frans Roelofsen, modified 1 Month ago.

RE: Transient model simulation

Padawan Posts: 59 Join Date: 11/11/13 Recent Posts

Hi Maurits,

When you load a RUN file into the Start Model Simulation window the green check mark indicates weather all files exist. In your case it gives an error for the line with the IPF timeseries file. This is a small bug in the window that is fixed in de latest version. A 'small' bug because your can just start running iMODFLOW with this runfile without an error (the RUN file is OK). 

Better is to download and install iMOD 4.2.1 to profit of all new features and bugfixes.

Kind regards,

Frans