flopy.utils.get_modflow module

Download and install USGS MODFLOW and related programs.

This script originates from FloPy: https://github.com/modflowpy/flopy This file can be downloaded and run independently outside FloPy. It requires Python 3.6 or later, and has no dependencies.

See https://developer.github.com/v3/repos/releases/ for GitHub Releases API.

run_main(bindir, owner='MODFLOW-USGS', repo='executables', release_id='latest', ostag=None, subset=None, downloads_dir=None, force=False, quiet=False, _is_cli=False)[source]

Run main method to get MODFLOW and related programs.

Parameters:
  • bindir (str or Path) – Writable path to extract executables. Auto-select options start with a colon character. See error message or other documentation for further information on auto-select options.

  • owner (str, default "MODFLOW-USGS") – Name of GitHub repository owner (user or organization).

  • repo (str, default "executables") – Name of GitHub repository. Choose one of “executables” (default), “modflow6”, or “modflow6-nightly-build”.

  • release_id (str, default "latest") – GitHub release ID.

  • ostag (str, optional) – Operating system tag; default is to automatically choose.

  • subset (list, set or str, optional) – Optional subset of executables to extract, specified as a list (e.g.) ["mfnwt", "mp6"] or a comma-separated string “mfnwt,mp6”.

  • downloads_dir (str or Path, optional) – Manually specify directory to download archives. Default is to use home Downloads, if available, otherwise a temporary directory.

  • force (bool, default False) – If True, always download archive. Default False will use archive if previously downloaded in downloads_dir.

  • quiet (bool, default False) – If True, show fewer messages.

  • _is_cli (bool, default False) – Control behavior of method if this is run as a command-line interface or as a Python function.