Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use open_dataset if single file #1042

Merged
merged 7 commits into from
Feb 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Next Next commit
Use open_dataset if single file
Update xcdat_openxml.py to use `open_dataset` instead of `open_mfdataset` to save memory, considering discussions at #1041 (comment)
  • Loading branch information
lee1043 committed Feb 1, 2024
commit 140353d94ebf1c568eb1f7c4efe7a6abf7d8cc37
2 changes: 1 addition & 1 deletion pcmdi_metrics/io/xcdat_openxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def xcdat_open(infile, data_var=None, decode_times=True):
if infile.split(".")[-1].lower() == "xml":
ds = xcdat_openxml(infile, data_var=data_var, decode_times=decode_times)
else:
ds = xcdat.open_mfdataset(
ds = xcdat.open_dataset(
infile, data_var=data_var, decode_times=decode_times
)

Expand Down