Skip to content

[BUG] Running --full-output on an evaluation-mode IN.DAT fails #3843

@timothy-nunn

Description

@timothy-nunn

Describe the bug

Running an evaluation-mode input file with the --full-output flag causes PROCESS to crash.

Steps to reproduce

Run process -i tests/regression/input_files/large_tokamak_eval.IN.DAT --full-output

Expected behaviour

The command does not crash and a summary PDF file is written to the same directory as the IN.DAT

Evidence

Traceback from the above command:

The IN.DAT file does not contain any obsolete variables.
/home/ubuntu/PROCESS/process/init.py:94: UserWarning: temp_cs_superconductor_margin_min and tmargmin should not both be specified in IN.DAT temp_cs_superconductor_margin_min has been ignored
  check_process(inputs)
Solving equality constraints using fsolve
/home/ubuntu/PROCESS/process/physics.py:7292: RuntimeWarning: divide by zero encountered in scalar divide
  * (neped / n_greenwald) ** -0.174
/home/ubuntu/PROCESS/process/costs.py:3030: RuntimeWarning: invalid value encountered in sqrt
  annoam = cost_variables.ucoam[cost_variables.lsa - 1] * np.sqrt(
/home/ubuntu/PROCESS/process/costs.py:3101: RuntimeWarning: invalid value encountered in sqrt
  annwst = cost_variables.ucwst[cost_variables.lsa - 1] * np.sqrt(
******************************************** Errors and Warnings *********************************************
(/home/ubuntu/PROCESS/process/physics.py:6245) Diamagnetic fraction is more than 1%, but not calculated. Consider using i_diamagnetic_current=2 and i_pfirsch_schluter_current=1

(/home/ubuntu/PROCESS/process/tf_coil.py:246) dr_tf_plasma_case to small to accommodate the WP, forced to minimum value

(/home/ubuntu/PROCESS/process/pfcoil.py:2911) CS not using max current density: further optimisation may be possible
Plotting mfile /home/ubuntu/PROCESS/tests/regression/input_files/large_tokamak_eval.MFILE.DAT
Traceback (most recent call last):
  File "/home/ubuntu/PROCESS/.venv/bin/process", line 8, in <module>
    sys.exit(main())
  File "/home/ubuntu/PROCESS/process/main.py", line 747, in main
    Process(args)
  File "/home/ubuntu/PROCESS/process/main.py", line 124, in __init__
    self.post_process()
  File "/home/ubuntu/PROCESS/process/main.py", line 246, in post_process
    plot_proc.main(args=["-f", mfile_str])
  File "/home/ubuntu/PROCESS/process/io/plot_proc.py", line 10327, in main
    main_plot(
  File "/home/ubuntu/PROCESS/process/io/plot_proc.py", line 9888, in main_plot
    plot_header(plot_1, m_file_data, scan)
  File "/home/ubuntu/PROCESS/process/io/plot_proc.py", line 6597, in plot_header
    f"!{OBJECTIVE_NAMES[abs(int(mfile_data.data['minmax'].get_scan(-1)))]}",
KeyError: 0

Environment

  • OS: Ubuntu
  • Version: 3.1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions