diff --git a/README.md b/README.md index b1fd94ae..11402ff2 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/quartz_solar_forecast/utils/forecast_csv.py b/quartz_solar_forecast/utils/forecast_csv.py index 7bfdf1be..8d0c28e6 100644 --- a/quartz_solar_forecast/utils/forecast_csv.py +++ b/quartz_solar_forecast/utils/forecast_csv.py @@ -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" diff --git a/scripts/forecast_csv.py b/scripts/forecast_csv.py new file mode 100644 index 00000000..4d10fa13 --- /dev/null +++ b/scripts/forecast_csv.py @@ -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 + ) \ No newline at end of file