You are on page 1of 67

Modeling Groundwater Flow using PMWIN and ArcGIS

Jay Thomas Aber Dr. Xiaoying Yang Dr. David R. Steward Water Resources Research Lab Kansas State University 2007

Table of Contents
Introduction ................................................................................................................... 3 Chapter 1. Data Preparation using Arc AEM Groundwater Geodatabase ................ 4
1.1 Creating an Empty AEM Geodatabase...............................................................................4 1.2 Adding Aquifer Record........................................................................................................7 1.3 Populating the WaterBoundaryArea Feature Class ............................................................9
1.3.1 Creating ModelBoundary Shapefile............................................................................................. 9 1.3.2 Creating TuttleCreek Shapefile ................................................................................................. 12 1.3.3 Loading ModelBoundary and WaterBodies Shapefiles into the WaterBoundaryArea Feature Class................................................................................................................................................... 16

1.4 Populating the WaterBoundaryLine Feature Class...........................................................19


1.4.1 Creating RiverSegments Shapefile ........................................................................................... 19 1.4.2 Loading RiverSegments Shapefile into the WaterBoundaryLine Feature Class ...................... 21 1.4.3 Specifying Large and Small River Segments............................................................................ 22

1.5 Populating the AquiferArea Feature Class........................................................................27


1.5.1 Creating KSRiverBed Shapefile ................................................................................................ 27 1.5.2 Loading KSRiverBed Shapefile into the AquiferArea Feature Class ........................................ 31

1.6 Editing AquiferProperty Table ...........................................................................................31

Chapter 2. Creating Input Files for PMWIN ............................................................... 33 Chapter 3. Creating the Model in PMWIN .................................................................. 38
3.1 Defining Mesh Size ...........................................................................................................38 3.2 Defining Layer Type..........................................................................................................41 3.3 Defining Homogeneous Parameters.................................................................................42
3.3.1 Define Top of Layers Elevation ................................................................................................. 42 3.3.2 Define Bottom of Layers Elevation ............................................................................................ 43 3.3.3 Define Recharge........................................................................................................................ 43

3.4 Defining Heterogeneous Parameters................................................................................44


3.4.1 Define Horizontal Hydraulic Conductivity .................................................................................. 45 3.4.2 Define Head and Conductance ................................................................................................. 46 3.4.3 Define Cell Types ...................................................................................................................... 48 3.4.4 Define Initial Hydraulic Heads ................................................................................................... 49

Chapter 4. Running the Model in PMWIN and Viewing the Results ........................ 51
4.1 Running the Model............................................................................................................51 4.2 Reading and Saving Results.............................................................................................52 4.3 Presentation Tools ............................................................................................................54 4.4 Converting ASCII File for display in ArcMap .....................................................................56 4.5 Viewing Results in ArcMap ...............................................................................................58

Aber, Yang, Steward, 2007

Conclusion................................................................................................................... 60 Appendix A: Explanation of the Model Builder Model ............................................. 61

Aber, Yang, Steward, 2007

Introduction
This document is designed to teach the basics of using the Arc AEM Geodatabase in ArcMap and ArcCatalog and Processing Modflow for Windows (PMWIN). Through the course of the document you will be working with ArcMap, ArcToolbox, and PMWIN as you read along. By working along with the tutorial it will be easier to visualize what you are working with. This document is designed to teach the most important tools used in preparing data and running models with PMWIN in a step-by-step manner.

Aber, Yang, Steward, 2007

Chapter 1. Data Preparation using Arc AEM Groundwater Geodatabase


In this tutorial, you will be using ArcGIS and PMWIN to model groundwater flow. PMWIN is a finite difference model that accounts for many groundwater flow parameters. However, it is not integrated with ArcGIS, with which you can easily map and analyze groundwater properties. In order to use spatial data with PMWIN and to map the properties of the aquifer, the data has to be specially prepared. For this we will use the ArcAEM Groundwater Geodatabase with ArcMap and ArcCatalog.

1.1 Creating an Empty AEM Geodatabase


First we will create a new empty geodatabase. Open up ArcCatalog, choose where you want to make the geodatabase, and right click on the folder. Make a new Personal Geodatabase and name it RileyGroundwaterPMWIN.

Now create a new feature dataset in RileyGroundwaterPMWIN.

Name this new feature dataset GroundwaterConcept, and then click on the Edit button to set the projection and extents.

Aber, Yang, Steward, 2007

Click the select button now to set the coordinate system. We will use the projected coordinate system: NAD 1983 UTM Zone 14N. You can find that under Projected Coordinate Systems>Utm>Nad 1983>NAD 1983 UTM Zone 14N.prj. You will see the details of the projection after you have selected it.

Now we need to set the spatial extents. Click on the X/Y Domain tab to set the X and Y extents, and the Z Domain tab to set the Z extent. See the figures for the values.

Aber, Yang, Steward, 2007

Click OK and OK again. Note: these values represent an extent that is much larger than our study area. The minimum X represents 100,000 meters to the east of the false easting (with a value of 500,000 m) centered on the meridian of 99 W. The maximum X represents 287,000 m east of the false easting. The min and max Y values represent 4,270,000 m and 4,457,000 m north of the Equator, which has a false northing value of 0 m. Now we will apply the XML Schema from the AEM Groundwater Geodatabase to our newly created geodatabase. In ArcCatalog, click the Output Window button on the Geodatabase Designer 2 toolbar. If you do not have the Geodatabase Designer 2 toolbar installed, you can download it and install it for free from http://arcscripts.esri.com/details.asp?dbid=13484.

This will open up a window at the bottom of ArcCatalog. I have attached an XML file of the Arc AEM groundwater geodatabase to this PDF. Click on the Attachments tab in the lower left of Acrobat and save this file. Once you have saved the XML file that was attached to this PDF, click on the XML tab in the Output Window in ArcCatalog and click the Open button. Browse to the XML file and and click open.

Aber, Yang, Steward, 2007

Once the XML is open, highlight the geodatabase in the catalog, and on the Geodatabase Designer 2 toolbar, click on Import Schema, then Import from XML.

Sometimes this can take quite a while depending on the computer you are using. After doing this, the geodatabase is ready to have data added to it.

1.2 Adding Aquifer Record


Now that we have our empty geodatabase, we can use it to store all of the data we need in the Processing Modflow software. The first step in making the geodatabase is to add an aquifer record so that we can relate all of our river features to this aquifer. For our puposes in Riley County, we will have only one aquifer layer because we are creating a single layer model. Open ArcMap, and load the AquiferLayer table from the RileyGroundwaterPMWIN geodatabase.

Aber, Yang, Steward, 2007

Start another edit session by selecting Start Editing on the Editor Toolbar. Then open the table by right clicking and selecting Open.

Now add the record Aquifer and assign it a HydroID of 1.

Now save your edits, stop editing, and exit the table. At the same time we will edit the object class HYDROIDTABLE. We need to add a HydroID to the default object so that the rest of the HydroIDs will be properly assigned. Add HYDROIDTABLE to the map. Start an edit session and open the attribute table of HYDROIDTABLE, and edit its values as shown in the following figure:

Save the edits, and stop editing.

Aber, Yang, Steward, 2007

1.3 Populating the WaterBoundaryArea Feature Class


The WaterBoundaryArea feature class will contain areas which require different hydraulic parameters. For example, in our model, there are two reservoirs within the model boundary. Both of these reservoirs will need to be accounted for with their hydraulic head values. We will also use the WaterBoundaryArea to store our model boundary information.

1.3.1 Creating ModelBoundary Shapefile


Next, we will create the model boundary, which will be stored in the WaterBoundaryArea feature class. To do this we will first create a new shapefile. In ArcCatalog right click on the file tree where you want to create it and choose New > Shapefile.

In the next box, name the shapefile ModelBoundary, select the Feature Type to be Polygon, and then click on the Edit button to edit the coordinate system.

Aber, Yang, Steward, 2007

Select the same coordinate system as the geodatabase: NAD 1983 UTM Zone 14. Then click OK to create the shapefile. Once the shapefile is created, open it in ArcMap. Along with this shapefile, load a shapefile with county boarders in Kansas. You can find this in the census TIGER/Line off of Geography Networks ArcIMS server or DASCs server at maps.kansasgis.org. In addition to the ArcIMS server, you can download this information from DASCs webpage. DASC has their geodatabase catalog at http://www.kansasgis.org/catalog/catalog.cfm or you can download the information from the Unix server at http://clone.kgs.ku.edu/, if you know what you are looking for.

Once you have these two shapefiles loaded, we are ready to edit the ModelBoundary shapefile. We want to draw a box around Riley County. Start an edit session with the ModelBoundary shapefile. Select Create New Feature as the Task and ModelBoundary as the Target. Then select the Sketch Tool.

Now sketch a rough box around Riley County. Once you have clicked the four corners, but not yet finished the sketch, click the Sketch Properties tool. With this you can specify the coordinates of the points.

Aber, Yang, Steward, 2007

10

Specify the coordinates so that an exact box is created. Because of the way PMWIN is designed, you must also make sure that the length and width of the polygon are divisible evenly by 200. This is because our model will have a raster grid cell size of 200 meters, and if the sides are not divisible by 200, you may inadvertently cut off some of the data on the edges, and obtain inaccurate results from PMWIN. Note: PMWIN can only model 250,000 cells at one time, and because of the size of our model, 200 meter cells will lead to approximately 90,000 cells (300 x 300). The cells can be made any size as long as the cell size does not result in too many cells overall. However, no matter the size of the model boundaries, they must be divisible by the cell size. Otherwise, the model will truncate results at the edge of the model boundary. The Edit Sketch Properties dialog box will look something like this before you have corrected the lengths.

Fix the lengths according to your modeling domain for PMWIN. Once you have fixed these lengths, you can click Finish Sketch.

Aber, Yang, Steward, 2007

11

Now you can save your edits and stop editing.

1.3.2 Creating TuttleCreek Shapefile


To create an accurate groundwater model, we will need to include Tuttle Creek Lake and Milford Lake in our calculations. We will incorporate the reservoirs in our geodatabase as part of the WaterBoundaryArea feature class, along with the ModelBoundary. We will first need the data for Tuttle Creek. You can get this from the National Hydrography Dataset (NHD). Once again, you can get this from either Geography Network or DASC.

In the NHD Water Bodies layer, select Tuttle Creek Lake and Milford Lake with the selection tool. You can select multiple items by holding the Shift key while selecting. Note: When selecting multiple features on the map, you have to hold down the Shift key, but if you are selecting multiple features in the Attribute table, you have to hold down the Control key.

Aber, Yang, Steward, 2007

12

Now right click on the NHD Water Bodies layer and go to Selection > Create Layer from Selected Features.

Once this layer is created, right click it and select Data > Export Data.

Aber, Yang, Steward, 2007

13

Export the data as a shapefile named WaterBodies. And add this shapefile to the map. Because the outlines of the lakes are far to complex for the model we are using, we need to simplify them. Start an edit session for the WaterBodies shapefile. In the Editor menu, select More Editing Tools > Advanced Editing to bring up the Advanced Editing Tools Toolbar.

Now select the two water bodies and click the Generalize tool with a 500 meter offset.

Aber, Yang, Steward, 2007

14

Because of other restraints of the model, all of the very sharp points should be deleted. In the edit session, select Modify Feature as the Task and WaterBodies as the Target. Then select the water body, right click on a vertex and delete it, or left click the vertex and reposition it.

Once the water bodies are simplified, they need to be clipped to the ModelBoundary. Save edits and exit the edit session. In the ArcToolbox, select the Clip tool, under Analysis Tools > Extract. Select the WaterBodies shapefile as the input feature, and the ModelBoundary as the clip feature. Click OK.

Aber, Yang, Steward, 2007

15

The clip tool will output a shapefile named the same as the input with _Clip on the end of it. You can change this of course, but we will not for this tutorial. The ModelBoundary_Clip shapefile is now ready to be added to the geodatabase.

1.3.3 Loading ModelBoundary and WaterBodies Shapefiles into the WaterBoundaryArea Feature Class
Now that both of the layers have been prepared, we can add them to the geodatabase. In ArcMap, add the ModelBoundary and WaterBodies_Clip shapefiles to the map. Then add the WaterBoundaryArea feature class under the GroundwaterConcept feature dataset in the geodatabase to the map. Start an edit session and click on the Object Loader tool. If you do not see the Load Objects button on your toolbar, right click on any toolbar and select Customize, or double click on any part of the toolbar area without any tools on it. Now click on the Commands tab and browse down to Data Converters. You can then simply drag the Load Objects command to any of the toolbars in ArcMap.

Aber, Yang, Steward, 2007

16

Now, select the Load Objects tool and in the Object Loader dialog box, select one shapefile and then the other and load them into WaterBoundaryArea.

Once the two shapefiles are loaded, you need to assign them HydroIDs and an AquiferLayerID. Calculate the values in the AquiferLayerID field to be equal to 1 for all of the records. This AquiferLayerID should be equal to the HydroID of the record we created in the AquiferLayer table.

If the Arc Hydro Toolbar did not automatically assign HydroIDs to the records, then use it to assign HydroIDs to the records as shown.

Aber, Yang, Steward, 2007

17

We will also assign a discharge value for the entire model area in the geodatabase. To do this, add the BoundaryValue table to the map with the newly populated WaterBoundaryArea layer. Start an edit session and open the BoundaryValue table. Assign the FeatureID of the new record to be the same as the HydroID of the ModelBoundary record in the WaterBoundaryArea layer. In this case, my ModelBoundary had a HydroID of 2. Then change the BoundaryType to be Discharge and set the BDValueX to be -0.001. This value can be changed according to your specific study area.

Now the WaterBoundaryArea has all of the data needed for our model.

Aber, Yang, Steward, 2007

18

1.4 Populating the WaterBoundaryLine Feature Class


The WaterBoundaryLine feature class will store data about the river segments in our model. Things such as the hydraulic head, and conductance of the rivers will be specified in the model.

1.4.1 Creating RiverSegments Shapefile


For the WaterBoundaryLine feature class, we will use the NHD flowlines dataset. To get this, open up the NHD once again as with the reservoirs, except this time select the NHD Flowlines layer. You may need to download the actual source file from http://www.kansasgis.org because of the amount of data we will be selecting (ArcMap will select a maximum of 2000 objects from a web based ArcIMS server). Once this is loaded, we will select the river flowlines needed by utilizing the Select By Location tool under the Selection menu.

Set up the query as shown. This will select all of the rivers touching any part of the WaterBoundaryArea layer.

Aber, Yang, Steward, 2007

19

Now follow the same procedure as with the reservoirs as outlined in Section 1.3.2: 1. Right click on the layer and go to Selection > Create Layer from Selected Features. 2. Right click on the new layer and select Data > Export Data. 3. Export the data as a shapefile named RiverSegments. And add this shapefile to the map. 4. Start an edit session for the RiverSegments shapefile and from the Editor menu select More Editing Tools > Advanced Editing to bring up the Advanced Editing Tools Toolbar. 5. Now select all of the river segments and click the Generalize tool with a 500 meter offset. 6. Save your edits and stop editing. This may take some time depending on your computer. 7. Once the segments are simplified, they need to be clipped to the WaterBoundaryArea. In the ArcToolbox, select the Clip tool, under Analysis Tools > Extract. Select the RiverSegments shapefile as the input feature, and the WaterBoundaryArea as the clip feature. Click OK. Once you are done, your map should look something like this one:

Aber, Yang, Steward, 2007

20

1.4.2 Loading RiverSegments Shapefile into the WaterBoundaryLine Feature Class


Add the WaterBoundaryLine feature class from the RileyGroundwaterPMWIN geodatabase to the map. Load the river segments as outlined in Section 1.3.3: 1. Start an edit session and click on the Object Loader tool. (In this step, make sure that the only layer from the geodatabase in your map is the WaterBoundaryLine feature class. Otherwise you will get an error when trying to load the RiverSegments_Clip shapefile into it.) 2. Select the RiverSegments_Clip shapefile and load it into WaterBoundaryLine. 3. Assign an AquiferLayerID to the river segments. Calculate the values in the AquiferLayerID field to be equal to 1 for all of the records. This AquiferLayerID should be equal to the HydroID of the record we created in the AquiferLayer table. 4. If the Arc Hydro Toolbar did not automatically assign HydroIDs to the records, then use it to assign HydroIDs to the records.

Aber, Yang, Steward, 2007

21

Now all of the features that needed are loaded into the WaterBoundaryLine feature class.

1.4.3 Specifying Large and Small River Segments


To easily specify the varying conductance of larger rivers versus small rivers, we will specify which rivers are large and which small in our geodatabase. The database is not specifically designed for this, so we will have to add a field to the WaterBoundaryLine feature class. To do this, first load the WaterBoundaryLine feature class that you just populated into ArcMap. Then, open its attribute table.

Now, click on the Options button in the attribute table and select Add Field. Note: You cannot add a field if you are in an edit session.

In the Add Field dialog box, type in the name Large_River and select the type to be Short Integer. You can leave the rest of the options as the default options.

Aber, Yang, Steward, 2007

22

Now we need to calculate the values for our new field. An easy way to differentiate large rivers from smaller rivers on a large scale is to select the river segments that are named. Named river segments are generally more substantial and have water in them all of the time. An easy way to select all of the named rivers is to select all of the rivers without names, and then switch the selection. So, in the attribute table of WaterBoundaryLine, click on the Options button again and choose Select By Attributes.

Now, in the Select By Attributes dialog box, set up your query as shown. Select the records from the [Name] field that are blank.

Aber, Yang, Steward, 2007

23

This should select all of the records without names. Now you can click on the Options button again and select Switch Selection.

Aber, Yang, Steward, 2007

24

Now all of the named river segments should be selected. You now need to deselect some of the segments. The large river segments should not have a terminus, but should always start from a confluence of two smaller river segments. If there is a terminus, then the PMWIN model output will be unrealistic. You can see in the picture how the river segments are selected all the way to their ends.

At the same time, you may have to select several segments of large rivers, such as the Kansas River, which are not named. The Kansas River is largely an artificial channel now, and because of this, the NHD does not have a name for the record. You can see the segments of the Kansas River which are not selected in the picture.

Aber, Yang, Steward, 2007

25

To deselect these, use the select pointer and manually deselect the named river segments which have a terminus. Once this is done, your selection should look like the one in the picture.

` To calculate the values for only the selected records, click the Show Selected button at the bottom of the attribute table.

Once you have done this, start an edit session. Right click on the field, and select Calculate values. Then, in the Field Calculator dialog box, enter 1 into the field.

Aber, Yang, Steward, 2007

26

This will calculate all of the values for the large river segments. Once you have done this, you can switch the selection once again, so that all of the river segments without names, and the smaller river segments with names will be selected. Then repeat the procedure, and instead of 1, enter 0 in the Field Calculator. Now the WaterBoundaryLine feature class is complete for our uses.

1.5 Populating the AquiferArea Feature Class


In the AquiferArea feature class, we will store data about areas of the aquifer with differing hydraulic parameters. In this case, the Kansas River bed has a higher hydraulic conductivity relative to the rest of the model area. Because of this, we will create a shapefile of the Kansas River bed and include it as an AquiferArea in our geodatabase.

1.5.1 Creating KSRiverBed Shapefile


The first step to creating the shapefile is to obtain a Digital Elevation Model (DEM) of the model area. The easiest way to get this is from the National Elevation Dataset (NED) via the USGS Seamless Data Distribution System at http://seamless.usgs.gov/. You can zoom in on Riley County, then make sure that in the Download tab 1" NED is selected, and click the Define Download Area tool. You can then drag a box around the download area, and a window will pop up with the download files.

Aber, Yang, Steward, 2007

27

Once you have downloaded this DEM, add it to the map. (You can change the colors by left clicking on the histogram under the layer.) We will now use the Raster Calculator from the Spatial Analyst Toolbar. Right click one of the toolbars, and select Spatial Analyst to enable the Spatial Analyst Toolbar.

Aber, Yang, Steward, 2007

28

On the Spatial Analyst toolbar, under the Spatial Analyst Menu, select Raster Calculator. We will calculate the area on the DEM under an elevation of 325 meters in order to select the Kansas River bed. Enter the expression [dem_name] <= 325 into the Raster Calculator box.

The raster calculator creates another raster file with the area selected filled with 1 values, and the other values as 0. We will take this raster and convert it to a vector file. Under the Spatial Analyst menu, select Convert > Raster to Features. You may leave the values in the dialog box as the default values.

Once the shapefile for the raster has been created, you can follow the same procedure as with the reservoirs in section 1.3.2: 1. Select just the polygons that define the Kansas River bed.

Aber, Yang, Steward, 2007

29

2. Right click on the layer created by the Spatial Analyst and go to Selection > Create Layer from Selected Features. 3. Right click on the new layer and select Data > Export Data. 4. Export the data as a shapefile named KSRiverBed. And add this shapefile to the map. 5. Start an edit session for the KSRiverBed shapefile and from the Editor Menu select More Editing Tools > Advanced Editing to bring up the Advanced Editing Tools Toolbar. 6. Now select all of the river segments and click the Generalize tool with a 1000 meter offset. 7. Once the segments are simplified, they need to be clipped to the WaterBoundaryArea. Save your edits and stop editing. In the ArcToolbox, select the Clip tool, under Analysis Tools > Extract. Select the KSRiverBed shapefile as the input feature, and the WaterBoundaryArea as the clip feature. Click OK. 8. Now all of the very sharp points need to be deleted. Start another edit session, select Modify Feature as the Task and KSRiverBed_Clip as the Target. Then select the outline of the riverbed, right click on a vertex and delete it, or left click the vertex and reposition it. 9. Save your edits and stop editing. When you are done your shapefile should look somewhat like the one shown along with the WaterBoundaryArea feature class. The KSRiverBed_Clip shapefile is now ready to be added to the AquiferArea feature class.

Aber, Yang, Steward, 2007

30

1.5.2 Loading KSRiverBed Shapefile into the AquiferArea Feature Class


We will follow basically the same procedure to load the KSRiverBed_Clip shapefile into the AquiferArea feature class as outlined in section 1.3.3. Add the AquiferArea feature class from the RileyGroundwaterPMWIN geodatabase to the map. Once this is done, follow the procedure: 1. Start an edit session and click on the Object Loader tool. (In this step, make sure that the only layer from the geodatabase in your map is the AquiferArea feature class. Otherwise you will get an error when trying to load the KSRiverBed_Clip shapefile into it.) 2. Select the KSRiverBed_Clip shapefile and load it into AquiferArea. 3. Assign an AquiferLayerID to the river segments. Calculate the values in the AquiferLayerID field to be equal to 1 for all of the records. This AquiferLayerID should be equal to the HydroID of the record we created in the AquiferLayer table. 4. If the Arc Hydro Toolbar did not automatically assign HydroIDs to the records, then use it to assign HydroIDs to the records. Now all of the features that are needed are loaded into the AquiferArea feature class.

1.6 Editing AquiferProperty Table


The last step in setting up our geodatabase is to edit the AquiferProperty table. This table stores information about the hydraulic parameters of our geodatabase features. Add the AquiferProperty table from the RileyGroundwaterPMWIN database to ArcMap. Start an edit session and open the table.

Now we will manually enter the values for our model area. Since most of these values are homogeneous across the entire area, we will assign them to our AquiferLayer feature. The FeatureID in this table corresponds to the HydroID of the feature it is describing. So find the HydroID of your AquiferLayer and enter the values shown. My AquiferLayer has a HydroID of 1.

Since the aquifer we are modeling is an unconfined aquifer at the surface of the model area, the TopElevation in our model should be above the highest elevation in our model area. To find the highest elevation in the model area, we can use the DEM of our area. Simply load the DEM to

Aber, Yang, Steward, 2007

31

ArcMap, and look at the layer in the table of contents. The High and Low values will be used for our TopElevation and BaseElevation.

The HydraulicConductivity and Porosity for the model area have already been determined to be as shown. Note: any values you wish to enter for your modeling domain can be entered here. The model in this tutorial will also be a single layer model, so the BaseElevation and TopElevation subtypes should be set to be lower than the 20 meters below the lowest elevation and higher than the highest elevation in the DEM. This will encompass all of the land in the modeling domain. Now we will add a record for our AquiferArea since it has a different hydraulic conductivity. Simply add another record with the FeatureID equal to the HydroID of the AquiferArea record and set the values as shown.

The aquifer properties for our model have now been set. These values will not affect the PMWIN model; however, they serve as a storage point for the values and an easy reference when setting up the PMWIN model.

Aber, Yang, Steward, 2007

32

Chapter 2. Creating Input Files for PMWIN


In order to use PMWIN, we will have to create some specialized input files for it. It is based on a grid, so we will have to first rasterize all of our data. These rasters will then have to be converted to ASCII format so that PMWIN will recognize them. A model has been created to speed this process. The model will convert all of the data in your geodatabase into the required ASCII outputs for PMWIN. A copy of the toolbox is attached to this file. A more in depth description of the methods used will be given in Appendix A. I have attached a copy of the toolbox needed for this Chapter to the PDF file. Save that toolbox to your computer (Modflow.tbx). Then, in ArcMap, open the ArcToolbox. Right click on the ArcToolbox and select Add New Toolbox.

Browse to where you saved the toolbox and open it.

Once you have loaded the toolbox, find it and double click it.

Aber, Yang, Steward, 2007

33

The tool has many parameters. However, most are explained in the title and are not difficult to specify. The first thing to do is to enter the path names for each of your feature classes in your geodatabase and the DEM in the area.

Next, scroll down to enter the path names that the ASCII output files will be saved.

Aber, Yang, Steward, 2007

34

Now, scroll down you can specify the conductance and conductivity values. In my model area, I selected 200 cubic meters per day as the conductance for the large rivers, 500 cubic meters per day for the conductance of the reservoirs, and 0.2 cubic meters per day for the conductance of the small rivers. The large/small river depends on which rivers you named large and small in Section 1.4.3. For the hydraulic conductivity, the riverbed was set to be 24 cm/sec and the rest of the area to 0.3 cm/sec.

The next step is the only tricky one. Because of the way the model is set up, you need to convert the values in the raster for your reservoirs to 1. To do this, you need to find out what the HydroIDs of your reservoirs are. As the heading of the section says, you should select all of the HydroID values that are associated with a reservoir, and select the new values for these to be 1. The other values (for me the model boundary) should have new values of 0. So for Aber, Yang, Steward, 2007 35

example, my reservoirs had HydroIDs of 3 and 4. Therefore, they went to 1 and the others to 0.

The next step is to set the spatial extents for the various tools. Unfortunately, there is no way to globally set the spatial extent for the model, so the extent must be set multiple times for each tool. To set the extent, click on the open button to the right of the select box. Browse to the WaterBoundaryArea feature class and click OK. It will then display Same as Dataset WaterBoundaryArea and have the same extent. Since our WaterBoundaryArea contains the model area polygon, this is the correct extent to use.

Aber, Yang, Steward, 2007

36

The last thing to specify is the output cell size of the raster files. Like the extent, this must be done for all of the tools in the model. All of the cell sizes should be the same, the size that you decided on in Section 1.3.1.

Once you have done this, you are ready to start the model. Click OK, and the model will run. When it is done, the ASCII files will have been created in the folder that you specified in the model. The model usually takes a couple of minute to complete.

Aber, Yang, Steward, 2007

37

Chapter 3. Creating the Model in PMWIN


PMWIN is a graphical interface to use the modflow groundwater model. The model is a grid, and each cell is assigned a value, whether for hydraulic head, conductance, discharge, etc. Most of our model has homogeneous properties, but some will have to be entered through the ASCII files created in sections 2.1 and 2.2. If you do not have the PMWIN software, it can be downloaded at http://www.pmwin.net/pmwin5.htm. Once you have downloaded and installed the software, open it up and select File > New Model.

3.1 Defining Mesh Size


With the new model created, we now must define the size of our model. Select Grid > Mesh Size.

Our model will be the same size as the ASCII datasets created in Chapter 2. To get the number of rows and columns, and their size, simply open the ASCII files created by the model builder. At the top you will see a header with several entries. Simply match these entries with the fields in the Model Dimensions dialog box.

Aber, Yang, Steward, 2007

38

Once you have done this, click OK. You should see a grey grid in the PMWIN window. Now select Options > Environment.

In the Environment dialog box you define the models spatial orientation. Unfortunately, the header in the ASCII file created by ArcMap displays the coordinates of the lower left corner of the raster, whereas PMWIN requires the upper right corner. In order to get the coordinates to the upper left corner, you can load the WaterBoundaryArea feature class into ArcMap. Right click on the WaterBoundaryArea layer and select Properties. In the Layer Properties dialog box, select the Source tab.

The Source tab will display the extents of the layer (which are the same as the extents set for the raster files). If ArcMap displays values like the ones above, round the values to the nearest integer. Enter the values for Top and Left as Xo and Yo in PMWIN.

Aber, Yang, Steward, 2007

39

Now we will set the Worksheet size. You will enter values once again based on the extent values from the Source tab in ArcMap. However, choose values so that the Worksheet is not smaller than the extent of the model.

The A= field can be ignored. It is used if your model needs to be rotated. However, since we have made our model aligned with the UTM grid, ours does not need to be rotated. Once you click OK, your grid should look somewhat like this one.

Aber, Yang, Steward, 2007

40

When this procedure is completed, select File > Leave Editor. Then select Yes when it asks you if you want to save your changes.

3.2 Defining Layer Type


Now we will define the Layer Type. Select Grid > Layer Type.

Aber, Yang, Steward, 2007

41

Our aquifer in this model will be considered an unconfined aquifer. Therefore, select 1: Unconfined for the Type field and click OK.

3.3 Defining Homogeneous Parameters


The properties in the next sections are all homogeneous for our aquifer. Heterogeneous properties may need to have their values assigned with ASCII files like the ones we created in Chapter 2; however, all of the homogeneous parameters are very easy to assign.

3.3.1 Define Top of Layers Elevation


Now again in PMWIN, to define the Top Elevation of the aquifer, select Grid > Top of Layers (TOP).

In order to find the top elevation of our model, we will refer to the geodatabase. We stored this information in the AquiferProperty table. Look in this table for the TopElevation, and use this as

Aber, Yang, Steward, 2007

42

the Top of Layers elevation. Now, just as in section 3.4, select Value > Reset Matrix, and enter in your top elevation for the model area.

You can check the matrix to make sure the values were recorded by selecting Value > Matrix. Click OK, then select File > Leave Editor and save your changes.

3.3.2 Define Bottom of Layers Elevation


Select Grid > Bottom of Layers (BOT).

Follow the same procedure as in Section 3.3.1 to find your bottom elevation from the geodatabase. The bottom of our layer should be the BaseElevation record in the AquiferProperty table. Now reset the matrix by selecting Value > Reset Matrix, and enter your bottom elevation value. Click OK, leave the editor and save your changes.

3.3.3 Define Recharge


To define the recharge of the model area, select Models > MODFLOW > Recharge.

Aber, Yang, Steward, 2007

43

The value of the recharge for our model area is stored in the geodatabase, in the BoundaryValue table. Find the record with the FeatureID equal to the HydroID of our model boundary (stored in the WaterBoundaryArea feature class), and use the recharge value given it. For our model are, the recharge has been determined to be 0.001 cubic meters/day. Select Value > Reset Matrix, and enter your recharge value.

Click OK, leave the editor and save your changes.

3.4 Defining Heterogeneous Parameters


Since our model has so many cells, it is impractical to enter the values for the heterogeneous models by hand, although it can be done. However, we have utilized ArcMap in Chapter 2 to create ASCII files to enable us to easily import the values for the tables. Unfortunately, the headers created in the ASCII file by ArcMap are not compatible with PMWIN. We will have to manually configure the header for each ASCII file. To do this, open the ASCII files. The only information that PMWIN needs is the number of rows and columns, since the spatial position and extent are already defined in the model. Therefore, you can delete all of the information provided by ArcMap other than the ncols and nrows. The format for the PMWIN ASCII file header is simply the number of columns and the number of rows separated by a tab. Below you can see the header created by ArcMap on the left, and the header required by PMWIN on the right.

Aber, Yang, Steward, 2007

44

Change the headers for all of the ASCII files created in Chapter 2. Once this is done, the files are ready to be imported to PMWIN.

3.4.1 Define Horizontal Hydraulic Conductivity


To define the horizontal hydraulic conductivity, select Parameters > Horizontal Hydraulic Conductivity.

Once in the layer editor, select Value > Matrix.

You will notice that values have been automatically assigned by PMWIN for the hydraulic conductivity. However, we wish to assign our own values. In the matrix dialog box click the Load button.

Aber, Yang, Steward, 2007

45

Now click the browse button and browse to the ASCII file you just saved with the correct header. Select to replace the rest of the entries, and that the Start Position should be in Column 1, Row 1.

Click OK, and the values should be added as they were in the ASCII file. You can check to make sure the values were properly assigned by inspecting the matrix.

Click OK, leave the editor and save your edits.

3.4.2 Define Head and Conductance


To define the head and conductance values to our model, we will once again use the ASCII files with the correct header format. Select Models > MODFLOW > General Head Boundary.

Aber, Yang, Steward, 2007

46

Select Value > Matrix to open the matrix. In the matrix for the General Head Boundary, we can enter the values for the hydraulic conductance and the head values. First, make sure the Parameter is selected as GHB Hydraulic Conductance and click the Load button.

Now browse to the conductance ASCII file, make sure the other options are the same as in section 3.4.1 and click OK.

Now in the Browse Matrix dialog box, select Head on the Boundary as the Parameter and click Load.

Aber, Yang, Steward, 2007

47

In Load Matrix dialog box, browse to your head ASCII file and make sure that the options in the Load Matrix dialog box match those in Section 3.4.1 when you are loading it.

Click OK, then OK again in the Browse Matrix dialog box. Now these parameters should be set, and you may leave the editor and save your changes.

3.4.3 Define Cell Types


There are three cell types from which to choose in PMWIN: active, inactive, or constant head. Active cells are denoted by a 1, inactive by 0, and constant head by -1. We will define these values in the IBOUND table. The model builder model from ArcMap has created a file for us to use in this step. The file should contain a -1 for all boarder cells and 1 for all of the inner cells. We will specify the Initial Hydraulic Head in the next step for the outer cells, which is why they are set to be of constant head. Select Grid > Boundary Condition > IBOUND.

This will open the grid editor again. With the grid editor open, select Value > Matrix. You can follow the same basic procedure as outlined in section 3.4.1. In the Browse Matrix dialog box, click the Load button. Select the ASCII file created by ArcMap. Click OK and then the matrix should be loaded and look like this one:

Aber, Yang, Steward, 2007

48

You should inspect the matrix to insure that all of the outer cells have a value of -1, as the model sometimes leaves some of them as 1. You can then leave the editor and save your edits.

3.4.4 Define Initial Hydraulic Heads


To define the initial head of the model, select Parameters > Initial Hydraulic Heads.

The initial hydraulic head for every model area will need to be determined separately. However, to achieve realistic results in the model, the head for the outside cells needs to be constant. We will set the head for these cells to be the known value for our model area, approximately 20 meters below the ground level. All of the inner cells will have head calculated for them for our model. You must still set an initial head for the area, and for our model area, it will be 330 meters. You can follow basically the same procedure as in Section 3.4.1. Select Value > Matrix, and click the Load button in the Browse Matrix dialog box. Load the ASCII file created by ArcMap and inspect the matrix to make sure it was imported correctly. It should look like the one displayed:

Aber, Yang, Steward, 2007

49

If your matrix looks correct, you can leave the editor and save your changes. Your model should be ready to run after this step is done.

Aber, Yang, Steward, 2007

50

Chapter 4. Running the Model in PMWIN and Viewing the Results


Now that the model is set up, it is easy to run it and view the results through PMWIN. We can also export the results from PMWIN for use with ArcMap.

4.1 Running the Model


Once all of the data is entered into the model, select Models > MODFLOW > Run.

A dialog box will appear with options for running the model. Set up your model as displayed. Check Regenerate all input files for MODFLOW and Check the model data. If any of the fields under the Generate column are unchecked, check them.

Click OK, and the model will run. Aber, Yang, Steward, 2007 51

Note: If you receive and error from PMWIN, it is most likely due to having a general head boundary (general head or hydraulic conductance) assigned at a point that is also defined as having an IBOUND value of -1. Since -1 means that the value has a fixed head, the variable head boundary values conflict with this, since they are always calculated. Simply go to your general head boundary matrices once again, and make sure that a value of 0 is entered for all of the outer cells. When it is completed, it will look like the picture below. Push any key to return to PMWIN.

4.2 Reading and Saving Results


When you return to PMWIN, nothing will have changed. It may seem as if the model has not done anything, but to get the outputs of the model, you will have to select Tools > Results Extractor.

The box that appears will look similar to the matrices viewed earlier with the input parameters. In order to get the results for the various values calculated, select them in the Results Type field and then click the Read button.

Aber, Yang, Steward, 2007

52

The matrix will then be filled with values. These are the values calculated by the model. In order to save these values so that you can view them with PMWIN and ArcMap, click Save.

This will save an ASCII file in the same format as we used when importing the hydraulic head, conductance, and conductivity file from ArcMap. Once you save the file, you can close the dialog box.

Aber, Yang, Steward, 2007

53

4.3 Presentation Tools


The ASCII file created by PMWIN can be visualized in PMWIN. To do this, select Tools > Presentation.

This will take you to the layer editor. Just as we did in Sections 3.6.1 and 3.6.2, select Value > Matrix. From the Browse Matrix dialog box, click the Load button. Browse to the ASCII file you just created in Section 4.2, load it and click OK. Now select Options > Environment.

In the Environment Options box, click on the Contours tab. Check the Visible box and the Fill Contours box. Then click the Restore Defaults button. This will automatically create evenly spaced classified contours. You can also maually edit the spacing of contours by entering values in the Level field, or change other options by clicking on the field.

Aber, Yang, Steward, 2007

54

Once you have done this, go to the Appearance tab, and uncheck the Grid box. (You may also uncheck the General boundary-head cell box later to make it easier to see.)

Your output map should look like the following. The map output will show the elevations of the hydraulic heads calculated for each grid cell. The diagram on the left is with the general boundary-head cells displayed, and on the right is without them.

Aber, Yang, Steward, 2007

55

These are both done with the default display settings. These can be customized in PMWIN, but it is easier to do this with ArcMap, which is why we will convert the ASCII file created by PMWIN to import it to ArcMap.

4.4 Converting ASCII File for display in ArcMap


In order to convert the ASCII file to use with ArcMap, we will have to reformat the header. This is the opposite procedure as done before in Section 3.6. The easiest way to do this is to open up one of your ASCII files created by ArcMap, and simply copying in the header. All of the values will be the same as before. You can see in the diagram the ASCII file created by PMWIN on the left, and the modified ASCII file for ArcMap with the header copied exactly from one of the ASCII files used in Section 3.6.

To import this ASCII file to ArcMap, select the ASCII to Raster tool in the Conversion Tools Toolbox.

Aber, Yang, Steward, 2007

56

Select the ASCII file you just created with the appropriate header as the input file. Make sure that the Output Data Type is Float.

The raster output should look something like the one pictured below.

Aber, Yang, Steward, 2007

57

4.5 Viewing Results in ArcMap


Several things can be done to more easily view the PMWIN output in ArcMap. You can change the color of the raster by left clicking the histogram in the table of contents and selecting a new color scheme.

You can also create contours from the raster with the contour tool in the Spatial Analyst Tools toolbox.

Aber, Yang, Steward, 2007

58

It also helps to visualize the area if you add the WaterBoundaryLine feature class, or other various features such as the DEM. When all is done, you could have a map that looks something like the one below.

Aber, Yang, Steward, 2007

59

Conclusion
Now you should have a good overview of using the PMWIN model and the Arc AEM Geodatabase. Both the PMWIN program and the geodatabase can be used for any study area, and many more parameters can be specified. Both are extensible, and can handle larger or smaller data sets as well. However, in all other model areas, the basic schema presented in this document can be followed: gather the data, simplify it for the model, store it and its parameters in the geodatabase, and then convert and import this data to PMWIN. You can then take the output of PMWIN and convert this to files that ArcMap can read and make eye-catching maps with the data.

Aber, Yang, Steward, 2007

60

Appendix 1: Explanation of the Model Builder Model


The model created for model builder in the ArcToolbox is somewhat more complicated than you would first imagine. Because the model outputs five ASCII raster sets from just three input vector datasets, each vector dataset must be manipulated multiple times to create the proper output. In addition to this, some of the output ASCII files are not homogeneous, so futher manipulation must be done. Since the model is so large, it will be easier if I explain the properties of the model, while you examine it through ArcMap. To do this, right click on the model, and select Edit.

You can then view the model with all of its tools. It should look like this when zoomed out:

Aber, Yang, Steward, 2007

61

In explaining the model, I will walk through the steps it takes to create each output PMWIN file.

1. IBOUND ASCII Raster


The IBOUND ASCII raster is the most simple of the five. All that is required for the IBOUND ASCII is that all of the cells on the boundary have a value of -1 (fixed head) and the rest in the center have a value of 1 (calculated head). The tools used in its creation are highlighted below.

First, the Buffer tool is used to create a buffer of -5 m is created around the features. This will create a polygon 5 m inside the model boundary. However, for the rasterization to work properly, it needs to be a line, so the Polygon to Line tool converts this polygon shapefile to a line shapefile. It is then converted to a raster dataset with the Feature to Raster tool. This raster is then reclassified with the Reclassify tool so that all of the outer cells have a value of 0 and the inner cells a value of 1. This is done so that this raster can be used in other steps of the process. Then this raster is reclassified again with the Reclassify tool so that the outer values are -1 and the inner values are 1. Then, this final raster is converted to an ASCII file with the Raster to ASCII tool.

2. Initial Hydraulic Head


For our model, we specify a hydraulic head value for the groundwater on the boundary of the modeling domain. Since the IBOUND value on the boundary is -1 and is fixed, then this provides a reference for PMWIN, so that it produces more realistic results. For the modeling domain in this tutorial, the head of the aquifer is approximately 20 meters below the ground level. This means that we will use the DEM of the area to find these values, and simply define an initial hydraulic head for the rest of the area (the calculated head value areas, IBOUND = 1) as an arbitrary amount. The tools used in this step are highlighted below. Aber, Yang, Steward, 2007 62

The first part of this procedure to creating the initial hydraulic head ASCII file is the same as for the IBOUND. The raster file in which the outer cells are valued 0 and the inner cells valued 1 is used. With this raster, and the DEM of the model area, a Single Output Map Algebra expression is used. The expression is: con( [0outside1inside] > 0, 330 , [DEMofArea] - 20) This expressions concatenates the raster with an if-then statement. It reads: If 0outside1inside is greater than 0, then put the value 330 in that cell; if 0outside1inside is not greater than 0, then put the value of DEMofArea minus 20 in that cell. This creates a raster with the value of DEMofArea 20 in all of the outside cells, and a value of 330 in the inside cells. This raster is then converted to an ASCII file with the Raster to ASCII tool.

3. Hydraulic Head
The general hydraulic head of the model corresponds to the hydraulic head of the various hydraulic features in the model area. For the model in this tutorial, only the rivers and reservoirs are used. The head values for all of the points are approximated by their DEM elevation value. Therefore, in order to make the hydraulic head ASCII file, the WaterBoundaryLine and WaterBoundaryArea feature classes needs to be rasterized and the DEM value at those points assigned to the raster. The outer cells must also be made 0, so that there is no conflict in PMWIN because the IBOUND values for the outer cells specify fixed head values. The tools used in this process are highlighted below.

Aber, Yang, Steward, 2007

63

Once again, the process used in the IBOUND value ASCII process is used once again in order to get the raster dataset with 0 assigned to the outside cells and 1 assigned to the inner cells. This is highlighted in red. The process highlighted in green corresponds to the rasterization of the WaterBoundaryArea feature class. The first step is to rasterize it with the Feature to Raster tool. It is rasterized based on the HydroID of the features, so that it can then be reclassified so that only the reservoirs are actually part of the raster. This is done with the Reclassify tool based on the HydroIDs. All of the sections of the raster with HydroIDs corresponding to the reservoirs are reclassified as 1 and the rest as 0. Now, we have a raster that will be used later in the process. The process highlighted in yellow starts with the WaterBoundaryLine feature class. The feature class is first rasterized with the Feature to Raster tool based on the HydroIDs. We only need to have the areas with an actual feature in them, so the Is Null tool is used. This tool will convert all areas designated as No Data in the raster to a value of 1, and the rest of the cells will be given a value of 0. This means that all of the cells containing river segments will have a value of 0 and the rest a value of 1. We can then reclassify this raster so that it is reversed, and the river segments have a value of 1 with the Reclassify tool. At this point, we have two rasters: one has the river segments with a value of 1, and the other has the reservoirs with a value of 1. A Single Output Map Algebra expression is used to join these two rasters together. The expression is: con( [Rivers1Else0]>0, [Rivers1Else0], [Lakes1Else0] ) This reads: if the Rivers1Else0 raster is greater than 0, then put in the value of Rivers1Else0; if the Rivers1Else0 raster is not greater than 0, then put in the value of Lakes1Else0. Now our Aber, Yang, Steward, 2007 64

raster contains the value of 1 in all of the cells we need values. The model then simply multiplies the DEM raster by the raster just created with the Times tool. Now all of the cells containing river segments or reservoirs have the DEM value, and the rest have 0. To prepare this raster for PMWIN, the outer cells also need to have a value of 0, so as not to conflict with the IBOUND value. Therefore, the raster created by the red highlighted tools is multiplied by the hydraulic head values raster with the Times tool. This gives all of the outer cells a value of 0, and does not change the inner cells. Now this raster is converted to ASCII by the Raster to ASCII tool.

4. Conductance

Aber, Yang, Steward, 2007

65

Aber, Yang, Steward, 2007

66

You might also like