multiple runs

A discussion forum for Hydrus-1D users.
Post Reply
bruno
Posts: 4
Joined: Fri Sep 15, 2006 12:13 pm
Location: France

multiple runs

Post by bruno » Fri Sep 15, 2006 7:23 pm

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 :
c:\hydrus1d\h1d_clci.exe

From what i saw, i'm supposed to change it into :
c:\hydrus1d\h1d_clci.exe<return.txt

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

Bruno

Jirka
Posts: 5068
Joined: Sat Mar 16, 2002 3:47 pm
Location: USA
Location: Riverside, CA

Post by Jirka » Fri Sep 15, 2006 8:37 pm

Bruno,

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.

Jirka

bruno
Posts: 4
Joined: Fri Sep 15, 2006 12:13 pm
Location: France

Post by bruno » Sun Sep 17, 2006 1:11 pm

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 "selector.in"

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 "selector.in" and "fit.in"
- 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 !
Bruno

Jirka
Posts: 5068
Joined: Sat Mar 16, 2002 3:47 pm
Location: USA
Location: Riverside, CA

Post by Jirka » Sun Sep 17, 2006 8:33 pm

"Hit Enter at the end" should be enambled in version 3.0. lEnter equal to .false. in the selector.in 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.

Jirka

mvcallaghan
Posts: 21
Joined: Sat Jun 25, 2005 8:33 pm
Location: Canada

Post by mvcallaghan » Mon Sep 18, 2006 7:42 pm

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
H1d_calc<return.txt
copy Path2.txt level_01.dir
H1d_calc<return.txt
...etc.

,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:

<0D0A>

,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,

Mike

bruno
Posts: 4
Joined: Fri Sep 15, 2006 12:13 pm
Location: France

Post by bruno » Tue Sep 19, 2006 8:12 am

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
Bruno

Post Reply