Skip to content

Commit

Permalink
change to power_kw
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Oct 23, 2024
1 parent d9ffda6 commit 52d7a8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions india_forecast_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def get_generation_data(

if len(generation_data) == 0:
log.warning("No generation found for the specified sites/period")
generation_df = pd.DataFrame()
generation_df = pd.DataFrame(columns=[system_id])

else:
# Convert to dataframe
Expand Down Expand Up @@ -130,7 +130,7 @@ def get_generation_data(
generation_df[col] = generation_df[col].astype(float) * 1e3\

# rename columns 0 to power_kw
generation_df.rename({col:"power_kw"}, inplace=True)
generation_df.rename({col:"power_kw"}, axis=1, inplace=True)

# Site metadata dataframe
sites_df = pd.DataFrame(
Expand Down
2 changes: 1 addition & 1 deletion india_forecast_app/models/pvnet/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ 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)
generation_df = pd.DataFrame(index=forecast_timesteps, columns=generation_da.columns, data=0.0001)

Check failure on line 244 in india_forecast_app/models/pvnet/model.py

View workflow job for this annotation

GitHub Actions / lint_and_test / Lint the code and run the tests

Ruff (E501)

india_forecast_app/models/pvnet/model.py:244:101: E501 Line too long (114 > 100)
generation_da = generation_df.to_xarray()
generation_da.to_netcdf(wind_netcdf_path, engine="h5netcdf")

Expand Down

0 comments on commit 52d7a8e

Please sign in to comment.