Modflow Extension


The PCRasterModflow extension allows to build steady-state or transient groundwater models within the PCRaster modelling environment (Schmitz et al, 2009). It  provides a set of operations to interact with the finite-difference  model MODFLOW-2000 (McDonald and Harbaugh, 2000).


An exemplary PCRcalc code for a two layer steady-state model is shown below (the Python version of the script is included in the PCRasterModflow subdirectory of the workspace). The  model complies the minimal requirements for a MODFLOW simulation  (activating the discretization, basic and block-centered flow packages as  well as a solver package). Head values are obtained after the MODFLOW  run. At present river, well, recharge and drain packages are supported.

  1 1 1;
  object mf = PCRasterModflow::Modflow();
  # creating the layer information
  # hydraulic conductivity
  mf::setConductivity(0,,, 1);
  mf::setConductivity(1,,, 2);
  # boundary conditions / initial values
  mf::setBoundary(, 1);
  mf::setBoundary(, 2);
  mf::setInitialHead(, 1);
  mf::setInitialHead(, 2);
  mf::setPCG(50, 30, 1, 0.001, 0.001, 1.0, 2, 1);
  report = mf::getHeads(2);
  report = mf::getHeads(1);

Simulation results

The four images below show the results of a transient three layer groundwater model for a simulation time of 30 days. The recharge applied  to MODFLOW is updated each day. The upper left figure shows the  resulting head values (in metres). The upper right picture shows the  discharge of a subcatchment (in cubic metres). The discharge is composed  of surface runoff and the river seepage values returned by MODFLOW. The lower images show the response of the head values to the precipitation data (in mm) for a specific cell in the catchment.

Results of a transient groundwater model

Results of a transient groundwater model.

Distribution of software

The software is part of the current release of PCRaster. You can find the online documentation here.


This work is the result of a cooperation between PCRaster Environmental Software, Delft Hydraulics and Utrecht University. The financial support by the Dutch research programme Space for Geo-Information (Ruimte voor Geo-Informatie, RGI) as RGI project 228 ("the OpenMI framework for access to spatial temporal data and the linking of models") is acknowledged.


McDonald, M.G. and Harbaugh, A.W. (2000). MODFLOW-2000, the U.S. Geological Survey modular ground-water model -- User guide to modularization concepts and the Ground-Water Flow Process. U.S. Geological Survey.

Schmitz, O., Karssenberg, D., van Deursen, W.P.A., Wesseling, C.G. (2009). Linking external components to a spatio-temporal modeling framework: coupling MODFLOW and PCRaster. Environmental Modelling & Software 24(9), 1088-1099. DOI: 10.1016/j.envsoft.2009.02.018