Skip to content

Commit

Permalink
simplified the steps in Readme file (#208)
Browse files Browse the repository at this point in the history
* simplified the steps in Readme file

Signed-off-by: sumana sree <[email protected]>

* Copied forecast_csv.py file into scripts directory

Signed-off-by: sumana sree <[email protected]>

* added the specific code to the forecast_csv.py file

Signed-off-by: sumana sree <[email protected]>

* removed lines from quartz_solar_forecast/utils/forecast_csv.py files

Signed-off-by: sumana sree <[email protected]>

---------

Signed-off-by: sumana sree <[email protected]>
  • Loading branch information
sumana-2705 authored Oct 25, 2024
1 parent ba2c668 commit 98f9dd3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,10 @@ A colab notebook providing some examples can be found [here](https://colab.resea

To generate solar forecasts and save them into a CSV file, follow these steps:

1. Navigate to the scripts directory
- Run the forecast_csv.py script with desired inputs

```bash
cd scripts
```

2. Run the forecast_csv.py script with desired inputs

```bash
python forecast_csv.py
python scripts/forecast_csv.py
```

Replace the --init_time_freq, --start_datetime, --end_datetime, and --site_name with your desired forecast initialization frequency (in hours), start datetime, end datetime, and the name of the forecast or site, respectively.
Expand Down
12 changes: 0 additions & 12 deletions quartz_solar_forecast/utils/forecast_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,6 @@ def write_out_forecasts(init_time_freq, start_datetime, end_datetime, site_name,
all_forecasts.to_csv(output_file_path, index=False)
print(f"Forecasts saved to {output_file_path}")

if __name__ == "__main__":
# please change the site name, start_datetime and end_datetime, latitude, longitude and capacity_kwp as per your requirement
write_out_forecasts(
init_time_freq=6,
start_datetime="2024-03-10 00:00:00",
end_datetime="2024-03-11 00:00:00",
site_name="Test",
latitude=51.75,
longitude=-1.25,
capacity_kwp=1.25
)

class TestGenerateForecast(unittest.TestCase):
def setUp(self):
self.site_name = "TestCase"
Expand Down
11 changes: 11 additions & 0 deletions scripts/forecast_csv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if __name__ == "__main__":
# please change the site name, start_datetime and end_datetime, latitude, longitude and capacity_kwp as per your requirement
write_out_forecasts(
init_time_freq=6,
start_datetime="2024-03-10 00:00:00",
end_datetime="2024-03-11 00:00:00",
site_name="Test",
latitude=51.75,
longitude=-1.25,
capacity_kwp=1.25
)

0 comments on commit 98f9dd3

Please sign in to comment.