Skip to content

Variables being used before being set #4638

Open

Description

@timothy-nunn

Using #4617 it is now possible to track when a variable on the data structure is used or edited. This means that-with minimal codes edits-one can flag when a variable is edited for the first time after it has already been used. In future we can also do more complex checks such as verifying variables are not edited, used, and then edited again (in general, I cannot imagine a valid use for a variable taking multiple values through the course of a single model evaluation).

This issue will track the current issues flagged from the large tokamak and ST eval files. These variables are edited once they have already been used at least once.

Activity

  1. timothy-nunn commented on Oct 1, 2026

    @timothy-nunn
    CollaboratorAuthor

    eta_turbine

    Was being called like:

    data.eta_turbine = calculate_eta(data.eta_turbine)

    because calculate_eta will either:

    • Return data.eta_turbine if the eta calculation model is USER_INPUT.
    • Calculate eta_turbine from some scaling (discarding the default data.eta_turbine).

    f_c_plasma_bootstrap

    Similar to eta_turbine where the default/user-defined is passed to the calculating function in case the model flag is set to USER_INPUT.

  2. self-assigned this
    on Oct 1, 2026
  3. added theissue type on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

epicEpic issue

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions