diff --git a/xbout/geometries.py b/xbout/geometries.py index 6774c4fa..fa8a67b6 100644 --- a/xbout/geometries.py +++ b/xbout/geometries.py @@ -194,7 +194,14 @@ def apply_geometry(ds, geometry_name, *, coordinates=None, grid=None): can_use_1d_z_coord = (nz == 1) or use_metric_3d if can_use_1d_z_coord: - z = _1d_coord_from_spacing(updated_ds["dz"], zcoord, updated_ds) + if updated_ds.geometry == "fci": + # dz is varying. just set to a linspace + z = xr.DataArray( + np.linspace(start=0, stop=2 * np.pi, num=nz, endpoint=False), + dims=zcoord, + ) + else: + z = _1d_coord_from_spacing(updated_ds["dz"], zcoord, updated_ds) else: if bout_v5: if not np.all(updated_ds["dz"].min() == updated_ds["dz"].max()): diff --git a/xbout/plotting/utils.py b/xbout/plotting/utils.py index a7fa7eda..0c09226e 100644 --- a/xbout/plotting/utils.py +++ b/xbout/plotting/utils.py @@ -64,6 +64,8 @@ def plot_separatrix(da, sep_pos, ax, radial_coord="x"): def _decompose_regions(da): + if da.geometry == "fci": + return {region: da for region in da.bout._regions} return { region: da.bout.from_region(region, with_guards=1) for region in da.bout._regions