Skip to content

Commit

Permalink
Delete in-memory dataset after saving to reduce mem usage
Browse files Browse the repository at this point in the history
  • Loading branch information
BSchilperoort committed Jun 14, 2024
1 parent 5a9bbcd commit d396e48
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/zampy/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def run(self) -> None:
# e.g. "era5_2010-2020.nc"
fname = f"{dataset_name.lower()}_{time_start}-{time_end}.nc"
ds.to_netcdf(path=self.data_dir / fname, encoding=encoding)
del ds

print(
"Finished running the recipe. Output data can be found at:\n"
Expand Down

0 comments on commit d396e48

Please sign in to comment.