-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
I tried to load a JETTO IMAS geometry IDS and it threw a Pydantic ValidationError that was difficult to trace.
pydantic_core._pydantic_core.ValidationError: 1 validation error for ToraxConfig
Value error, operands could not be broadcast together with shapes (70,) (0,) [type=value_error, input_value={'plasma_composition': {}...alculator_type': 'chi'}}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.11/v/value_error
After a bit of debugging, I found that it's due to a missing j_phi value in this line:
| jtor = -1 * IMAS_data.profiles_1d.j_phi |
Upstream, I'm making sure j_phi is present in JETTO IMAS outputs, so it shouldn't be an issue long-term. Nevertheless I think there are QoL changes we can make in TORAX to save time in future: we should add a check in all the IMAS loaders that asserts all the required profiles are there, and uses alternative definitions if they are not.
Metadata
Metadata
Assignees
Labels
No labels