TBD: Ground water hydrology, surface water hydrology, coastal water hydrology…
MODFLOW is the USGS’s modular hydrologic model. MODFLOW is considered an international standard for simulating and predicting groundwater conditions and groundwater/surface-water interactions. MODFLOW 6 is presently the core MODFLOW version distributed by the USGS. The previous core version, MODFLOW-2005, is actively maintained and supported as well.
The FloPy package consists of a set of Python scripts to run MODFLOW, MT3D, SEAWAT and other MODFLOW-related groundwater programs. FloPy enables you to run all these programs with Python scripts.
But how do you install MODFLOW? It’s one of those US government software packages which is perfectly respectable and functional but some versions use a “classic”, which is to say, antiquated, mode of development. (I mean, it does date to 1988.)
For the version of a… distinguished vintage, there is no source code repository (not for us punters anyway), just giant (like, 400MB) zip files full of compiled Windows binaries with big chunks of fortran code alongside for compilation by the adventurous.
There are various versions which are incompatible with each other to some unexplained extent.
These have version numbers like
Thankfully the community have made modflow pymake. The documentation was a little confusing (it suggests you use certain scripts that are not installed per default), but they all turn out to be one-liners. Here is how to install MODFLOW-NWT:
pip install pymake python
import pymake pymake.build_apps("mfnwt")
This gets you a version that runs on linux, I think, but does not work on macos.
On macos, the easiest way seems to be to use docker files.
Or you can install MODFLOW 6 (but I think only that version) via conda:
conda install -c conda-forge modflow6
MODFLOW 6 has a source code repository and everything, compiles and runs everywhere etc, but it does not implement all the features of historical MODFLOW version