πŸ’§ IGW-NET Β· Quick Tutorial 13 of 31

Tutorial 13: Importing Shapefiles

Import GIS shapefiles for boundaries, wells, rivers, and hydraulic properties. Map shapefile attributes to model input arrays.

IGW-NET Tutorial 13 Prereq: MAGNET4WATER account 2 sections

This tutorial covers

  1. Thunder Bay Watershed β€” Shapefile-Based Model
  2. What's Next

1Thunder Bay Watershed β€” Shapefile-Based Model

Step 1 β€” Import Watershed Boundary as Model Domain

Click Utilities then DrawDomain 'DrawDomain' β†’ 'DM from a shapefile'. Select the Thunder Bay watershed shapefile (.shp, .dbf, and .prj files) and click Load Load. Select the Select record Thunder Bay record and hit Next. Choose as Model Domain 'as Model Domain' and Add to MAGNET Model. The watershed polygon becomes your model boundary β€” no manual drawing needed.

Step 2 β€” Import Lakes as Head-Dependent Zones

Click Zone tools then Zone from shapefile 'Zone' β†’ 'Zone from a shapefile'. Select the Lakes_ThunderBay shapefile and Load. Select Select Add Load all lake records. Assign them as shape-specified, two-way head-dependent flux boundaries. For lake stages, use the 'lake_elev' field from the shapefile β€” each lake gets its actual surveyed elevation automatically. Set constant values of 2 m depth and 5.0 day⁻¹ leakance for all lakes, then Add to MAGNET Model.

Step 3 β€” Import Streams as Head-Dependent Lines

Click Line tools then Line from shapefile 'Line' β†’ 'Line from a shapefile'. Select the streams_ThunderBay shapefile and Load. Select Select Load Add all stream records. Assign as shape-specified, two-way flux. Use the 'T_ELEV' field for stream stages. Set constant values of 1 m depth and 5.0 day⁻¹ leakance, then Add to MAGNET Model.

Step 4 β€” Disable Surface Drainage

Click Domain Attributes menu Settings to open the Domain Attributes menu, Aquifer Settings tab. Set the Surface Drain Leakancy to zero. This prevents the default surface drainage from interfering with the imported stream and lake features β€” you want the shapefiles to control all surface water interaction.

Step 5 β€” Increase Grid Resolution

Still in the Domain Attributes menu, go to the Simulation Settings Simulation Settings tab. Set the grid size to NX=100 to better resolve the lake and stream features. Higher resolution ensures that small lakes and narrow streams are properly represented in the computational grid.

Step 6 β€” Simulate

Click Submit to save all changes and submit the model for simulation. The solver computes flow through the entire Thunder Bay watershed with all imported lakes and streams active as boundary conditions.

Step 7 β€” Analyze Water Balance

Click Analysis Display Charts 'Analysis' β†’ 'Display Charts' to examine the water balance. The mass balance shows how much water enters through recharge, how much exchanges with lakes (gaining vs. losing lakes), how much discharges to streams, and the overall budget closure.

Thunder Bay watershed model domain imported from shapefile, showing the irregular watershed boundary polygon on a georeferenced map
Figure 1: Thunder Bay watershed boundary imported from shapefile β€” the irregular polygon becomes the model domain automatically. No manual drawing of the watershed boundary.
Shapefile import dialog showing the lake records selection, field attribute mapping for lake_elev, and boundary condition assignment options (shape-specified, two-way flux)
Figure 2: Lake import interface β€” all lake records selected, 'lake_elev' field mapped to lake stage, two-way head-dependent flux assigned. Each lake gets its actual surveyed elevation from the shapefile attribute table.
Shapefile import parameter assignment showing lake depth (2m constant), leakance (5.0 day-1 constant), and lake stage (from lake_elev field) configuration for all imported lake features
Figure 3: Parameter assignment for imported lakes β€” lake stages from the 'lake_elev' shapefile field, with constant depth (2 m) and leakance (5.0 day⁻¹). One import step parameterizes all lakes simultaneously.
Complete Thunder Bay model showing imported watershed boundary, all lakes as two-way head-dependent zones (blue polygons), and all streams as two-way head-dependent line features (blue lines), with head contours and flow vectors from simulation
Figure 4: Complete model with all imported features β€” lakes (polygon zones) and streams (line features) from shapefiles, plus the watershed boundary. All parameterized from shapefile attributes. The model is ready for simulation.
Simulation results and water balance for the Thunder Bay watershed model showing head contours, flow directions, and mass balance bar chart quantifying recharge, lake exchange (gaining and losing lakes), stream exchange, and boundary fluxes
Figure 5: Simulation results and water balance β€” head contours reveal the regional flow pattern driven by topography and surface water features. The mass balance quantifies every component: recharge in, stream exchange (gaining and losing reaches), lake exchange, and boundary fluxes. The budget closes β€” the model is hydraulically consistent.

Key Concepts

Field-based parameterization: The most powerful feature of shapefile import. Instead of assigning a constant lake stage to all lakes, you map a shapefile field (like 'lake_elev') to the parameter. Each feature gets its own value from the GIS database. This scales from 5 lakes to 5,000 β€” the import time is the same.

Three shapefile types: Polygon shapefiles import as domains (watershed boundary) or zones (lakes, geological units). Polyline shapefiles import as lines (streams, rivers, faults). Point shapefiles can import as wells or observation points. Each type maps to the appropriate IGW-NET feature.

Projection handling: The .prj file in the shapefile set defines the coordinate system. IGW-NET reads this and reprojects the features to match the model's coordinate system. You don't need to manually reproject β€” import the shapefile as-is and the platform handles the alignment.

Grid resolution matters: After importing complex features, increase the grid resolution (NX=100 or higher) so the computational grid can properly resolve small lakes and narrow streams. A coarse grid may "miss" small features entirely or represent them inaccurately.

2What's Next

With shapefile import mastered, continue the learning path:

Tutorial 14: Post-Analysis Tool β€” load and inspect completed MODFLOW models, including those built with imported shapefiles
Tutorial 15: Stochastic Flow Model β€” add random heterogeneity to your shapefile-based model
Tutorial 27: DataNET-based Model β€” use DataNET to bring even richer datasets into your model