4.1.3. Main Block for Standalone Mode

Standalone mode allows the user to confirm that pyHS2MF6 is reproducing model output sufficiently from independent standalone models. pyHS2MF6 is specifically formulated to use extend existing HSPF and MODFLOW 6 models.

pyMF6 is the standalone version of MODFLOW 6 in pyHS2MF6. pyMF6 should reproduce previous MODFLOW 6 results almost exactly because all of the source code and calculation logic in MODFLOW 6 is ported intact to pyMF6. The reproduction should be almost exact in the sense that identical compilers and computers will be required to be exact.

mHSP2 is the standalone version of HSPF in pyHS2MF6. It only provides the water movement and storage capabilities of HSPF. Additionally, mHSP2 is a pure python, rewrite of HSPsquared. The rewrite was necessary to make the main loop the simulation time loop to facilitate dynamic coupling. The goal of the rewrite was to reproduce the calculation logic from HSPsquared and HSPF but reorder the calculations into outer time loop order. Because mHSP2 is a complete rewrite using different numpy package components, mHSP2 is not expected to exactly reproduce HSPF results. It is expected to conceptually and generally reproduce HSPF results.

4.1.3.1. standaloneMain.py

pyHS2MF6 main block for running either pyMF6 or mHSP2 in standalone mode.

Provides standalone access to MODFLOW 6 or HSPF under the assumption that the user will want to do some pre-coupling, independent model verification prior to running a coupled model. Uses argparse to accept and parse three command line arguments.

Command line argument options

  • modelType (str): identifier for which model to run in standalone mode;

    must be HSP2 or MF6

  • modelDir (str): path for model directory with input files

  • inFile (str): main input file name for the program that was specified

    modelType

Typical usage examples

mHSP2

python ..\..\LOCA\standaloneMain.py HSP2 C:\Users\nmartin\Documents\LOCA\Test_Models\HSP2 -f DC_Subs.h5

pyMF6

python ..\..\LOCA\standaloneMain.py MF6 C:\Users\nmartin\Documents\LOCA\Test_Models\MF6 -f mfsim.nam

standaloneMain.MF_SIM_NAME = 'mfsim.nam'

Standard and fixed MODFLOW 6 simulation name