Skip to content

Commit

Permalink
Add mode='w' to credit.output
Browse files Browse the repository at this point in the history
  • Loading branch information
yingkaisha committed Dec 31, 2024
1 parent 7e21820 commit dec7c1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion credit/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def save_netcdf_increment(
for pres_var in conf["data"]["variables"]:
encoding_dict[pres_var] = conf["predict"]["pressure_var_encoding"]
# Use Dask to write the dataset in parallel
ds_merged.to_netcdf(unique_filename, encoding=encoding_dict)
ds_merged.to_netcdf(unique_filename, mode="w", encoding=encoding_dict)

logger.info(f"Saved forecast hour {forecast_hour} to {unique_filename}")
except Exception:
Expand Down

0 comments on commit dec7c1c

Please sign in to comment.