RmaMF6: Understanding the RunModel Batch File

  • Scroll to top of this topic Scroll to Top of Page

  • Print the current topic Print Topic

  • No expanding elements on this page Show/Hide Expanders

The command line for running the model in the PEST control file is "RunModel.Bat." Besides running MODFLOW, there are a lot of other things that are done in the RunModel.Bat batchfile. The commands in the batch file are shown below. The commands will vary depending on your model.

if exist "arrays\RmaMf6Completed.Kx_1.arrays" del "arrays\RmaMf6Completed.Kx_1.arrays"

if exist "RmaMf6Completed.Mf6Values" del "RmaMf6Completed.Mf6Values"

if exist "RmaMf6Completed.wel" del "RmaMf6Completed.wel"

if exist "mfsim.lst" del "mfsim.lst"

if exist "RmaMf6Completed.bhd" del "RmaMf6Completed.bhd"

if exist "RmaMf6Completed.cbc" del "RmaMf6Completed.cbc"

if exist "RmaMf6Completed.chob_out_chd.csv" del "RmaMf6Completed.chob_out_chd.csv"

if exist "RmaMf6Completed.InnerSolution.CSV" del "RmaMf6Completed.InnerSolution.CSV"

if exist "RmaMf6Completed.lst" del "RmaMf6Completed.lst"

if exist "RmaMf6Completed.ob_gw_out_head.csv" del "RmaMf6Completed.ob_gw_out_head.csv"

if exist "RmaMf6Completed.OuterSolution.CSV" del "RmaMf6Completed.OuterSolution.CSV"

"plproc.exe" RmaMf6Completed.Kx.script

"EnhancedTemplateProcessor.exe" RmaMf6Completed.wel.tpl RmaMf6Completed.pval

mf6.exe

"Mf6ObsExtractor.exe" RmaMf6Completed.Mf6ExtractValues

 

The first eleven commands delete output files and some input files from MODFLOW. That way, if something goes wrong with running the model, PEST can halt rather than continue to read the old output files from MODFLOW. The input files that it deletes are the files that contain the Kx data set (command 1) and the Well package input files (command 3). The simulated values from the model are deleted in command 2. Other model output files are deleted in commands 4 to 11.

After the files are deleted, the last four commands do the following:

PLPROC runs a script that generates the Kx data set.

EnhancedTemplateProcessor generates the input file for the Well package.

MODFLOW runs the model.

Mf6ObsExtractor extracts the simulated values from the MODFLOW output files.

To facilitate the use a parallel version of PEST in which individual model runs are executed on separate machines, ModelMuse copies executables used for the flow model to the model directory so that the commands refer to the local versions of the programs.