Page 1 of 1

multiple runs

Posted: Fri Sep 15, 2006 7:23 pm
by bruno
Dear all,

I'm making multiple runs of hydrus under the control of an external model, so i would like to avoid having to press "enter" each time HYDRUS finishes its work. I've read some on the subject in the F.A.Q. section (part 27) as well as in an older topic, but it stays quite unclear to me nevertheless...

As i'm dealing with inverse problems only, the command line i'm using is simply :

From what i saw, i'm supposed to change it into :

I know little about DOS commands, but the symbol < must be there to redirect the awaited instruction from the keyboard to the "return.txt" file. As this instruction is "press enter to continue", it should appear in a different way in "return.txt".
So, could anyone help me with the content of this text file ?

Best regards


Posted: Fri Sep 15, 2006 8:37 pm
by Jirka

In version 3.0 of HYDRUS-1D you can disable the need to hit the Enter button simple on the input. See the Print Information dialog window (the check box "Hit Enter at the end?)".

You can also open and run multiple projects simultaneously to avoid these DOS commands.


Posted: Sun Sep 17, 2006 1:11 pm
by bruno
Jirka, thank you for your quick reply.

I'm using Hydrus 3.0 and the "Hit Enter at the end" option had been previously disabled. I've also checked out that the "lEnter" variable had the correct "false" logical value in file ""

But the problem remains the same... I should maybe tell you what i'm doing exactly to help you or anyone else figuring out a solution :

- Hydrus is given a set of parameters, whose values are written in "" and ""
- Hydrus is allowed a few iterations for adjustment of these parameters
- Results are compared with disposable observations, reading data recorded in the file "fit.out"
- A new set of parameters is proposed, and so on...

No error messages appear during the process, but automation seems impossible due to something in Hydrus,
as the parameter estimation process i'm using has been successfully tested on (little) control programs.

Shall i have to use the trick with the file "return.txt" containing an enter sign, and would you in this case explain me exactly what to do ?

Best regards and a nice sunday !

Posted: Sun Sep 17, 2006 8:33 pm
by Jirka
"Hit Enter at the end" should be enambled in version 3.0. lEnter equal to .false. in the file should result in the code closing the DOS window when it is finished; but only for direct simulations (if it is disabled, download HYDRUS-1D again). This has not been meant to work for inverse simulations. For inverse simulations you need to use that trick discused here somewhere in the discussion forum.

I could either send you an example of such file, or modify the code so that lEnter works also for the inverse problem. However, I can not do it now since I'm on my way to China. If you need it contact me after September 27 when I come back.


Posted: Mon Sep 18, 2006 7:42 pm
by mvcallaghan
Hi Bruno,

I do alot of batch runs with Hydrus. I needed to create three files. The first was a batch file, which I simply called run.bat. The run.bat file contains the following text:

copy Path1.txt level_01.dir
copy Path2.txt level_01.dir

,where Path1.txt, Path2.txt are the second aforementioned files, and return.txt is the third file. All three files are located in the hydrus1d program directory.

The contents of Path1.txt (Path2.txt, etc.) is:

C:\Water Balance\Park0001

,which is an example location of the hydrus source/run files.

The contents of return.txt is:


,which is the hexadecimal? code for the return keystroke.

The run.bat file can have as many run paths as you want, and each path must be specified in a PathX.txt file.

To run the batch, simply click on the run.bat file in Windows. The DOS shell should start up automatically.

Good luck,


Posted: Tue Sep 19, 2006 8:12 am
by bruno
Hi whoever goes by the name of mvcallaghan, and thanks for your advice :
i'll keep it in mind for some future occasions,
while i've found a slightly different solution by myself.

concerning the 'return keystroke' problem, instead of typing <0D0A> in return.txt,
i just pressed the return key and that was it, return.txt is apparently composed of
a blank line and in fact of an 'enter sign'...
so the instruction c:\hydrus1d\h1d_clci<return.txt works the way it should.

now about the necessity to create the level_01.dir file :
i sometimes had the corresponding error message, and sometimes not,
could it be related to manipulations made in hydrus input/output files ?

couldn't it be the result of some sort of a 'confusion' in hydrus ?
for example in such a situation : on one hand you run hydrus through
the windows interface and on the other hand you change parameters
directly in input files, and then back again, both processes being active at the same time.

now my batch runs don't need the set of instructions you describe,
and they've been built just after a proper re-definition of the problem,
with newly created input files.

waiting to read from you
thanks again