Skip to content

Commit

Permalink
use dask for reference lines/pts timeseries data if available
Browse files Browse the repository at this point in the history
  • Loading branch information
thwllms committed Jul 2, 2024
1 parent 75d8656 commit ba8cbad
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/rashdf/plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,13 @@ def reference_timeseries_output(self, reftype: str = "lines") -> xr.Dataset:
group = reference_group.get(var)
if group is None:
continue
values = group[:]
try:
import dask.array as da

# TODO: user-specified chunks?
values = da.from_array(group, chunks=group.chunks)

Check warning on line 973 in src/rashdf/plan.py

View check run for this annotation

Codecov / codecov/patch

src/rashdf/plan.py#L973

Added line #L973 was not covered by tests
except ImportError:
values = group[:]
units = group.attrs["Units"].decode("utf-8")
da = xr.DataArray(
values,
Expand Down

0 comments on commit ba8cbad

Please sign in to comment.