INSTALL MODFLOW6 ON UBUNTU

A step-by-setp setup instructions

Posted by argansos on February 18, 2021
Install the Fortran compiler gfortran
1
sudo apt-get install gfortran
Download the latest version and unpack it

you may need to install p7zip-full to unpack the zip.

1
2
3
4
cd Downloads
mkdir MODFLOW
curl -OLC - https://water.usgs.gov/water-resources/software/MODFLOW-6/mf6.2.0.zip
7z x mf6.2.0.zip
Install the modflow6
1
2
cd make
make

After compiling we end up with the binary (mf6) and temporary object files in the subfolder .obj_temp and .mod_temp.

Test modflow6
1
2
cd ../examples/ex-gwt-henry-a
./../../make/mf6

p.s. I would recommend you to move mf6 to /opt, better with also the examples, source code and documentations, and set appropriate folder and file permission, then create a link to it to call it directly.

Reference