Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
459c0ec
move validate_input to InDat class and rename to check_obsolete_varia…
clmould Aug 27, 2026
5fb7be4
Fix test_main.py failures from moving obsolete var check to InDat class
clmould Aug 27, 2026
eb6548f
check_process unused arg _inputs
clmould Aug 27, 2026
aa9586d
use fileprefix instead of output_prefix
clmould Aug 27, 2026
31d04b1
fix test
clmould Sep 2, 2026
33d381c
remove unused import
clmould Sep 2, 2026
4e2858f
WIP parse_input_file is working
clmould Sep 11, 2026
7a32fe2
fix failing tests - add error message if bounds aren't of the form bo…
clmould Sep 18, 2026
e958f57
inform of duplicate variables and update these in our test files, and…
clmould Sep 21, 2026
82db0ff
remove refs to outdated vars impurity_radiation/imp_rad and vmec
clmould Sep 21, 2026
2480c8b
add missing docstring in input.py
clmould Sep 21, 2026
a56196a
remove unused line number in in_dat/base.py
clmould Sep 21, 2026
5adee89
tidy up variable_constraint_type_check, sort evals, reword error msg
clmould Sep 22, 2026
fe8388f
remove calls to unnecessary function
clmould Sep 22, 2026
1f3a20c
accidentally changed
clmould Sep 22, 2026
d89d0e9
undo mistake
clmould Sep 25, 2026
ac5bacc
inputs , not _inputs
clmould Sep 28, 2026
b35da5d
remove unnecessary code
clmould Oct 1, 2026
9ba607f
check obsolete in read_in_dat, split into smaller fns for checking an…
clmould Oct 22, 2026
a1b4c12
james comments
clmould Oct 22, 2026
caf1a78
create _handle_bounds fn
clmould Oct 23, 2026
7a64938
docstrign
clmould Oct 23, 2026
c8bf2a1
fix pre-commit failure
clmould Oct 23, 2026
ea735bd
remove duplicate vars from example data files
clmould Oct 23, 2026
e2116ac
improve comment
clmould Oct 28, 2026
91d2c8c
split bounds into boundu and boundl arrays, perform additional action…
clmould Oct 29, 2026
643f870
add back error message if bounds are in the wrong form
clmould Oct 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion examples/data/large_tokamak_IN.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,6 @@ f_nd_impurity_electrons(9) = 0.0
f_nd_impurity_electrons(10) = 0.0
f_nd_impurity_electrons(11) = 0.0
f_nd_impurity_electrons(12) = 0.0
f_nd_impurity_electrons(13) = 0.00038
f_nd_impurity_electrons(14) = 0.000005

* Heat transport *
Expand Down
4 changes: 0 additions & 4 deletions examples/data/large_tokamak_varied_min_net_electric_IN.DAT

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this (and examples/data/large_tokamak_varyrun_IN.DAT) changing?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because these are duplicate variables that threw an error as this PR raises an error now when there are duplicate vars

Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,6 @@ radius_plasma_pedestal_temp_norm = 0.94
* Temperature profile index beta (i_plasma_pedestal=1)
tbeta = 2.0

* Electron temperature of pedestal (kev) (i_plasma_pedestal=1)
temp_plasma_separatrix_electron_kev = 5.5

* Electron temperature at separatrix (kev) (i_plasma_pedestal=1)
temp_plasma_separatrix_electron_kev = 0.1

Expand Down Expand Up @@ -449,7 +446,6 @@ f_nd_impurity_electrons(9) = 0.0
f_nd_impurity_electrons(10) = 0.0
f_nd_impurity_electrons(11) = 0.0
f_nd_impurity_electrons(12) = 0.0
f_nd_impurity_electrons(13) = 0.00038
f_nd_impurity_electrons(14) = 0.000005

* Heat transport *
Expand Down
4 changes: 0 additions & 4 deletions examples/data/large_tokamak_varyrun_IN.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,6 @@ radius_plasma_pedestal_temp_norm = 0.94
* Temperature profile index beta (i_plasma_pedestal=1)
tbeta = 2.0

* Electron temperature of pedestal (kev) (i_plasma_pedestal=1)
temp_plasma_separatrix_electron_kev = 5.5

* Electron temperature at separatrix (kev) (i_plasma_pedestal=1)
temp_plasma_separatrix_electron_kev = 0.1

Expand Down Expand Up @@ -450,7 +447,6 @@ f_nd_impurity_electrons(9) = 0.0
f_nd_impurity_electrons(10) = 0.0
f_nd_impurity_electrons(11) = 0.0
f_nd_impurity_electrons(12) = 0.0
f_nd_impurity_electrons(13) = 0.00038
f_nd_impurity_electrons(14) = 0.000005

* Heat transport *
Expand Down
1 change: 0 additions & 1 deletion examples/data/scan_example_file_IN.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ f_nd_impurity_electrons(9) = 0.0
f_nd_impurity_electrons(10) = 0.0
f_nd_impurity_electrons(11) = 0.0
f_nd_impurity_electrons(12) = 0.0
f_nd_impurity_electrons(13) = 0.00038
f_nd_impurity_electrons(14) = 0.000005

* Heat transport *
Expand Down
14 changes: 9 additions & 5 deletions process/core/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from process.core import constants, process_output
from process.core.exceptions import ProcessValidationError
from process.core.input import parse_input_file
from process.core.io.in_dat.base import InDat
from process.core.solver import iteration_variables
from process.core.solver.constraints import ConstraintManager
from process.data_structure.blanket_variables import BlktModelTypes
Expand Down Expand Up @@ -52,7 +53,7 @@
from process.core.data_structure.base import DataStructure


def init_process(data: DataStructure):
def init_process(data: DataStructure, update_obsolete: bool = False):
"""Routine that calls the initialisation routines

This routine calls the main initialisation routines that set
Expand All @@ -65,8 +66,11 @@ def init_process(data: DataStructure):
# Creating and open the files MFile and OUTFile
process_output.OutputFileManager.open_files(data.globals.output_prefix)

# Input any desired new initial values
inputs = parse_input_file(data)
filename = data.globals.fileprefix
# InDat reads in and updates obsolete variables if requested
in_dat = InDat(filename=filename, update_obsolete=update_obsolete)

inputs = parse_input_file(data, in_dat)

# Set active constraints
set_active_constraints(data)
Expand All @@ -75,7 +79,7 @@ def init_process(data: DataStructure):
set_device_type(data)

# Check input data for errors/ambiguities
check_process(inputs, data)
check_process(data, inputs)

run_summary(data)
Comment thread
je-cook marked this conversation as resolved.

Expand Down Expand Up @@ -245,7 +249,7 @@ def run_summary(data: DataStructure):
)


def check_process(inputs, data): # noqa: ARG001
def check_process(data, _inputs):
"""Routine to reset specific variables if certain options are
being used

Expand Down
Loading
Loading