Skip to content

Should not set Scenario["plasma"]["2D_prof"] = [] #7

@WolfgangSuttrop

Description

@WolfgangSuttrop

Hi Severin et al,

ECRadScenario.set_up_profiles_from_imas() is a bit too eager to reset everything to an (empty) list:

for key in self["plasma"]:
self["plasma"][key] = []

for key in self["plasma"]:
self["plasma"][key] = []

E.g. Scenario['plasma']['2D_prof'] should remain a scalar boolean in order to be able to write it to netcdf output later on:

var = rootgrp["Scenario"].createVariable("plasma" + "_" + "2D_prof", "b")
var[...] = int(self["plasma"]["2D_prof"])

I got it to work after rewriting the two loops above as:

for key in ["rhot_prof", "rhop_prof", "Te", "ne"]:
    self["plasma"][key] = []

Greetings,
Wolfgang

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions