1import pvlib
2from pvlib import clearsky, atmosphere, solarposition
3from pvlib.location import Location
4from pvlib.iotools import read_tmy3
5import pandas as pd
6import matplotlib.pyplot as plt
7
8#Example to get clear sky model
9tus = Location(32.2, -111, 'US/Arizona', 700, 'Tucson')
10
11times = pd.date_range(start='2016-07-01', end='2016-07-04', freq='1min', tz=tus.tz)
12
13cs = tus.get_clearsky(times) #returns dataframe
14