Skip to content

Commit af962d5

Browse files
committed
Add more data from the grid
The forward/backward_{R,Z} are needed for field line tracing
1 parent f08d14d commit af962d5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

xbout/geometries.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,16 @@ def add_s_alpha_geometry_coords(ds, *, coordinates=None, grid=None):
495495
@register_geometry("fci")
496496
def add_fci_geometry_coords(ds, *, coordinates=None, grid=None):
497497
assert coordinates is None, "Not implemented"
498-
ds = _add_vars_from_grid(ds, grid, ["R", "Z"])
498+
499+
keys = sum(
500+
[
501+
[f"{pre}R", f"{pre}Z", f"{pre}xt_prime", f"{pre}zt_prime"]
502+
for pre in ["forward_", "backward_"]
503+
],
504+
[],
505+
)
506+
507+
ds = _add_vars_from_grid(ds, grid, ["R", "Z"], optional_variables=keys + ["B"])
499508
ds = ds.set_coords(("R", "Z"))
500509
ds = _create_single_region(ds, periodic_y=True)
501510
return ds

0 commit comments

Comments
 (0)