S5.Weather.solcast_historic.main#

S5.Weather.solcast_historic.main(start_date: ~datetime.datetime, end_date: ~datetime.datetime, RoadFile: str | ~os.PathLike, csv_location: [<class 'str'>, <class 'os.PathLike'>], output_file: [<class 'str'>, <class 'os.PathLike'>] = 'Weather-SolCast-temp.dat') None[source]#

Creates a SolarSim weather file from solcast historic CSVs.

Requires the CSVs from SolCast and a “road file” with columns [‘Distance (km)’, ‘Latitude’, ‘Longitude’] to maps the CSVs to distances along the route. The Road file can have extra points but each CSV file have to have a point specified in the Road file or else a warning will be raised and the row that does not have data in the road file will be omitted.

The Solcast historic CSVs should be named in the format of {lat}_{lon}_Solcast_{sample_mode}.csv

Parameters:
  • start_date – The start date and time for the output file with timezone info.

  • end_date – The end date and time for the output file with timezone info.

  • RoadFile – Path the the road file used to map the CSVs to distance along the route. Must have the following columns: [‘Distance (km)’, ‘Latitude’, ‘Longitude’]

  • csv_location – Path to the parent folder that contains all the CSVs, the CSVs can be stored in subfolders in this location.

  • output_file – Path and name to write the output weather file. Example: ‘outputWeather-Solcast-20221217.dat’

Returns:

Creates the weather file at the location specified by output_file.