Hydrus-1D, is a modeling environment for analysis of water flow and solute transport in variably saturated porous media. This program has a graphical environment which works very well, however a lot of input data is needed to prepare for each run. Is it possible to run Hydrus-1D from the commandline in Windows? Assuming that I have generated the input files?

Since this is a rather technical question is it recommended to post this on a more technical Stack Exchange site?


Yes, it is possible. The documentation for Hydrus-3D give you the syntax (http://www.pc-progress.com/en/OnlineHelp/HYDRUS3/Hydrus.html?RunningComputationalModulesinaBa.html) In brief here is what you need to do:

  1. In the installation folder of Hydrus, create a text file, name it run.bat

  2. You need to write two lines of code for every simulation you wish to perform:

    • copy path1 level_01.dir (here path1 can be replace what what ever name you want)
    • h2d_calc (this is the executable so depending on the type of model you want to run you may have to adjust the name)
  3. In the installation folder of Hydrus create a text file and name it path1 (or whatever name you wrote in step 2), do not forget to remove the .txt extension for the case display here)

  4. In the path1 file, write the path to your input files for example: c:\program files\ussl\hydrus3d\mydirect\run1

Then double clicking on the bat file will trigger the model to run. By adding successive copy ... and h2d_calc commands you can chain model execution

In addition some tricks are available here: https://www.pc-progress.com/forum/viewtopic.php?f=4&t=679

| improve this answer | |
  • $\begingroup$ You can also copy the executable (eg. H2D_CALC.exe) into the folder where all of your input files are and create your run.bat file there, so you don't end up with a bunch of extra files in the installation folder $\endgroup$ – ThetaFC Oct 9 at 23:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.