Skip to content

Commit

Permalink
Make it more clear that value is a dataframe
Browse files Browse the repository at this point in the history
  • Loading branch information
jsmariegaard committed Nov 19, 2023
1 parent 039a459 commit dd37619
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modelskill/comparison/_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,11 +671,11 @@ def save(self, filename: Union[str, Path]) -> None:
if self.gtype == "point":
ds = self.data.copy() # copy needed to avoid modifying self.data

for key, value in self.raw_mod_data.items():
value = value.copy()
for key, df in self.raw_mod_data.items():
df = df.copy()
# rename time to unique name
value.index.name = "_time_raw_" + key
da = value.to_xarray()[key]
df.index.name = "_time_raw_" + key
da = df.to_xarray()[key]
ds["_raw_" + key] = da

ds.to_netcdf(filename)
Expand Down

0 comments on commit dd37619

Please sign in to comment.