Skip to content

Commit 8253e22

Browse files
committed
If reloading, pass Dataset's values of keep_x/yboundaries to _open_grid
When reloading, the values of the keep_xboundaries and keep_yboundaries arguments are ignored when opening the Dataset, so we need to get these settings from the Dataset's metadata to pass to _open_grid() if it is necessary to open a grid file, rather than using the values from the arguments.
1 parent 6d3c550 commit 8253e22

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xbout/load.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ def attrs_remove_section(obj, section):
192192
grid = _open_grid(
193193
gridfilepath,
194194
chunks=chunks,
195-
keep_xboundaries=keep_xboundaries,
196-
keep_yboundaries=keep_yboundaries,
195+
keep_xboundaries=ds.metadata["keep_xboundaries"],
196+
keep_yboundaries=ds.metadata["keep_yboundaries"],
197197
mxg=ds.metadata["MXG"],
198198
)
199199
else:

0 commit comments

Comments
 (0)