diff --git a/xcompact3d_toolbox/io.py b/xcompact3d_toolbox/io.py index 0472015..1b9451d 100644 --- a/xcompact3d_toolbox/io.py +++ b/xcompact3d_toolbox/io.py @@ -716,7 +716,9 @@ def is_velocity(name): dataset["phi"] = ( stack_variables(scalar_variables, stack_scalar=False) .to_array(dim="n") - .assign_coords(n=[int(var[-1]) for var in scalar_variables]) + .assign_coords( + n=[int(v[-self.filename_properties.scalar_num_of_digits :]) for v in scalar_variables] + ) ) set_of_variables -= set(scalar_variables)