Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions xbout/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,15 +738,7 @@ def _expand_filepaths(datapath):
if not filepaths:
raise IOError("No datafiles found matching datapath={}".format(datapath))

if len(filepaths) > 128:
warn(
"Trying to open a large number of files - setting xarray's"
" `file_cache_maxsize` global option to {} to accommodate this. "
"Recommend using `xr.set_options(file_cache_maxsize=NUM)`"
" to explicitly set this to a large enough value.".format(
str(len(filepaths))
)
)
if len(filepaths) > xr.get_options().get("file_cache_maxsize", 128):
xr.set_options(file_cache_maxsize=len(filepaths))

return filepaths, filetype
Expand Down
Loading