Skip to content

Commit

Permalink
Add time dimension on SSA tas output
Browse files Browse the repository at this point in the history
Needed so ncview can plot graph.

Fixes #114
  • Loading branch information
rgieseke committed Dec 13, 2024
1 parent 2544397 commit dc6f91b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions attrici/ssa.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ def ssa(filename, variable, window_size, subset, output):
)

output_dataset = xr.Dataset(
data_vars={variable: ssa_values},
coords={"time": ssa_times},
data_vars={
variable: xr.DataArray(
ssa_values, coords={"time": ssa_times}, dims=("time",)
)
},
attrs=get_data_provenance_metadata(
input_file=Path(filename).name,
subset=subset,
Expand Down

0 comments on commit dc6f91b

Please sign in to comment.