Hi Julien,
The SCALE runtime environment variables, RTNDIR, INPDIR, and OUTDIR can be very subtle. I will try to explain how they work.
RTNDIR - this is the directory to which your command prompt will return control once scale has completed execution of your input.
INPDIR - this is the directory in which your input file exists.
OUTDIR - this is the directory in which your output file will exist. This can be changed via the '-o' option.
E.g., here is an example command prompt invocation of scale :
current_working_dir> /path/to/scalerte /path/to/input_dir/input.inp -o /path/to/output_dir/desired_output
Here current_working_dir is RTNDIR.
INPDIR is /path/to/input_dir, and OUTDIR is /path/to/output_dir.
By default, INPDIR equals OUTDIR. In your scenario, the current working directory is the input directory, making RTNDIR equal INPDIR.
Something to note, as an additional convenience variable, OUTBASE is provided to allow copying results alongside the formal output. In the example above OUTBASE is /path/to/output_dir/desired_output, which is the absolute output file path, minus the 'out' extension. This allows you to have a shell command in your input to copy your f71 back alongside your output.
=shell
cp f71f001 ${OUTBASE}.f71
end
As a best practice, use OUTDIR or OUTBASE to return additional files. In this way, if a colleague runs your input, and decides to change the output directory (via '-o') the generated results of interest will be returned to where the user wants output to be placed.
Hope this helps.
Best regards,
Rob Lefebvre