Skip to content

Commit

Permalink
fix for pv no data, format to string
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Oct 23, 2024
1 parent 1749cb6 commit 25d2768
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion india_forecast_app/models/pvnet/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ def _prepare_data_sources(self):

# if generation_da is still empty make nans
if len(generation_da) == 0:
generation_df = pd.DataFrame(index=forecast_timesteps, columns=["0"], data=0.0001)
cols = [str(col) for col in self.generation_data["data"].columns]
generation_df = pd.DataFrame(index=forecast_timesteps, columns=cols, data=0.0001)
generation_da = generation_df.to_xarray()
generation_da.to_netcdf(pv_netcdf_path, engine="h5netcdf")

Expand Down

0 comments on commit 25d2768

Please sign in to comment.