Skip to content

Commit

Permalink
Fix in case 'dz' was actually 0-dimensional
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
johnomotani committed Jan 15, 2025
1 parent 7b4d5d3 commit 8b46ff9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xbout/geometries.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def apply_geometry(ds, geometry_name, *, coordinates=None, grid=None):
dz = updated_ds["dz"]

z0 = 2 * np.pi * updated_ds.metadata["ZMIN"]
z1 = z0 + nz * dz.data[0, 0]
z1 = z0 + nz * dz.data.flatten()[0]
if not np.all(
np.isclose(
z1,
Expand Down

0 comments on commit 8b46ff9

Please sign in to comment.