S5.Weather.solcast_historic#
Script to compile Weather Files from Solcast.
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
Examples
>>> ROAD_FILE = r'Road-SolCast-10km.dat'
>>> CSV_LOC = '.'
>>> tz = pytz.timezone('Australia/Darwin')
>>> START_DATE = datetime.datetime(2019, 10, 13, 0, 0)
>>> END_DATE = datetime.datetime(2019, 10, 20, 23, 0)
>>> START_DATE = tz.localize(START_DATE)
>>> END_DATE = tz.localize(END_DATE)
>>> main(START_DATE, END_DATE, ROAD_FILE, CSV_LOC)
Functions
|
Get the list of Solcast historic CSVs in the folder. |
|
Creates a SolarSim weather file from solcast historic CSVs. |
|
Maps CSVs to distance along the route. |
|
Reads the solcast csv for a single spot. |