I am trying to run PEST 12.1.0 on a FEFLOW 6.0 model.
I get the following error when initiating PEST:
[quote]
Error condition prevents continued PEST execution:-
Cannot open model output file
[/quote]
[b]Source of error[/b]
FEFLOW writes ASCII .fem files using UNIX type newlines (LF) and PEST needs Windows type newlines CR/LF.
A .fem file was edited and used for "PEST template file" i.e. using UNIX type newlines.
When PEST atempts to write a new .fem file for the first model run, it fails and returns an empty 0K file.
FEFLOW can't load the .fem file since it "empty" (0K) and exits with an unexpected EOF error.
PEST running independantly asumes the model has completed first run and tries to access the result file "output.dar".
Output.dar is not there since the model-run has not been completed.
Hence, the error
[b]Resolution[/b]
If your "PEST template file" was based on a FEFLOW .fem file, all newlines must be converted from LF -> CRLF
This you have to do when generating the file.
When running PEST it initiates FEFLOW several consecutive times, each time producing a new .fem and .dar/.dac file.
All newlines in these files must be converted from LF -> CRLF prior to PEST accessing the files.
Do this in the batch file you specify under "*model command line" in the "PEST control file"
To do the actual conversion you can write a small routine or include this nifty tool in your PATH:
[url=http://www.stahlforce.com/dev/index.php?tool=remcrlf&back=dev]http://www.stahlforce.com/dev/index.php?tool=remcrlf&back=dev[/url]
For your reference here is my batch file:
[code]
@echo off
start /min /wait "" "sfk" lf-to-crlf -dir femdata -file .fem -norec
start /min /wait "" "C:\Program Files\WASY\FEFLOW 6.0\bin64\feflow60c.exe" -work C:\Users\XXX\Desktop\PEST_Calibration\ -ascii -dar output.dar input.fem
start /min /wait "" "sfk" lf-to-crlf -dir results -file .dar -norec
[/code]
Cheers,