Skip to content

Commit 8b46ff9

Browse files
committed
Fix in case 'dz' was actually 0-dimensional
Fixes f49585e "Changes required to load output from a grid-free BOUT.0.nc file, necessary for MMS tests of the differential operators." in case dz was actually zero dimensional, rather than 2-dimensional.
1 parent 7b4d5d3 commit 8b46ff9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xbout/geometries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def apply_geometry(ds, geometry_name, *, coordinates=None, grid=None):
214214
dz = updated_ds["dz"]
215215

216216
z0 = 2 * np.pi * updated_ds.metadata["ZMIN"]
217-
z1 = z0 + nz * dz.data[0, 0]
217+
z1 = z0 + nz * dz.data.flatten()[0]
218218
if not np.all(
219219
np.isclose(
220220
z1,

0 commit comments

Comments
 (0)