This tutorial will walk through forecast data from Unidata forecast model data using the forecast.py module within pvlib.
Table of contents:
This tutorial has been tested against the following package versions:
It should work with other Python and Pandas versions. It requires pvlib >= 0.3.0 and IPython >= 3.0.
Authors:
%matplotlib inline
import matplotlib.pyplot as plt
# built in python modules
import datetime
import os
# python add-ons
import numpy as np
import pandas as pd
# for accessing UNIDATA THREDD servers
from siphon.catalog import TDSCatalog
from siphon.ncss import NCSS
import pvlib
from pvlib.forecast import GFS, HRRR_ESRL, NAM, NDFD, HRRR, RAP
/Users/holmgren/git_repos/pvlib-python/pvlib/forecast.py:22: UserWarning: The forecast module algorithms and features are highly experimental. The API may change, the functionality may be consolidated into an io module, or the module may be separated into its own package. 'module, or the module may be separated into its own package.')
# Choose a location and time.
# Tucson, AZ
latitude = 32.2
longitude = -110.9
tz = 'America/Phoenix'
start = pd.Timestamp(datetime.date.today(), tz=tz) # today's date
end = start + pd.Timedelta(days=7) # 7 days from today
print(start, end)
2018-11-02 00:00:00-07:00 2018-11-09 00:00:00-07:00
from pvlib.forecast import GFS, HRRR_ESRL, NAM, NDFD, HRRR, RAP
# GFS model, defaults to 0.5 degree resolution
fm = GFS()
# retrieve data
data = fm.get_data(latitude, longitude, start, end)
data
Total_cloud_cover_middle_cloud_Mixed_intervals_Average | Total_cloud_cover_low_cloud_Mixed_intervals_Average | Total_cloud_cover_high_cloud_Mixed_intervals_Average | Total_cloud_cover_convective_cloud | Wind_speed_gust_surface | Total_cloud_cover_boundary_layer_cloud_Mixed_intervals_Average | Total_cloud_cover_entire_atmosphere_Mixed_intervals_Average | Downward_Short-Wave_Radiation_Flux_surface_Mixed_intervals_Average | Temperature_surface | u-component_of_wind_isobaric | v-component_of_wind_isobaric | |
---|---|---|---|---|---|---|---|---|---|---|---|
2018-11-02 09:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 0.509245 | 0.0 | 0.0 | 0.0 | 283.200012 | 0.321284 | 0.248196 |
2018-11-02 12:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 2.101461 | 0.0 | 0.0 | 0.0 | 282.005310 | -1.861433 | 1.069207 |
2018-11-02 15:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 2.566809 | 0.0 | 0.0 | 40.0 | 287.624451 | -2.283450 | 1.166477 |
2018-11-02 18:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 1.747412 | 0.0 | 0.0 | 270.0 | 305.084930 | -0.873062 | -1.077307 |
2018-11-02 21:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 1.246185 | 0.0 | 0.0 | 710.0 | 306.769226 | 0.287397 | -1.644556 |
2018-11-03 00:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 2.926880 | 0.0 | 0.0 | 539.0 | 293.770508 | 1.493616 | -2.456653 |
2018-11-03 03:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 2.140588 | 0.0 | 0.0 | 10.0 | 287.340759 | 1.216316 | -1.649683 |
2018-11-03 06:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 1.374021 | 0.0 | 0.0 | 3.0 | 285.443115 | 0.928799 | -1.032666 |
2018-11-03 09:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 0.572020 | 0.0 | 0.0 | 0.0 | 283.886292 | 0.632527 | -0.077568 |
2018-11-03 12:00:00-07:00 | 0.0 | 0.0 | 7.0 | 0.0 | 1.071779 | 0.0 | 7.0 | 0.0 | 282.712952 | 0.219133 | 1.064648 |
2018-11-03 15:00:00-07:00 | 0.0 | 0.0 | 53.0 | 0.0 | 1.151157 | 0.0 | 53.0 | 40.0 | 288.890228 | 0.408652 | 1.033374 |
2018-11-03 18:00:00-07:00 | 0.0 | 0.0 | 27.0 | 0.0 | 2.360601 | 0.0 | 27.0 | 270.0 | 305.124481 | 1.640059 | -1.076890 |
2018-11-03 21:00:00-07:00 | 0.0 | 0.0 | 14.0 | 0.0 | 4.708416 | 0.0 | 14.0 | 710.0 | 305.600006 | 2.733889 | -3.454663 |
2018-11-04 00:00:00-07:00 | 0.0 | 0.0 | 26.0 | 0.0 | 3.523193 | 0.0 | 26.0 | 533.0 | 294.051270 | 1.649866 | -3.089185 |
2018-11-04 03:00:00-07:00 | 0.0 | 0.0 | 46.0 | 0.0 | 1.514648 | 0.0 | 46.0 | 0.0 | 287.700012 | -0.697839 | -1.365325 |
2018-11-04 06:00:00-07:00 | 0.0 | 0.0 | 44.0 | 0.0 | 1.152758 | 0.0 | 44.0 | 2.0 | 285.899994 | -1.049470 | 0.545586 |
2018-11-04 09:00:00-07:00 | 0.0 | 0.0 | 46.0 | 0.0 | 2.356604 | 0.0 | 46.0 | 0.0 | 284.810730 | -1.466980 | 1.786052 |
2018-11-04 12:00:00-07:00 | 0.0 | 0.0 | 41.0 | 0.0 | 2.826129 | 0.0 | 41.0 | 0.0 | 283.843323 | -2.158870 | 1.795879 |
2018-11-04 15:00:00-07:00 | 0.0 | 0.0 | 27.0 | 0.0 | 3.169250 | 0.0 | 27.0 | 40.0 | 289.024475 | -2.274209 | 2.261697 |
2018-11-04 18:00:00-07:00 | 0.0 | 0.0 | 45.0 | 0.0 | 1.763808 | 0.0 | 45.0 | 260.0 | 306.151184 | -1.100332 | 0.939270 |
2018-11-04 21:00:00-07:00 | 0.0 | 0.0 | 95.0 | 0.0 | 2.146554 | 0.0 | 95.0 | 690.0 | 307.814697 | 1.629412 | -0.721243 |
2018-11-05 00:00:00-07:00 | 0.0 | 0.0 | 94.0 | 0.0 | 2.463193 | 0.0 | 94.0 | 511.0 | 294.838989 | 1.237690 | -2.088997 |
2018-11-05 03:00:00-07:00 | 0.0 | 0.0 | 98.0 | 0.0 | 1.315201 | 0.0 | 98.0 | 0.0 | 289.377838 | 0.909243 | -0.954854 |
2018-11-05 06:00:00-07:00 | 0.0 | 0.0 | 89.0 | 0.0 | 1.026335 | 0.0 | 89.0 | 0.0 | 286.921570 | 0.460945 | 0.936082 |
2018-11-05 09:00:00-07:00 | 0.0 | 0.0 | 79.0 | 0.0 | 3.603965 | 0.0 | 79.0 | 0.0 | 286.243103 | 0.255286 | 3.636492 |
2018-11-05 12:00:00-07:00 | 0.0 | 0.0 | 76.0 | 0.0 | 3.604748 | 0.0 | 76.0 | 0.0 | 285.357544 | 0.452583 | 3.615623 |
2018-11-05 15:00:00-07:00 | 0.0 | 0.0 | 79.0 | 0.0 | 3.866772 | 0.0 | 79.0 | 40.0 | 289.606567 | 0.111267 | 3.920405 |
2018-11-05 18:00:00-07:00 | 0.0 | 0.0 | 57.0 | 0.0 | 2.733521 | 0.0 | 57.0 | 260.0 | 306.215149 | 2.091413 | 1.216067 |
2018-11-05 21:00:00-07:00 | 0.0 | 0.0 | 4.0 | 0.0 | 4.830916 | 0.0 | 4.0 | 690.0 | 307.245056 | 3.748376 | -1.685737 |
2018-11-06 00:00:00-07:00 | 0.0 | 0.0 | 2.0 | 0.0 | 3.529985 | 0.0 | 2.0 | 523.0 | 295.100006 | 2.017678 | -2.903557 |
2018-11-06 03:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 0.727948 | 0.0 | 0.0 | 0.0 | 288.700012 | -0.460249 | 0.511001 |
2018-11-06 06:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 3.419800 | 0.0 | 0.0 | 2.0 | 287.799988 | 0.132358 | 3.478513 |
2018-11-06 09:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 3.582272 | 0.0 | 0.0 | 0.0 | 286.571228 | -0.256680 | 3.540156 |
2018-11-06 12:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 3.536086 | 0.0 | 0.0 | 0.0 | 285.474060 | -0.606082 | 3.510757 |
2018-11-06 15:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 3.320961 | 0.0 | 0.0 | 40.0 | 289.919769 | -1.383687 | 3.044175 |
2018-11-06 18:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 3.325786 | 0.0 | 0.0 | 260.0 | 306.602997 | 0.757739 | 2.586909 |
2018-11-06 21:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 4.839661 | 0.0 | 0.0 | 690.0 | 308.386230 | 3.486965 | 0.656064 |
2018-11-07 00:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 3.001238 | 0.0 | 0.0 | 518.0 | 295.891174 | 2.979077 | 0.190244 |
2018-11-07 03:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 3.470465 | 0.0 | 0.0 | 0.0 | 289.968536 | 0.578005 | 3.448342 |
2018-11-07 06:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 3.624177 | 0.0 | 0.0 | 0.0 | 288.402130 | 0.099385 | 3.647139 |
2018-11-07 09:00:00-07:00 | 0.0 | 0.0 | 50.0 | 0.0 | 3.600990 | 0.0 | 50.0 | 0.0 | 286.931458 | -0.753401 | 3.468896 |
2018-11-07 12:00:00-07:00 | 0.0 | 0.0 | 36.0 | 0.0 | 3.554950 | 0.0 | 36.0 | 0.0 | 285.600006 | -1.497290 | 3.251965 |
2018-11-07 15:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 3.763672 | 0.0 | 0.0 | 30.0 | 289.806976 | -1.518066 | 3.383196 |
2018-11-07 18:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 5.027164 | 0.0 | 0.0 | 250.0 | 305.702606 | 2.043696 | 3.762322 |
2018-11-07 21:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 6.746543 | 0.0 | 0.0 | 680.0 | 306.844147 | 4.986064 | 3.533125 |
2018-11-08 00:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 4.311862 | 0.0 | 0.0 | 515.0 | 295.200012 | 3.028718 | 2.928757 |
2018-11-08 03:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 3.811176 | 0.0 | 0.0 | 0.0 | 289.557983 | 0.952781 | 3.696282 |
2018-11-08 06:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 4.210182 | 0.0 | 0.0 | 0.0 | 287.999969 | 0.036875 | 4.183887 |
2018-11-08 09:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 3.639336 | 0.0 | 0.0 | 0.0 | 286.099976 | -0.436121 | 3.582537 |
2018-11-08 12:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 2.672265 | 0.0 | 0.0 | 0.0 | 284.617737 | -0.556318 | 2.647986 |
2018-11-08 15:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 2.467602 | 0.0 | 0.0 | 30.0 | 289.146118 | -0.924136 | 2.310430 |
2018-11-08 18:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 0.530189 | 0.0 | 0.0 | 250.0 | 306.295990 | -0.258433 | -0.437168 |
2018-11-08 21:00:00-07:00 | 0.0 | 0.0 | 0.0 | 0.0 | 2.112109 | 0.0 | 0.0 | 680.0 | 307.200012 | 0.968513 | -1.746221 |
2018-11-09 00:00:00-07:00 | 0.0 | 0.0 | 18.0 | 0.0 | 4.204587 | 0.0 | 18.0 | 506.0 | 294.224915 | -0.838682 | -3.936433 |
data = fm.process_data(data)
data[['ghi', 'dni', 'dhi']].plot()
<matplotlib.axes._subplots.AxesSubplot at 0x122830940>
cs = fm.location.get_clearsky(data.index)
fig, ax = plt.subplots()
cs['ghi'].plot(ax=ax, label='ineichen')
data['ghi'].plot(ax=ax, label='gfs+larson')
ax.set_ylabel('ghi')
ax.legend()
<matplotlib.legend.Legend at 0x1249ddba8>
fig, ax = plt.subplots()
cs['dni'].plot(ax=ax, label='ineichen')
data['dni'].plot(ax=ax, label='gfs+larson')
ax.set_ylabel('ghi')
ax.legend()
<matplotlib.legend.Legend at 0x124aba470>
# retrieve data
data = fm.get_processed_data(latitude, longitude, start, end)
data
temp_air | wind_speed | ghi | dni | dhi | total_clouds | low_clouds | mid_clouds | high_clouds | |
---|---|---|---|---|---|---|---|---|---|
2018-11-02 09:00:00-07:00 | 10.050018 | 0.405986 | 407.358602 | 818.731315 | 60.841352 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 12:00:00-07:00 | 8.855316 | 2.146657 | 711.945346 | 899.784644 | 99.890062 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 15:00:00-07:00 | 14.474457 | 2.564139 | 448.721044 | 838.526803 | 64.338163 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 18:00:00-07:00 | 31.934937 | 1.386660 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 21:00:00-07:00 | 33.619232 | 1.669479 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 00:00:00-07:00 | 20.620514 | 2.875071 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 03:00:00-07:00 | 14.190765 | 2.049604 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 06:00:00-07:00 | 12.293121 | 1.388908 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 09:00:00-07:00 | 10.736298 | 0.637265 | 403.560574 | 817.693817 | 60.445428 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 12:00:00-07:00 | 9.562958 | 1.086966 | 675.605949 | 805.179960 | 131.125563 | 7.0 | 0.0 | 0.0 | 7.0 |
2018-11-03 15:00:00-07:00 | 15.740234 | 1.111242 | 291.617718 | 213.596630 | 194.488428 | 53.0 | 0.0 | 0.0 | 53.0 |
2018-11-03 18:00:00-07:00 | 31.974487 | 1.962010 | 0.000000 | 0.000000 | 0.000000 | 27.0 | 0.0 | 0.0 | 27.0 |
2018-11-03 21:00:00-07:00 | 32.450012 | 4.405548 | 0.000000 | 0.000000 | 0.000000 | 14.0 | 0.0 | 0.0 | 14.0 |
2018-11-04 00:00:00-07:00 | 20.901276 | 3.502159 | 0.000000 | 0.000000 | 0.000000 | 26.0 | 0.0 | 0.0 | 26.0 |
2018-11-04 03:00:00-07:00 | 14.550018 | 1.533327 | 0.000000 | 0.000000 | 0.000000 | 46.0 | 0.0 | 0.0 | 46.0 |
2018-11-04 06:00:00-07:00 | 12.750000 | 1.182815 | 0.000000 | 0.000000 | 0.000000 | 44.0 | 0.0 | 0.0 | 44.0 |
2018-11-04 09:00:00-07:00 | 11.660736 | 2.311280 | 280.229539 | 270.518261 | 167.696908 | 46.0 | 0.0 | 0.0 | 46.0 |
2018-11-04 12:00:00-07:00 | 10.693329 | 2.808184 | 516.169503 | 319.030624 | 301.700704 | 41.0 | 0.0 | 0.0 | 41.0 |
2018-11-04 15:00:00-07:00 | 15.874481 | 3.207382 | 363.696836 | 477.864737 | 148.116985 | 27.0 | 0.0 | 0.0 | 27.0 |
2018-11-04 18:00:00-07:00 | 33.001190 | 1.446706 | 0.000000 | 0.000000 | 0.000000 | 45.0 | 0.0 | 0.0 | 45.0 |
2018-11-04 21:00:00-07:00 | 34.664703 | 1.781901 | 0.000000 | 0.000000 | 0.000000 | 95.0 | 0.0 | 0.0 | 95.0 |
2018-11-05 00:00:00-07:00 | 21.688995 | 2.428124 | 0.000000 | 0.000000 | 0.000000 | 94.0 | 0.0 | 0.0 | 94.0 |
2018-11-05 03:00:00-07:00 | 16.227844 | 1.318510 | 0.000000 | 0.000000 | 0.000000 | 98.0 | 0.0 | 0.0 | 98.0 |
2018-11-05 06:00:00-07:00 | 13.771576 | 1.043417 | 0.000000 | 0.000000 | 0.000000 | 89.0 | 0.0 | 0.0 | 89.0 |
2018-11-05 09:00:00-07:00 | 13.093109 | 3.645442 | 192.629525 | 57.511129 | 168.913879 | 79.0 | 0.0 | 0.0 | 79.0 |
2018-11-05 12:00:00-07:00 | 12.207550 | 3.643838 | 354.016162 | 73.798648 | 304.695419 | 76.0 | 0.0 | 0.0 | 76.0 |
2018-11-05 15:00:00-07:00 | 16.456573 | 3.921984 | 212.807048 | 59.727855 | 186.072726 | 79.0 | 0.0 | 0.0 | 79.0 |
2018-11-05 18:00:00-07:00 | 33.065155 | 2.419262 | 0.000000 | 0.000000 | 0.000000 | 57.0 | 0.0 | 0.0 | 57.0 |
2018-11-05 21:00:00-07:00 | 34.095062 | 4.109993 | 0.000000 | 0.000000 | 0.000000 | 4.0 | 0.0 | 0.0 | 4.0 |
2018-11-06 00:00:00-07:00 | 21.950012 | 3.535770 | 0.000000 | 0.000000 | 0.000000 | 2.0 | 0.0 | 0.0 | 2.0 |
2018-11-06 03:00:00-07:00 | 15.550018 | 0.687714 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-06 06:00:00-07:00 | 14.649994 | 3.481030 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-06 09:00:00-07:00 | 13.421234 | 3.549449 | 392.141572 | 814.323695 | 59.289433 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-06 12:00:00-07:00 | 12.324066 | 3.562688 | 695.601683 | 902.513793 | 95.957975 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-06 15:00:00-07:00 | 16.769775 | 3.343888 | 433.818361 | 835.714299 | 62.638900 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-06 18:00:00-07:00 | 33.453003 | 2.695602 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-06 21:00:00-07:00 | 35.236237 | 3.548147 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-07 00:00:00-07:00 | 22.741180 | 2.985146 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-07 03:00:00-07:00 | 16.818542 | 3.496449 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-07 06:00:00-07:00 | 15.252136 | 3.648492 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-07 09:00:00-07:00 | 13.781464 | 3.549768 | 262.126000 | 236.178035 | 166.442564 | 50.0 | 0.0 | 0.0 | 50.0 |
2018-11-07 12:00:00-07:00 | 12.450012 | 3.580106 | 529.769689 | 376.273646 | 281.220669 | 36.0 | 0.0 | 0.0 | 36.0 |
2018-11-07 15:00:00-07:00 | 16.656982 | 3.708172 | 430.295600 | 835.020520 | 62.247152 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-07 18:00:00-07:00 | 32.552612 | 4.281560 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-07 21:00:00-07:00 | 33.694153 | 6.110958 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-08 00:00:00-07:00 | 22.050018 | 4.213164 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-08 03:00:00-07:00 | 16.407990 | 3.817105 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-08 06:00:00-07:00 | 14.849976 | 4.184049 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-08 09:00:00-07:00 | 12.949982 | 3.608985 | 384.532014 | 811.868584 | 58.545577 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-08 12:00:00-07:00 | 11.467743 | 2.705794 | 687.650627 | 903.736928 | 94.135826 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-08 15:00:00-07:00 | 15.996124 | 2.488395 | 426.858544 | 834.335586 | 61.868211 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-08 18:00:00-07:00 | 33.145996 | 0.507842 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-08 21:00:00-07:00 | 34.050018 | 1.996824 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-09 00:00:00-07:00 | 21.074921 | 4.024785 | 0.000000 | 0.000000 | 0.000000 | 18.0 | 0.0 | 0.0 | 18.0 |
data['temp_air'].plot()
plt.ylabel('temperature (%s)' % fm.units['temp_air'])
Text(0,0.5,'temperature (C)')
cloud_vars = ['total_clouds', 'low_clouds', 'mid_clouds', 'high_clouds']
for varname in cloud_vars:
data[varname].plot()
plt.ylabel('Cloud cover' + ' %')
plt.xlabel('Forecast Time ('+str(data.index.tz)+')')
plt.title('GFS 0.5 deg')
plt.legend(bbox_to_anchor=(1.18,1.0))
<matplotlib.legend.Legend at 0x12502c898>
total_cloud_cover = data['total_clouds']
total_cloud_cover.plot(color='r', linewidth=2)
plt.ylabel('Total cloud cover' + ' (%s)' % fm.units['total_clouds'])
plt.xlabel('Forecast Time ('+str(data.index.tz)+')')
plt.title('GFS 0.5 deg')
Text(0.5,1,'GFS 0.5 deg')
# GFS model at 0.25 degree resolution
fm = GFS(resolution='quarter')
# retrieve data
data = fm.get_processed_data(latitude, longitude, start, end)
for varname in cloud_vars:
data[varname].plot(ls='-', linewidth=2)
plt.ylabel('Cloud cover' + ' %')
plt.xlabel('Forecast Time ('+str(data.index.tz)+')')
plt.title('GFS 0.25 deg')
plt.legend(bbox_to_anchor=(1.18,1.0))
<matplotlib.legend.Legend at 0x125310ba8>
data
temp_air | wind_speed | ghi | dni | dhi | total_clouds | low_clouds | mid_clouds | high_clouds | |
---|---|---|---|---|---|---|---|---|---|
2018-11-02 09:00:00-07:00 | 17.866241 | 0.359686 | 407.358602 | 818.731315 | 60.841352 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 12:00:00-07:00 | 16.749969 | 1.949517 | 711.945346 | 899.784644 | 99.890062 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 15:00:00-07:00 | 18.483185 | 2.454866 | 448.721044 | 838.526803 | 64.338163 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 18:00:00-07:00 | 29.734955 | 0.852877 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 21:00:00-07:00 | 32.950012 | 1.189831 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 00:00:00-07:00 | 26.054901 | 2.562810 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 03:00:00-07:00 | 21.990784 | 2.282499 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 06:00:00-07:00 | 19.966278 | 1.623425 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 09:00:00-07:00 | 18.574249 | 0.870438 | 400.937428 | 808.693204 | 61.599059 | 1.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 12:00:00-07:00 | 17.594971 | 0.550552 | 671.005171 | 789.166843 | 137.353207 | 8.0 | 0.0 | 0.0 | 8.0 |
2018-11-03 15:00:00-07:00 | 19.465118 | 0.190588 | 361.018740 | 453.328673 | 154.875542 | 29.0 | 0.0 | 0.0 | 29.0 |
2018-11-03 18:00:00-07:00 | 29.374481 | 1.979487 | 0.000000 | 0.000000 | 0.000000 | 15.0 | 0.0 | 0.0 | 15.0 |
2018-11-03 21:00:00-07:00 | 32.112396 | 3.934695 | 0.000000 | 0.000000 | 0.000000 | 19.0 | 0.0 | 0.0 | 19.0 |
2018-11-04 00:00:00-07:00 | 25.963715 | 3.390744 | 0.000000 | 0.000000 | 0.000000 | 25.0 | 0.0 | 0.0 | 25.0 |
2018-11-04 03:00:00-07:00 | 22.050018 | 1.151200 | 0.000000 | 0.000000 | 0.000000 | 39.0 | 0.0 | 0.0 | 39.0 |
2018-11-04 06:00:00-07:00 | 20.350006 | 1.473310 | 0.000000 | 0.000000 | 0.000000 | 39.0 | 0.0 | 0.0 | 39.0 |
2018-11-04 09:00:00-07:00 | 19.149994 | 2.177777 | 288.024805 | 298.367510 | 163.907191 | 43.0 | 0.0 | 0.0 | 43.0 |
2018-11-04 12:00:00-07:00 | 18.253204 | 2.763408 | 539.039977 | 373.209929 | 288.149062 | 36.0 | 0.0 | 0.0 | 36.0 |
2018-11-04 15:00:00-07:00 | 19.774506 | 2.854148 | 386.634681 | 586.826436 | 121.898771 | 19.0 | 0.0 | 0.0 | 19.0 |
2018-11-04 18:00:00-07:00 | 29.988922 | 1.663974 | 0.000000 | 0.000000 | 0.000000 | 31.0 | 0.0 | 0.0 | 31.0 |
2018-11-04 21:00:00-07:00 | 33.249969 | 1.782958 | 0.000000 | 0.000000 | 0.000000 | 73.0 | 0.0 | 0.0 | 73.0 |
2018-11-05 00:00:00-07:00 | 26.720398 | 1.926373 | 0.000000 | 0.000000 | 0.000000 | 77.0 | 0.0 | 0.0 | 77.0 |
2018-11-05 03:00:00-07:00 | 23.188934 | 1.641591 | 0.000000 | 0.000000 | 0.000000 | 94.0 | 0.0 | 0.0 | 94.0 |
2018-11-05 06:00:00-07:00 | 21.071564 | 0.309938 | 0.000000 | 0.000000 | 0.000000 | 83.0 | 0.0 | 0.0 | 83.0 |
2018-11-05 09:00:00-07:00 | 19.693115 | 2.158163 | 210.645229 | 88.755387 | 174.045508 | 72.0 | 0.0 | 0.0 | 72.0 |
2018-11-05 12:00:00-07:00 | 18.698883 | 1.936410 | 349.468540 | 69.882107 | 302.765281 | 77.0 | 0.0 | 0.0 | 77.0 |
2018-11-05 15:00:00-07:00 | 20.050018 | 2.208242 | 198.590762 | 41.679854 | 179.934766 | 84.0 | 0.0 | 0.0 | 84.0 |
2018-11-05 18:00:00-07:00 | 30.025543 | 2.387787 | 0.000000 | 0.000000 | 0.000000 | 63.0 | 0.0 | 0.0 | 63.0 |
2018-11-05 21:00:00-07:00 | 32.995087 | 3.899906 | 0.000000 | 0.000000 | 0.000000 | 7.0 | 0.0 | 0.0 | 7.0 |
2018-11-06 00:00:00-07:00 | 26.850006 | 3.270669 | 0.000000 | 0.000000 | 0.000000 | 4.0 | 0.0 | 0.0 | 4.0 |
2018-11-06 03:00:00-07:00 | 23.031708 | 0.506462 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-06 06:00:00-07:00 | 21.149994 | 2.264701 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-06 09:00:00-07:00 | 19.821228 | 2.262985 | 392.141572 | 814.323695 | 59.289433 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-06 12:00:00-07:00 | 18.863373 | 2.455562 | 695.601683 | 902.513793 | 95.957975 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-06 15:00:00-07:00 | 20.359222 | 2.526824 | 433.818361 | 835.714299 | 62.638900 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-06 18:00:00-07:00 | 30.376404 | 2.588124 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-06 21:00:00-07:00 | 33.863251 | 2.935084 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-07 00:00:00-07:00 | 27.704895 | 3.259080 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-07 03:00:00-07:00 | 23.661133 | 2.286154 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-07 06:00:00-07:00 | 21.608154 | 2.114865 | 0.000000 | 0.000000 | 0.000000 | 7.0 | 0.0 | 0.0 | 7.0 |
2018-11-07 09:00:00-07:00 | 20.179565 | 2.443310 | 254.553487 | 211.588702 | 168.831993 | 53.0 | 0.0 | 0.0 | 53.0 |
2018-11-07 12:00:00-07:00 | 19.044159 | 2.695197 | 561.237760 | 466.615331 | 253.013189 | 29.0 | 0.0 | 0.0 | 29.0 |
2018-11-07 15:00:00-07:00 | 20.356415 | 2.793714 | 430.295600 | 835.020520 | 62.247152 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-07 18:00:00-07:00 | 30.137299 | 3.176849 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-07 21:00:00-07:00 | 33.374725 | 4.678627 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-08 00:00:00-07:00 | 27.250031 | 4.634591 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-08 03:00:00-07:00 | 23.162384 | 2.361645 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-08 06:00:00-07:00 | 21.209564 | 2.248846 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-08 09:00:00-07:00 | 19.573395 | 2.122833 | 384.532014 | 811.868584 | 58.545577 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-08 12:00:00-07:00 | 18.482971 | 1.650740 | 687.650627 | 903.736928 | 94.135826 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-08 15:00:00-07:00 | 19.896118 | 1.687728 | 424.083961 | 825.592629 | 62.918342 | 1.0 | 0.0 | 0.0 | 1.0 |
2018-11-08 18:00:00-07:00 | 30.158203 | 0.810317 | 0.000000 | 0.000000 | 0.000000 | 4.0 | 0.0 | 0.0 | 4.0 |
2018-11-08 21:00:00-07:00 | 33.321899 | 1.180532 | 0.000000 | 0.000000 | 0.000000 | 10.0 | 0.0 | 0.0 | 9.0 |
2018-11-09 00:00:00-07:00 | 26.149994 | 2.810067 | 0.000000 | 0.000000 | 0.000000 | 34.0 | 0.0 | 0.0 | 34.0 |
fm = NAM()
# retrieve data
data = fm.get_processed_data(latitude, longitude, start, end)
for varname in cloud_vars:
data[varname].plot(ls='-', linewidth=2)
plt.ylabel('Cloud cover' + ' %')
plt.xlabel('Forecast Time ('+str(data.index.tz)+')')
plt.title('NAM')
plt.legend(bbox_to_anchor=(1.18,1.0))
<matplotlib.legend.Legend at 0x1253f1cf8>
data['ghi'].plot(linewidth=2, ls='-')
plt.ylabel('GHI W/m**2')
plt.xlabel('Forecast Time ('+str(data.index.tz)+')')
Text(0.5,0,'Forecast Time (America/Phoenix)')
data
temp_air | wind_speed | ghi | dni | dhi | total_clouds | low_clouds | mid_clouds | high_clouds | |
---|---|---|---|---|---|---|---|---|---|
2018-11-02 07:00:00-07:00 | 9.042969 | 2.359449 | 15.898465 | 0.000000 | 15.898465 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 08:00:00-07:00 | 8.280884 | 2.285714 | 207.367295 | 631.164838 | 49.568030 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 09:00:00-07:00 | 7.510162 | 2.357424 | 407.358602 | 818.731315 | 60.841352 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 10:00:00-07:00 | 6.727661 | 2.217205 | 566.861073 | 877.336580 | 77.061741 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 11:00:00-07:00 | 6.110291 | 2.220286 | 671.081727 | 895.759140 | 92.480010 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 12:00:00-07:00 | 5.610443 | 1.445311 | 711.945346 | 899.784644 | 99.890062 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 13:00:00-07:00 | 5.477905 | 2.433594 | 686.420887 | 897.464738 | 95.161814 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 14:00:00-07:00 | 5.648712 | 2.359876 | 596.392581 | 883.850233 | 80.974106 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 15:00:00-07:00 | 11.683533 | 2.229287 | 448.721044 | 838.526803 | 64.338163 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 16:00:00-07:00 | 18.863037 | 2.815744 | 256.189545 | 692.798407 | 53.154912 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 17:00:00-07:00 | 25.018097 | 2.428571 | 50.638289 | 172.607483 | 33.653290 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 18:00:00-07:00 | 28.940155 | 1.698988 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 19:00:00-07:00 | 31.027924 | 0.544801 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 20:00:00-07:00 | 31.611603 | 0.575453 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 21:00:00-07:00 | 30.909515 | 0.938451 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 22:00:00-07:00 | 29.013947 | 1.573384 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 23:00:00-07:00 | 25.795746 | 2.123172 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 00:00:00-07:00 | 21.051514 | 3.204405 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 01:00:00-07:00 | 16.444641 | 2.020057 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 02:00:00-07:00 | 14.829559 | 2.762726 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 03:00:00-07:00 | 13.403687 | 1.846706 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 04:00:00-07:00 | 12.329315 | 1.315369 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 05:00:00-07:00 | 11.367493 | 1.215773 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 06:00:00-07:00 | 10.505402 | 1.583964 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 07:00:00-07:00 | 9.778778 | 1.874831 | 14.307855 | 0.000000 | 14.307855 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 08:00:00-07:00 | 9.376434 | 2.220845 | 201.249957 | 605.394073 | 51.932853 | 2.0 | 0.0 | 0.0 | 2.0 |
2018-11-03 09:00:00-07:00 | 8.704193 | 2.286621 | 403.560574 | 817.693817 | 60.445428 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 10:00:00-07:00 | 7.986816 | 2.107260 | 562.878452 | 877.355027 | 76.422802 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 11:00:00-07:00 | 7.340515 | 1.981614 | 666.989197 | 896.292147 | 91.585396 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 12:00:00-07:00 | 6.969086 | 2.083069 | 661.803615 | 756.351845 | 150.341873 | 10.0 | 0.0 | 0.0 | 10.0 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
2018-11-03 17:00:00-07:00 | 25.605316 | 0.910823 | 48.105416 | 160.935146 | 32.773378 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 18:00:00-07:00 | 28.957275 | 2.608586 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 19:00:00-07:00 | 30.541260 | 2.924013 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 20:00:00-07:00 | 31.178802 | 2.918389 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 21:00:00-07:00 | 30.468750 | 3.510659 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 22:00:00-07:00 | 28.696106 | 3.862448 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 23:00:00-07:00 | 25.806122 | 3.789166 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-04 00:00:00-07:00 | 21.106232 | 3.075444 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-04 01:00:00-07:00 | 16.502228 | 1.644137 | 0.000000 | 0.000000 | 0.000000 | 18.0 | 0.0 | 0.0 | 18.0 |
2018-11-04 02:00:00-07:00 | 16.507538 | 0.987544 | 0.000000 | 0.000000 | 0.000000 | 100.0 | 0.0 | 0.0 | 100.0 |
2018-11-04 03:00:00-07:00 | 15.490387 | 1.432161 | 0.000000 | 0.000000 | 0.000000 | 97.0 | 0.0 | 0.0 | 97.0 |
2018-11-04 04:00:00-07:00 | 13.631378 | 1.707315 | 0.000000 | 0.000000 | 0.000000 | 3.0 | 0.0 | 2.0 | 2.0 |
2018-11-04 05:00:00-07:00 | 12.652191 | 2.273273 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-04 06:00:00-07:00 | 11.624115 | 2.196462 | 0.000000 | 0.000000 | 0.000000 | 4.0 | 0.0 | 0.0 | 4.0 |
2018-11-04 09:00:00-07:00 | 9.396515 | 2.416399 | 399.756846 | 816.613033 | 60.054777 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-04 12:00:00-07:00 | 7.423889 | 2.642919 | 703.707566 | 901.197788 | 97.876049 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-04 15:00:00-07:00 | 12.365204 | 2.302605 | 441.112009 | 837.118090 | 63.461642 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-04 18:00:00-07:00 | 29.786926 | 1.754299 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-04 21:00:00-07:00 | 31.564453 | 2.259983 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-05 00:00:00-07:00 | 21.860413 | 2.842452 | 0.000000 | 0.000000 | 0.000000 | 100.0 | 0.0 | 95.0 | 100.0 |
2018-11-05 03:00:00-07:00 | 15.994354 | 0.458940 | 0.000000 | 0.000000 | 0.000000 | 100.0 | 0.0 | 0.0 | 100.0 |
2018-11-05 06:00:00-07:00 | 12.057983 | 1.760338 | 0.000000 | 0.000000 | 0.000000 | 23.0 | 0.0 | 0.0 | 23.0 |
2018-11-05 09:00:00-07:00 | 9.949799 | 2.211692 | 395.949720 | 815.489457 | 59.669434 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-05 12:00:00-07:00 | 8.370819 | 2.443289 | 699.636709 | 901.867687 | 96.905013 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-05 15:00:00-07:00 | 13.661774 | 1.820143 | 326.537463 | 343.072312 | 172.977527 | 39.0 | 0.0 | 0.0 | 39.0 |
2018-11-05 18:00:00-07:00 | 29.717529 | 2.677643 | 0.000000 | 0.000000 | 0.000000 | 2.0 | 0.0 | 0.0 | 2.0 |
2018-11-05 21:00:00-07:00 | 31.634430 | 3.465779 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-06 00:00:00-07:00 | 22.144531 | 3.506209 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-06 03:00:00-07:00 | 14.771973 | 1.176693 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-06 06:00:00-07:00 | 12.109802 | 2.457266 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
64 rows × 9 columns
fm = NDFD()
# retrieve data
data = fm.get_processed_data(latitude, longitude, start, end)
total_cloud_cover = data['total_clouds']
temp = data['temp_air']
wind = data['wind_speed']
total_cloud_cover.plot(color='r', linewidth=2)
plt.ylabel('Total cloud cover' + ' (%s)' % fm.units['total_clouds'])
plt.xlabel('Forecast Time ('+str(data.index.tz)+')')
plt.title('NDFD')
plt.ylim(0,100)
(0, 100)
temp.plot(color='r', linewidth=2)
plt.ylabel('Temperature' + ' (%s)' % fm.units['temp_air'])
plt.xlabel('Forecast Time ('+str(data.index.tz)+')')
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-32-0b0b642af0aa> in <module>() ----> 1 temp.plot(color='r', linewidth=2) 2 plt.ylabel('Temperature' + ' (%s)' % fm.units['temp_air']) 3 plt.xlabel('Forecast Time ('+str(data.index.tz)+')') ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/pandas/plotting/_core.py in __call__(self, kind, ax, figsize, use_index, title, grid, legend, style, logx, logy, loglog, xticks, yticks, xlim, ylim, rot, fontsize, colormap, table, yerr, xerr, label, secondary_y, **kwds) 2739 colormap=colormap, table=table, yerr=yerr, 2740 xerr=xerr, label=label, secondary_y=secondary_y, -> 2741 **kwds) 2742 __call__.__doc__ = plot_series.__doc__ 2743 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/pandas/plotting/_core.py in plot_series(data, kind, ax, figsize, use_index, title, grid, legend, style, logx, logy, loglog, xticks, yticks, xlim, ylim, rot, fontsize, colormap, table, yerr, xerr, label, secondary_y, **kwds) 2000 yerr=yerr, xerr=xerr, 2001 label=label, secondary_y=secondary_y, -> 2002 **kwds) 2003 2004 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/pandas/plotting/_core.py in _plot(data, x, y, subplots, ax, kind, **kwds) 1802 plot_obj = klass(data, subplots=subplots, ax=ax, kind=kind, **kwds) 1803 -> 1804 plot_obj.generate() 1805 plot_obj.draw() 1806 return plot_obj.result ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/pandas/plotting/_core.py in generate(self) 264 265 for ax in self.axes: --> 266 self._post_plot_logic_common(ax, self.data) 267 self._post_plot_logic(ax, self.data) 268 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/pandas/plotting/_core.py in _post_plot_logic_common(self, ax, data) 402 ax.set_xticklabels(xticklabels) 403 self._apply_axis_properties(ax.xaxis, rot=self.rot, --> 404 fontsize=self.fontsize) 405 self._apply_axis_properties(ax.yaxis, fontsize=self.fontsize) 406 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/pandas/plotting/_core.py in _apply_axis_properties(self, axis, rot, fontsize) 476 477 def _apply_axis_properties(self, axis, rot=None, fontsize=None): --> 478 labels = axis.get_majorticklabels() + axis.get_minorticklabels() 479 for label in labels: 480 if rot is not None: ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axis.py in get_majorticklabels(self) 1243 def get_majorticklabels(self): 1244 'Return a list of Text instances for the major ticklabels' -> 1245 ticks = self.get_major_ticks() 1246 labels1 = [tick.label1 for tick in ticks if tick.label1On] 1247 labels2 = [tick.label2 for tick in ticks if tick.label2On] ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axis.py in get_major_ticks(self, numticks) 1394 'get the tick instances; grow as necessary' 1395 if numticks is None: -> 1396 numticks = len(self.get_major_locator()()) 1397 1398 while len(self.majorTicks) < numticks: ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/dates.py in __call__(self) 1247 def __call__(self): 1248 'Return the locations of the ticks' -> 1249 self.refresh() 1250 return self._locator() 1251 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/dates.py in refresh(self) 1267 def refresh(self): 1268 'Refresh internal information based on current limits.' -> 1269 dmin, dmax = self.viewlim_to_dt() 1270 self._locator = self.get_locator(dmin, dmax) 1271 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/dates.py in viewlim_to_dt(self) 1024 'often happens if you pass a non-datetime ' 1025 'value to an axis that has datetime units' -> 1026 .format(vmin)) 1027 return num2date(vmin, self.tz), num2date(vmax, self.tz) 1028 ValueError: view limit minimum -0.001 is less than 1 and is an invalid Matplotlib date value. This often happens if you pass a non-datetime value to an axis that has datetime units
Error in callback <function install_repl_displayhook.<locals>.post_execute at 0x11ca41488> (for post_execute):
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/pyplot.py in post_execute() 147 def post_execute(): 148 if matplotlib.is_interactive(): --> 149 draw_all() 150 151 # IPython >= 2 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/_pylab_helpers.py in draw_all(cls, force) 134 for f_mgr in cls.get_all_fig_managers(): 135 if force or f_mgr.canvas.figure.stale: --> 136 f_mgr.canvas.draw_idle() 137 138 atexit.register(Gcf.destroy_all) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/backend_bases.py in draw_idle(self, *args, **kwargs) 2053 if not self._is_idle_drawing: 2054 with self._idle_draw_cntx(): -> 2055 self.draw(*args, **kwargs) 2056 2057 def draw_cursor(self, event): ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py in draw(self) 431 # if toolbar: 432 # toolbar.set_cursor(cursors.WAIT) --> 433 self.figure.draw(self.renderer) 434 # A GUI class may be need to update a window using this draw, so 435 # don't forget to call the superclass. ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/figure.py in draw(self, renderer) 1473 1474 mimage._draw_list_compositing_images( -> 1475 renderer, self, artists, self.suppressComposite) 1476 1477 renderer.close_group('figure') ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite) 139 if not_composite or not has_images: 140 for a in artists: --> 141 a.draw(renderer) 142 else: 143 # Composite any adjacent images together ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axes/_base.py in draw(self, renderer, inframe) 2605 renderer.stop_rasterizing() 2606 -> 2607 mimage._draw_list_compositing_images(renderer, self, artists) 2608 2609 renderer.close_group('axes') ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite) 139 if not_composite or not has_images: 140 for a in artists: --> 141 a.draw(renderer) 142 else: 143 # Composite any adjacent images together ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axis.py in draw(self, renderer, *args, **kwargs) 1188 renderer.open_group(__name__) 1189 -> 1190 ticks_to_draw = self._update_ticks(renderer) 1191 ticklabelBoxes, ticklabelBoxes2 = self._get_tick_bboxes(ticks_to_draw, 1192 renderer) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axis.py in _update_ticks(self, renderer) 1026 1027 interval = self.get_view_interval() -> 1028 tick_tups = list(self.iter_ticks()) # iter_ticks calls the locator 1029 if self._smart_bounds and tick_tups: 1030 # handle inverted limits ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axis.py in iter_ticks(self) 969 Iterate through all of the major and minor ticks. 970 """ --> 971 majorLocs = self.major.locator() 972 majorTicks = self.get_major_ticks(len(majorLocs)) 973 self.major.formatter.set_locs(majorLocs) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/dates.py in __call__(self) 1247 def __call__(self): 1248 'Return the locations of the ticks' -> 1249 self.refresh() 1250 return self._locator() 1251 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/dates.py in refresh(self) 1267 def refresh(self): 1268 'Refresh internal information based on current limits.' -> 1269 dmin, dmax = self.viewlim_to_dt() 1270 self._locator = self.get_locator(dmin, dmax) 1271 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/dates.py in viewlim_to_dt(self) 1024 'often happens if you pass a non-datetime ' 1025 'value to an axis that has datetime units' -> 1026 .format(vmin)) 1027 return num2date(vmin, self.tz), num2date(vmax, self.tz) 1028 ValueError: view limit minimum -0.001 is less than 1 and is an invalid Matplotlib date value. This often happens if you pass a non-datetime value to an axis that has datetime units
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/IPython/core/formatters.py in __call__(self, obj) 339 pass 340 else: --> 341 return printer(obj) 342 # Finally look for special method names 343 method = get_real_method(obj, self.print_method) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/IPython/core/pylabtools.py in <lambda>(fig) 239 240 if 'png' in formats: --> 241 png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs)) 242 if 'retina' in formats or 'png2x' in formats: 243 png_formatter.for_type(Figure, lambda fig: retina_figure(fig, **kwargs)) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/IPython/core/pylabtools.py in print_figure(fig, fmt, bbox_inches, **kwargs) 123 124 bytes_io = BytesIO() --> 125 fig.canvas.print_figure(bytes_io, **kw) 126 data = bytes_io.getvalue() 127 if fmt == 'svg': ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs) 2210 orientation=orientation, 2211 dryrun=True, -> 2212 **kwargs) 2213 renderer = self.figure._cachedRenderer 2214 bbox_inches = self.figure.get_tightbbox(renderer) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py in print_png(self, filename_or_obj, *args, **kwargs) 511 512 def print_png(self, filename_or_obj, *args, **kwargs): --> 513 FigureCanvasAgg.draw(self) 514 renderer = self.get_renderer() 515 original_dpi = renderer.dpi ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py in draw(self) 431 # if toolbar: 432 # toolbar.set_cursor(cursors.WAIT) --> 433 self.figure.draw(self.renderer) 434 # A GUI class may be need to update a window using this draw, so 435 # don't forget to call the superclass. ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/figure.py in draw(self, renderer) 1473 1474 mimage._draw_list_compositing_images( -> 1475 renderer, self, artists, self.suppressComposite) 1476 1477 renderer.close_group('figure') ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite) 139 if not_composite or not has_images: 140 for a in artists: --> 141 a.draw(renderer) 142 else: 143 # Composite any adjacent images together ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axes/_base.py in draw(self, renderer, inframe) 2605 renderer.stop_rasterizing() 2606 -> 2607 mimage._draw_list_compositing_images(renderer, self, artists) 2608 2609 renderer.close_group('axes') ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite) 139 if not_composite or not has_images: 140 for a in artists: --> 141 a.draw(renderer) 142 else: 143 # Composite any adjacent images together ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axis.py in draw(self, renderer, *args, **kwargs) 1188 renderer.open_group(__name__) 1189 -> 1190 ticks_to_draw = self._update_ticks(renderer) 1191 ticklabelBoxes, ticklabelBoxes2 = self._get_tick_bboxes(ticks_to_draw, 1192 renderer) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axis.py in _update_ticks(self, renderer) 1026 1027 interval = self.get_view_interval() -> 1028 tick_tups = list(self.iter_ticks()) # iter_ticks calls the locator 1029 if self._smart_bounds and tick_tups: 1030 # handle inverted limits ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axis.py in iter_ticks(self) 969 Iterate through all of the major and minor ticks. 970 """ --> 971 majorLocs = self.major.locator() 972 majorTicks = self.get_major_ticks(len(majorLocs)) 973 self.major.formatter.set_locs(majorLocs) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/dates.py in __call__(self) 1247 def __call__(self): 1248 'Return the locations of the ticks' -> 1249 self.refresh() 1250 return self._locator() 1251 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/dates.py in refresh(self) 1267 def refresh(self): 1268 'Refresh internal information based on current limits.' -> 1269 dmin, dmax = self.viewlim_to_dt() 1270 self._locator = self.get_locator(dmin, dmax) 1271 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/dates.py in viewlim_to_dt(self) 1024 'often happens if you pass a non-datetime ' 1025 'value to an axis that has datetime units' -> 1026 .format(vmin)) 1027 return num2date(vmin, self.tz), num2date(vmax, self.tz) 1028 ValueError: view limit minimum -0.001 is less than 1 and is an invalid Matplotlib date value. This often happens if you pass a non-datetime value to an axis that has datetime units
<Figure size 432x288 with 1 Axes>
wind.plot(color='r', linewidth=2)
plt.ylabel('Wind Speed' + ' (%s)' % fm.units['wind_speed'])
plt.xlabel('Forecast Time ('+str(data.index.tz)+')')
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-34-a70559c82c0e> in <module>() ----> 1 wind.plot(color='r', linewidth=2) 2 plt.ylabel('Wind Speed' + ' (%s)' % fm.units['wind_speed']) 3 plt.xlabel('Forecast Time ('+str(data.index.tz)+')') ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/pandas/plotting/_core.py in __call__(self, kind, ax, figsize, use_index, title, grid, legend, style, logx, logy, loglog, xticks, yticks, xlim, ylim, rot, fontsize, colormap, table, yerr, xerr, label, secondary_y, **kwds) 2739 colormap=colormap, table=table, yerr=yerr, 2740 xerr=xerr, label=label, secondary_y=secondary_y, -> 2741 **kwds) 2742 __call__.__doc__ = plot_series.__doc__ 2743 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/pandas/plotting/_core.py in plot_series(data, kind, ax, figsize, use_index, title, grid, legend, style, logx, logy, loglog, xticks, yticks, xlim, ylim, rot, fontsize, colormap, table, yerr, xerr, label, secondary_y, **kwds) 2000 yerr=yerr, xerr=xerr, 2001 label=label, secondary_y=secondary_y, -> 2002 **kwds) 2003 2004 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/pandas/plotting/_core.py in _plot(data, x, y, subplots, ax, kind, **kwds) 1802 plot_obj = klass(data, subplots=subplots, ax=ax, kind=kind, **kwds) 1803 -> 1804 plot_obj.generate() 1805 plot_obj.draw() 1806 return plot_obj.result ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/pandas/plotting/_core.py in generate(self) 264 265 for ax in self.axes: --> 266 self._post_plot_logic_common(ax, self.data) 267 self._post_plot_logic(ax, self.data) 268 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/pandas/plotting/_core.py in _post_plot_logic_common(self, ax, data) 402 ax.set_xticklabels(xticklabels) 403 self._apply_axis_properties(ax.xaxis, rot=self.rot, --> 404 fontsize=self.fontsize) 405 self._apply_axis_properties(ax.yaxis, fontsize=self.fontsize) 406 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/pandas/plotting/_core.py in _apply_axis_properties(self, axis, rot, fontsize) 476 477 def _apply_axis_properties(self, axis, rot=None, fontsize=None): --> 478 labels = axis.get_majorticklabels() + axis.get_minorticklabels() 479 for label in labels: 480 if rot is not None: ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axis.py in get_majorticklabels(self) 1243 def get_majorticklabels(self): 1244 'Return a list of Text instances for the major ticklabels' -> 1245 ticks = self.get_major_ticks() 1246 labels1 = [tick.label1 for tick in ticks if tick.label1On] 1247 labels2 = [tick.label2 for tick in ticks if tick.label2On] ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axis.py in get_major_ticks(self, numticks) 1394 'get the tick instances; grow as necessary' 1395 if numticks is None: -> 1396 numticks = len(self.get_major_locator()()) 1397 1398 while len(self.majorTicks) < numticks: ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/dates.py in __call__(self) 1247 def __call__(self): 1248 'Return the locations of the ticks' -> 1249 self.refresh() 1250 return self._locator() 1251 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/dates.py in refresh(self) 1267 def refresh(self): 1268 'Refresh internal information based on current limits.' -> 1269 dmin, dmax = self.viewlim_to_dt() 1270 self._locator = self.get_locator(dmin, dmax) 1271 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/dates.py in viewlim_to_dt(self) 1024 'often happens if you pass a non-datetime ' 1025 'value to an axis that has datetime units' -> 1026 .format(vmin)) 1027 return num2date(vmin, self.tz), num2date(vmax, self.tz) 1028 ValueError: view limit minimum -0.001 is less than 1 and is an invalid Matplotlib date value. This often happens if you pass a non-datetime value to an axis that has datetime units
Error in callback <function install_repl_displayhook.<locals>.post_execute at 0x11ca41488> (for post_execute):
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/pyplot.py in post_execute() 147 def post_execute(): 148 if matplotlib.is_interactive(): --> 149 draw_all() 150 151 # IPython >= 2 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/_pylab_helpers.py in draw_all(cls, force) 134 for f_mgr in cls.get_all_fig_managers(): 135 if force or f_mgr.canvas.figure.stale: --> 136 f_mgr.canvas.draw_idle() 137 138 atexit.register(Gcf.destroy_all) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/backend_bases.py in draw_idle(self, *args, **kwargs) 2053 if not self._is_idle_drawing: 2054 with self._idle_draw_cntx(): -> 2055 self.draw(*args, **kwargs) 2056 2057 def draw_cursor(self, event): ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py in draw(self) 431 # if toolbar: 432 # toolbar.set_cursor(cursors.WAIT) --> 433 self.figure.draw(self.renderer) 434 # A GUI class may be need to update a window using this draw, so 435 # don't forget to call the superclass. ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/figure.py in draw(self, renderer) 1473 1474 mimage._draw_list_compositing_images( -> 1475 renderer, self, artists, self.suppressComposite) 1476 1477 renderer.close_group('figure') ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite) 139 if not_composite or not has_images: 140 for a in artists: --> 141 a.draw(renderer) 142 else: 143 # Composite any adjacent images together ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axes/_base.py in draw(self, renderer, inframe) 2605 renderer.stop_rasterizing() 2606 -> 2607 mimage._draw_list_compositing_images(renderer, self, artists) 2608 2609 renderer.close_group('axes') ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite) 139 if not_composite or not has_images: 140 for a in artists: --> 141 a.draw(renderer) 142 else: 143 # Composite any adjacent images together ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axis.py in draw(self, renderer, *args, **kwargs) 1188 renderer.open_group(__name__) 1189 -> 1190 ticks_to_draw = self._update_ticks(renderer) 1191 ticklabelBoxes, ticklabelBoxes2 = self._get_tick_bboxes(ticks_to_draw, 1192 renderer) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axis.py in _update_ticks(self, renderer) 1026 1027 interval = self.get_view_interval() -> 1028 tick_tups = list(self.iter_ticks()) # iter_ticks calls the locator 1029 if self._smart_bounds and tick_tups: 1030 # handle inverted limits ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axis.py in iter_ticks(self) 969 Iterate through all of the major and minor ticks. 970 """ --> 971 majorLocs = self.major.locator() 972 majorTicks = self.get_major_ticks(len(majorLocs)) 973 self.major.formatter.set_locs(majorLocs) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/dates.py in __call__(self) 1247 def __call__(self): 1248 'Return the locations of the ticks' -> 1249 self.refresh() 1250 return self._locator() 1251 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/dates.py in refresh(self) 1267 def refresh(self): 1268 'Refresh internal information based on current limits.' -> 1269 dmin, dmax = self.viewlim_to_dt() 1270 self._locator = self.get_locator(dmin, dmax) 1271 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/dates.py in viewlim_to_dt(self) 1024 'often happens if you pass a non-datetime ' 1025 'value to an axis that has datetime units' -> 1026 .format(vmin)) 1027 return num2date(vmin, self.tz), num2date(vmax, self.tz) 1028 ValueError: view limit minimum -0.001 is less than 1 and is an invalid Matplotlib date value. This often happens if you pass a non-datetime value to an axis that has datetime units
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/IPython/core/formatters.py in __call__(self, obj) 339 pass 340 else: --> 341 return printer(obj) 342 # Finally look for special method names 343 method = get_real_method(obj, self.print_method) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/IPython/core/pylabtools.py in <lambda>(fig) 239 240 if 'png' in formats: --> 241 png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs)) 242 if 'retina' in formats or 'png2x' in formats: 243 png_formatter.for_type(Figure, lambda fig: retina_figure(fig, **kwargs)) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/IPython/core/pylabtools.py in print_figure(fig, fmt, bbox_inches, **kwargs) 123 124 bytes_io = BytesIO() --> 125 fig.canvas.print_figure(bytes_io, **kw) 126 data = bytes_io.getvalue() 127 if fmt == 'svg': ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs) 2210 orientation=orientation, 2211 dryrun=True, -> 2212 **kwargs) 2213 renderer = self.figure._cachedRenderer 2214 bbox_inches = self.figure.get_tightbbox(renderer) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py in print_png(self, filename_or_obj, *args, **kwargs) 511 512 def print_png(self, filename_or_obj, *args, **kwargs): --> 513 FigureCanvasAgg.draw(self) 514 renderer = self.get_renderer() 515 original_dpi = renderer.dpi ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py in draw(self) 431 # if toolbar: 432 # toolbar.set_cursor(cursors.WAIT) --> 433 self.figure.draw(self.renderer) 434 # A GUI class may be need to update a window using this draw, so 435 # don't forget to call the superclass. ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/figure.py in draw(self, renderer) 1473 1474 mimage._draw_list_compositing_images( -> 1475 renderer, self, artists, self.suppressComposite) 1476 1477 renderer.close_group('figure') ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite) 139 if not_composite or not has_images: 140 for a in artists: --> 141 a.draw(renderer) 142 else: 143 # Composite any adjacent images together ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axes/_base.py in draw(self, renderer, inframe) 2605 renderer.stop_rasterizing() 2606 -> 2607 mimage._draw_list_compositing_images(renderer, self, artists) 2608 2609 renderer.close_group('axes') ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite) 139 if not_composite or not has_images: 140 for a in artists: --> 141 a.draw(renderer) 142 else: 143 # Composite any adjacent images together ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axis.py in draw(self, renderer, *args, **kwargs) 1188 renderer.open_group(__name__) 1189 -> 1190 ticks_to_draw = self._update_ticks(renderer) 1191 ticklabelBoxes, ticklabelBoxes2 = self._get_tick_bboxes(ticks_to_draw, 1192 renderer) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axis.py in _update_ticks(self, renderer) 1026 1027 interval = self.get_view_interval() -> 1028 tick_tups = list(self.iter_ticks()) # iter_ticks calls the locator 1029 if self._smart_bounds and tick_tups: 1030 # handle inverted limits ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/axis.py in iter_ticks(self) 969 Iterate through all of the major and minor ticks. 970 """ --> 971 majorLocs = self.major.locator() 972 majorTicks = self.get_major_ticks(len(majorLocs)) 973 self.major.formatter.set_locs(majorLocs) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/dates.py in __call__(self) 1247 def __call__(self): 1248 'Return the locations of the ticks' -> 1249 self.refresh() 1250 return self._locator() 1251 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/dates.py in refresh(self) 1267 def refresh(self): 1268 'Refresh internal information based on current limits.' -> 1269 dmin, dmax = self.viewlim_to_dt() 1270 self._locator = self.get_locator(dmin, dmax) 1271 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/matplotlib/dates.py in viewlim_to_dt(self) 1024 'often happens if you pass a non-datetime ' 1025 'value to an axis that has datetime units' -> 1026 .format(vmin)) 1027 return num2date(vmin, self.tz), num2date(vmax, self.tz) 1028 ValueError: view limit minimum -0.001 is less than 1 and is an invalid Matplotlib date value. This often happens if you pass a non-datetime value to an axis that has datetime units
<Figure size 432x288 with 1 Axes>
data
temp_air | wind_speed | ghi | dni | dhi | total_clouds | |
---|---|---|---|---|---|---|
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 11.0 |
... | ... | ... | ... | ... | ... | ... |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
2018-11-02 00:00:00-07:00 | NaN | NaN | 0.0 | 0.0 | 0.0 | 9.0 |
4624 rows × 6 columns
fm = RAP(resolution=20)
# retrieve data
data = fm.get_processed_data(latitude, longitude, start, end)
cloud_vars = ['total_clouds', 'high_clouds', 'mid_clouds', 'low_clouds']
for varname in cloud_vars:
data[varname].plot(ls='-', linewidth=2)
plt.ylabel('Cloud cover' + ' %')
plt.xlabel('Forecast Time ('+str(data.index.tz)+')')
plt.title('RAP')
plt.legend(bbox_to_anchor=(1.18,1.0))
<matplotlib.legend.Legend at 0x11d7579b0>
data
temp_air | wind_speed | ghi | dni | dhi | total_clouds | low_clouds | mid_clouds | high_clouds | |
---|---|---|---|---|---|---|---|---|---|
2018-11-02 07:00:00-07:00 | 8.860504 | 1.135160 | 15.898465 | 0.000000 | 15.898465 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 08:00:00-07:00 | 8.247345 | 1.324239 | 207.367295 | 631.164838 | 49.568030 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 09:00:00-07:00 | 7.579926 | 1.104332 | 407.358602 | 818.731315 | 60.841352 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 10:00:00-07:00 | 7.046539 | 1.495911 | 566.861073 | 877.336580 | 77.061741 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 11:00:00-07:00 | 6.581604 | 1.787012 | 671.081727 | 895.759140 | 92.480010 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 12:00:00-07:00 | 5.881744 | 1.747029 | 711.945346 | 899.784644 | 99.890062 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 13:00:00-07:00 | 5.473267 | 1.717933 | 686.420887 | 897.464738 | 95.161814 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 14:00:00-07:00 | 5.062897 | 1.585807 | 596.392581 | 883.850233 | 80.974106 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 15:00:00-07:00 | 9.387787 | 1.220390 | 448.721044 | 838.526803 | 64.338163 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 16:00:00-07:00 | 14.636536 | 2.336682 | 256.189545 | 692.798407 | 53.154912 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 17:00:00-07:00 | 19.255585 | 1.916539 | 50.638289 | 172.607483 | 33.653290 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 18:00:00-07:00 | 24.219849 | 1.114563 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 19:00:00-07:00 | 28.346283 | 1.385884 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 20:00:00-07:00 | 30.038361 | 1.525370 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 21:00:00-07:00 | 30.400116 | 1.496394 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 22:00:00-07:00 | 29.138641 | 1.743292 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-02 23:00:00-07:00 | 26.351410 | 2.774721 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 00:00:00-07:00 | 22.478729 | 2.931873 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 01:00:00-07:00 | 18.208282 | 3.272368 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 02:00:00-07:00 | 15.719299 | 2.048281 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 03:00:00-07:00 | 14.090179 | 1.532591 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 04:00:00-07:00 | 12.829376 | 1.175292 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 05:00:00-07:00 | 11.807678 | 1.380087 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 06:00:00-07:00 | 10.972809 | 1.512287 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 07:00:00-07:00 | 10.188080 | 1.235779 | 14.307855 | 0.000000 | 14.307855 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 08:00:00-07:00 | 9.558899 | 0.975911 | 203.900668 | 626.524509 | 49.371859 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 09:00:00-07:00 | 8.955811 | 1.089455 | 403.560574 | 817.693817 | 60.445428 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 10:00:00-07:00 | 8.327759 | 0.981827 | 562.878452 | 877.355027 | 76.422802 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 11:00:00-07:00 | 8.018646 | 1.016345 | 666.989197 | 896.292147 | 91.585396 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 12:00:00-07:00 | 7.644623 | 1.370296 | 694.009061 | 864.012971 | 109.744501 | 3.0 | 0.0 | 0.0 | 3.0 |
2018-11-03 13:00:00-07:00 | 7.478516 | 1.490490 | 269.855281 | 25.106937 | 253.414237 | 93.0 | 0.0 | 0.0 | 93.0 |
2018-11-03 14:00:00-07:00 | 6.930573 | 1.002582 | 542.325571 | 710.316449 | 130.842869 | 13.0 | 0.0 | 0.0 | 13.0 |
2018-11-03 15:00:00-07:00 | 11.192993 | 0.858566 | 444.878293 | 837.823063 | 63.893070 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 16:00:00-07:00 | 17.263062 | 1.382749 | 252.627800 | 689.557547 | 52.903901 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 17:00:00-07:00 | 22.654663 | 2.503232 | 48.105416 | 160.935146 | 32.773378 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 18:00:00-07:00 | 27.515106 | 2.553739 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 19:00:00-07:00 | 30.696014 | 2.452050 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
2018-11-03 20:00:00-07:00 | 31.829346 | 3.775545 | 0.000000 | 0.000000 | 0.000000 | 58.0 | 0.0 | 0.0 | 58.0 |
2018-11-03 21:00:00-07:00 | 31.670441 | 4.116302 | 0.000000 | 0.000000 | 0.000000 | 10.0 | 0.0 | 0.0 | 10.0 |
2018-11-03 22:00:00-07:00 | 30.231049 | 4.094347 | 0.000000 | 0.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
fm = HRRR()
data_raw = fm.get_data(latitude, longitude, start, end)
# The HRRR model pulls in u, v winds for 2 layers above ground (10 m, 80 m)
# They are labeled as _0, _1 in the raw data
data_raw
Total_cloud_cover_entire_atmosphere | Medium_cloud_cover_middle_cloud | Wind_speed_gust_surface | Pressure_surface | Low_cloud_cover_low_cloud | High_cloud_cover_high_cloud | Temperature_height_above_ground | v-component_of_wind_height_above_ground_0 | v-component_of_wind_height_above_ground_1 | u-component_of_wind_height_above_ground_0 | u-component_of_wind_height_above_ground_1 | |
---|---|---|---|---|---|---|---|---|---|---|---|
2018-11-02 07:00:00-07:00 | 0.00 | 0.0 | 2.858998 | 93110.906250 | 0.0 | 0.00 | 282.734772 | 1.703051 | 2.652807 | -0.149881 | -2.156889 |
2018-11-02 08:00:00-07:00 | 0.00 | 0.0 | 3.175681 | 93110.906250 | 0.0 | 0.00 | 281.940887 | 1.738281 | 2.975603 | -0.135754 | -2.348145 |
2018-11-02 09:00:00-07:00 | 0.00 | 0.0 | 2.922028 | 93110.906250 | 0.0 | 0.00 | 281.278748 | 1.895540 | 2.626053 | -0.073610 | -2.119377 |
2018-11-02 10:00:00-07:00 | 0.00 | 0.0 | 3.088861 | 93111.132812 | 0.0 | 0.00 | 280.820709 | 1.928577 | 2.535147 | -0.490700 | -2.733677 |
2018-11-02 11:00:00-07:00 | 0.00 | 0.0 | 2.993270 | 93111.132812 | 0.0 | 0.00 | 280.465454 | 1.744240 | 2.407396 | -0.573812 | -3.008923 |
2018-11-02 12:00:00-07:00 | 0.00 | 0.0 | 3.095059 | 93111.132812 | 0.0 | 0.00 | 280.178925 | 2.080114 | 2.108854 | -0.923473 | -3.160629 |
2018-11-02 13:00:00-07:00 | 0.00 | 0.0 | 2.409759 | 93111.132812 | 0.0 | 0.00 | 279.564240 | 1.481094 | 1.845154 | 0.351240 | -1.726856 |
2018-11-02 14:00:00-07:00 | 0.00 | 0.0 | 2.849967 | 93211.132812 | 0.0 | 0.00 | 279.494690 | 2.133972 | 2.316422 | 0.152163 | -2.237305 |
2018-11-02 15:00:00-07:00 | 0.00 | 0.0 | 2.797340 | 93210.906250 | 0.0 | 0.00 | 283.085602 | 1.355753 | 2.130508 | 0.265211 | -2.017151 |
2018-11-02 16:00:00-07:00 | 0.00 | 0.0 | 3.139177 | 93211.132812 | 0.0 | 0.00 | 287.273499 | 1.075033 | 1.475357 | -0.157167 | -1.627764 |
2018-11-02 17:00:00-07:00 | 0.00 | 0.0 | 2.856484 | 93210.906250 | 0.0 | 0.00 | 290.516235 | 0.040521 | 0.114635 | 0.526433 | 0.301710 |
2018-11-02 18:00:00-07:00 | 0.00 | 0.0 | 0.997430 | 93210.906250 | 0.0 | 0.00 | 293.428864 | -0.026180 | -0.118223 | 0.440098 | 0.627125 |
2018-11-02 19:00:00-07:00 | 0.00 | 0.0 | 1.262141 | 93110.906250 | 0.0 | 0.00 | 295.071411 | -0.206024 | -0.404461 | 0.652761 | 0.965139 |
2018-11-02 20:00:00-07:00 | 0.00 | 0.0 | 1.538216 | 92910.906250 | 0.0 | 0.00 | 296.166138 | -0.264409 | -0.534195 | 1.200649 | 1.365780 |
2018-11-02 21:00:00-07:00 | 0.00 | 0.0 | 1.560183 | 92910.671875 | 0.0 | 0.00 | 297.104889 | -0.032928 | -0.070139 | 1.365520 | 1.588125 |
2018-11-02 22:00:00-07:00 | 0.00 | 0.0 | 2.114208 | 92810.906250 | 0.0 | 0.00 | 297.695923 | -0.346216 | -0.419807 | 1.487270 | 1.928804 |
2018-11-02 23:00:00-07:00 | 0.00 | 0.0 | 3.707366 | 92710.906250 | 0.0 | 0.00 | 297.693909 | -1.636463 | -2.076538 | 1.779663 | 2.645590 |
2018-11-03 00:00:00-07:00 | 0.00 | 0.0 | 3.898547 | 92710.671875 | 0.0 | 0.00 | 295.705811 | -1.138264 | -2.366440 | 1.516299 | 2.836134 |
2018-11-03 01:00:00-07:00 | 0.00 | 0.0 | 4.446579 | 92810.906250 | 0.0 | 0.00 | 291.639191 | -0.631392 | -1.602289 | 1.992886 | 2.649999 |
2018-11-03 02:00:00-07:00 | 0.00 | 0.0 | 1.539883 | 92710.906250 | 0.0 | 0.00 | 288.847443 | -0.011936 | -1.758923 | 0.934399 | 2.088796 |
2018-11-03 03:00:00-07:00 | 0.00 | 0.0 | 2.808388 | 92710.671875 | 0.0 | 0.00 | 287.796661 | 1.397369 | -1.041782 | 1.976274 | 3.362164 |
2018-11-03 04:00:00-07:00 | 0.00 | 0.0 | 2.940229 | 92710.671875 | 0.0 | 0.00 | 286.870209 | 1.971252 | -0.212236 | 1.397780 | 2.793392 |
2018-11-03 05:00:00-07:00 | 0.00 | 0.0 | 2.090260 | 92710.906250 | 0.0 | 0.00 | 285.610809 | 1.729422 | -0.585838 | 0.847260 | 1.750739 |
2018-11-03 06:00:00-07:00 | 0.00 | 0.0 | 2.517714 | 92810.906250 | 0.0 | 0.00 | 284.794556 | 2.244366 | -0.346979 | 0.647550 | 1.120353 |
2018-11-03 07:00:00-07:00 | 0.00 | 0.0 | 2.848210 | 92810.671875 | 0.0 | 0.00 | 284.452179 | 2.251696 | 0.659849 | 0.644564 | 1.745453 |
2018-11-03 08:00:00-07:00 | 0.00 | 0.0 | 3.091602 | 92710.906250 | 0.0 | 0.00 | 283.795624 | 2.414202 | 1.202446 | 0.461840 | 1.741158 |
2018-11-03 09:00:00-07:00 | 0.00 | 0.0 | 3.491615 | 92710.906250 | 0.0 | 0.00 | 283.076630 | 2.059916 | 2.403427 | -0.282114 | 1.543947 |
2018-11-03 10:00:00-07:00 | 0.00 | 0.0 | 2.566649 | 92710.906250 | 0.0 | 0.00 | 282.079407 | 1.860052 | 1.533859 | -1.208397 | 0.884336 |
2018-11-03 11:00:00-07:00 | 0.00 | 0.0 | 2.573945 | 92811.132812 | 0.0 | 0.00 | 281.840088 | 1.686741 | 1.346411 | -1.453485 | -0.104582 |
2018-11-03 12:00:00-07:00 | 95.00 | 0.0 | 3.450184 | 92810.906250 | 0.0 | 95.00 | 282.260986 | 2.353130 | 2.536879 | -0.925756 | -0.045650 |
2018-11-03 13:00:00-07:00 | 99.00 | 0.0 | 3.827856 | 92710.906250 | 0.0 | 99.00 | 281.880676 | 1.955254 | 3.608171 | -1.382582 | -0.141350 |
2018-11-03 14:00:00-07:00 | 22.25 | 0.0 | 3.748575 | 92810.906250 | 0.0 | 22.25 | 281.217957 | 1.069138 | 1.994913 | -2.285452 | -2.389187 |
2018-11-03 15:00:00-07:00 | 0.00 | 0.0 | 3.415601 | 92911.132812 | 0.0 | 0.00 | 285.094208 | 1.313303 | 3.323265 | -0.671433 | -1.642962 |
2018-11-03 16:00:00-07:00 | 0.00 | 0.0 | 2.489840 | 92911.132812 | 0.0 | 0.00 | 289.258209 | 1.506355 | 2.364838 | -0.490326 | -0.572165 |
2018-11-03 17:00:00-07:00 | 0.00 | 0.0 | 1.382844 | 92911.132812 | 0.0 | 0.00 | 291.945007 | 1.060296 | 1.237614 | -0.290752 | -0.261408 |
2018-11-03 18:00:00-07:00 | 0.00 | 0.0 | 3.263468 | 92810.906250 | 0.0 | 0.00 | 294.491821 | -0.292503 | -0.183622 | 0.621984 | 0.726418 |
2018-11-03 19:00:00-07:00 | 0.00 | 0.0 | 3.413371 | 92810.906250 | 0.0 | 0.00 | 297.101593 | -0.645355 | -0.851488 | 0.996397 | 1.348511 |
data = fm.get_processed_data(latitude, longitude, start, end)
cloud_vars = ['total_clouds', 'high_clouds', 'mid_clouds', 'low_clouds']
for varname in cloud_vars:
data[varname].plot(ls='-', linewidth=2)
plt.ylabel('Cloud cover' + ' %')
plt.xlabel('Forecast Time ('+str(data.index.tz)+')')
plt.title('RAP')
plt.legend(bbox_to_anchor=(1.18,1.0))
<matplotlib.legend.Legend at 0x126173d68>
data['temp_air'].plot(color='r', linewidth=2)
plt.ylabel('Temperature' + ' (%s)' % fm.units['temp_air'])
plt.xlabel('Forecast Time ('+str(data.index.tz)+')')
Text(0.5,0,'Forecast Time (America/Phoenix)')
data['wind_speed'].plot(color='r', linewidth=2)
plt.ylabel('Wind Speed' + ' (%s)' % fm.units['wind_speed'])
plt.xlabel('Forecast Time ('+str(data.index.tz)+')')
Text(0.5,0,'Forecast Time (America/Phoenix)')
data
temp_air | wind_speed | ghi | dni | dhi | total_clouds | low_clouds | mid_clouds | high_clouds | |
---|---|---|---|---|---|---|---|---|---|
2018-11-02 07:00:00-07:00 | 9.584778 | 1.709633 | 15.898465 | 0.000000 | 15.898465 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-02 08:00:00-07:00 | 8.790894 | 1.743574 | 207.367295 | 631.164838 | 49.568030 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-02 09:00:00-07:00 | 8.128754 | 1.896969 | 407.358602 | 818.731315 | 60.841352 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-02 10:00:00-07:00 | 7.670715 | 1.990024 | 566.861073 | 877.336580 | 77.061741 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-02 11:00:00-07:00 | 7.315460 | 1.836201 | 671.081727 | 895.759140 | 92.480010 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-02 12:00:00-07:00 | 7.028931 | 2.275891 | 711.945346 | 899.784644 | 99.890062 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-02 13:00:00-07:00 | 6.414246 | 1.522173 | 686.420887 | 897.464738 | 95.161814 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-02 14:00:00-07:00 | 6.344696 | 2.139390 | 596.392581 | 883.850233 | 80.974106 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-02 15:00:00-07:00 | 9.935608 | 1.381450 | 448.721044 | 838.526803 | 64.338163 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-02 16:00:00-07:00 | 14.123505 | 1.086461 | 256.189545 | 692.798407 | 53.154912 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-02 17:00:00-07:00 | 17.366241 | 0.527990 | 50.638289 | 172.607483 | 33.653290 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-02 18:00:00-07:00 | 20.278870 | 0.440876 | 0.000000 | 0.000000 | 0.000000 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-02 19:00:00-07:00 | 21.921417 | 0.684501 | 0.000000 | 0.000000 | 0.000000 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-02 20:00:00-07:00 | 23.016144 | 1.229419 | 0.000000 | 0.000000 | 0.000000 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-02 21:00:00-07:00 | 23.954895 | 1.365916 | 0.000000 | 0.000000 | 0.000000 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-02 22:00:00-07:00 | 24.545929 | 1.527036 | 0.000000 | 0.000000 | 0.000000 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-02 23:00:00-07:00 | 24.543915 | 2.417687 | 0.000000 | 0.000000 | 0.000000 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-03 00:00:00-07:00 | 22.555817 | 1.895998 | 0.000000 | 0.000000 | 0.000000 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-03 01:00:00-07:00 | 18.489197 | 2.090514 | 0.000000 | 0.000000 | 0.000000 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-03 02:00:00-07:00 | 15.697449 | 0.934475 | 0.000000 | 0.000000 | 0.000000 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-03 03:00:00-07:00 | 14.646667 | 2.420393 | 0.000000 | 0.000000 | 0.000000 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-03 04:00:00-07:00 | 13.720215 | 2.416532 | 0.000000 | 0.000000 | 0.000000 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-03 05:00:00-07:00 | 12.460815 | 1.925811 | 0.000000 | 0.000000 | 0.000000 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-03 06:00:00-07:00 | 11.644562 | 2.335915 | 0.000000 | 0.000000 | 0.000000 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-03 07:00:00-07:00 | 11.302185 | 2.342135 | 14.307855 | 0.000000 | 14.307855 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-03 08:00:00-07:00 | 10.645630 | 2.457980 | 203.900668 | 626.524509 | 49.371859 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-03 09:00:00-07:00 | 9.926636 | 2.079144 | 403.560574 | 817.693817 | 60.445428 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-03 10:00:00-07:00 | 8.929413 | 2.218111 | 562.878452 | 877.355027 | 76.422802 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-03 11:00:00-07:00 | 8.690094 | 2.226593 | 666.989197 | 896.292147 | 91.585396 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-03 12:00:00-07:00 | 9.110992 | 2.528685 | 270.737854 | 22.071894 | 255.812354 | 95.00 | 0.0 | 0.0 | 95.00 |
2018-11-03 13:00:00-07:00 | 8.730682 | 2.394692 | 243.245023 | 15.586517 | 233.038337 | 99.00 | 0.0 | 0.0 | 99.00 |
2018-11-03 14:00:00-07:00 | 8.067963 | 2.523162 | 506.708684 | 570.614386 | 176.154676 | 22.25 | 0.0 | 0.0 | 22.25 |
2018-11-03 15:00:00-07:00 | 11.944214 | 1.474987 | 444.878293 | 837.823063 | 63.893070 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-03 16:00:00-07:00 | 16.108215 | 1.584148 | 252.627800 | 689.557547 | 52.903901 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-03 17:00:00-07:00 | 18.795013 | 1.099438 | 48.105416 | 160.935146 | 32.773378 | 0.00 | 0.0 | 0.0 | 0.00 |
2018-11-03 18:00:00-07:00 | 21.341827 | 0.687330 | 0.000000 | 0.000000 | 0.000000 | 0.00 | 0.0 | 0.0 | 0.00 |
fm = HRRR_ESRL()
/Users/holmgren/git_repos/pvlib-python/pvlib/forecast.py:781: UserWarning: HRRR_ESRL is an experimental model and is not always available. warnings.warn('HRRR_ESRL is an experimental model and is not '
# retrieve data
data = fm.get_processed_data(latitude, longitude, start, end)
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 376 try: # Python 2.7, use buffering of HTTP responses --> 377 httplib_response = conn.getresponse(buffering=True) 378 except TypeError: # Python 2.6 and older, Python 3 TypeError: getresponse() got an unexpected keyword argument 'buffering' During handling of the above exception, another exception occurred: KeyboardInterrupt Traceback (most recent call last) <ipython-input-46-f22942e4d8bd> in <module>() 1 # retrieve data ----> 2 data = fm.get_processed_data(latitude, longitude, start, end) ~/git_repos/pvlib-python/pvlib/forecast.py in get_processed_data(self, *args, **kwargs) 304 Processed forecast data 305 """ --> 306 return self.process_data(self.get_data(*args, **kwargs), **kwargs) 307 308 def rename(self, data, variables=None): ~/git_repos/pvlib-python/pvlib/forecast.py in get_data(self, latitude, longitude, start, end, vert_level, query_variables, close_netcdf_data) 257 self.query.accept(self.data_format) 258 --> 259 self.netcdf_data = self.ncss.get_data(self.query) 260 261 # might be better to go to xarray here so that we can handle ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/siphon/ncss.py in get_data(self, query) 112 113 """ --> 114 resp = self.get_query(query) 115 return response_handlers(resp, self.unit_handler) 116 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/siphon/http_util.py in get_query(self, query) 377 """ 378 url = self._base[:-1] if self._base[-1] == '/' else self._base --> 379 return self.get(url, query) 380 381 def url_path(self, path): ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/siphon/http_util.py in get(self, path, params) 453 454 """ --> 455 resp = self._session.get(path, params=params) 456 if resp.status_code != 200: 457 if resp.headers.get('Content-Type', '').startswith('text/html'): ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/requests/sessions.py in get(self, url, **kwargs) 523 524 kwargs.setdefault('allow_redirects', True) --> 525 return self.request('GET', url, **kwargs) 526 527 def options(self, url, **kwargs): ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/requests/sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json) 510 } 511 send_kwargs.update(settings) --> 512 resp = self.send(prep, **send_kwargs) 513 514 return resp ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/requests/sessions.py in send(self, request, **kwargs) 620 621 # Send the request --> 622 r = adapter.send(request, **kwargs) 623 624 # Total elapsed time of the request (approximately) ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 443 decode_content=False, 444 retries=self.max_retries, --> 445 timeout=timeout 446 ) 447 ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 598 timeout=timeout_obj, 599 body=body, headers=headers, --> 600 chunked=chunked) 601 602 # If we're going to release the connection in ``finally:``, then ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 378 except TypeError: # Python 2.6 and older, Python 3 379 try: --> 380 httplib_response = conn.getresponse() 381 except Exception as e: 382 # Remove the TypeError from the exception chain in Python 3; ~/miniconda3/envs/pvlibfx36/lib/python3.6/http/client.py in getresponse(self) 1329 try: 1330 try: -> 1331 response.begin() 1332 except ConnectionError: 1333 self.close() ~/miniconda3/envs/pvlibfx36/lib/python3.6/http/client.py in begin(self) 295 # read until we get a non-100 response 296 while True: --> 297 version, status, reason = self._read_status() 298 if status != CONTINUE: 299 break ~/miniconda3/envs/pvlibfx36/lib/python3.6/http/client.py in _read_status(self) 256 257 def _read_status(self): --> 258 line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") 259 if len(line) > _MAXLINE: 260 raise LineTooLong("status line") ~/miniconda3/envs/pvlibfx36/lib/python3.6/socket.py in readinto(self, b) 584 while True: 585 try: --> 586 return self._sock.recv_into(b) 587 except timeout: 588 self._timeout_occurred = True ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py in recv_into(self, *args, **kwargs) 283 def recv_into(self, *args, **kwargs): 284 try: --> 285 return self.connection.recv_into(*args, **kwargs) 286 except OpenSSL.SSL.SysCallError as e: 287 if self.suppress_ragged_eofs and e.args == (-1, 'Unexpected EOF'): ~/miniconda3/envs/pvlibfx36/lib/python3.6/site-packages/OpenSSL/SSL.py in recv_into(self, buffer, nbytes, flags) 1811 result = _lib.SSL_peek(self._ssl, buf, nbytes) 1812 else: -> 1813 result = _lib.SSL_read(self._ssl, buf, nbytes) 1814 self._raise_ssl_error(self._ssl, result) 1815 KeyboardInterrupt:
cloud_vars = ['total_clouds','high_clouds','mid_clouds','low_clouds']
for varname in cloud_vars:
data[varname].plot(ls='-', linewidth=2)
plt.ylabel('Cloud cover' + ' %')
plt.xlabel('Forecast Time ('+str(data.index.tz)+')')
plt.title('HRRR_ESRL')
plt.legend(bbox_to_anchor=(1.18,1.0))
data['ghi'].plot(linewidth=2, ls='-')
plt.ylabel('GHI W/m**2')
plt.xlabel('Forecast Time ('+str(data.index.tz)+')')
from pvlib.pvsystem import PVSystem, retrieve_sam
from pvlib.modelchain import ModelChain
sandia_modules = retrieve_sam('SandiaMod')
sapm_inverters = retrieve_sam('cecinverter')
module = sandia_modules['Canadian_Solar_CS5P_220M___2009_']
inverter = sapm_inverters['ABB__MICRO_0_25_I_OUTD_US_208_208V__CEC_2014_']
system = PVSystem(module_parameters=module,
inverter_parameters=inverter)
# fx is a common abbreviation for forecast
fx_model = GFS()
fx_data = fx_model.get_processed_data(latitude, longitude, start, end)
# use a ModelChain object to calculate modeling intermediates
mc = ModelChain(system, fx_model.location,
orientation_strategy='south_at_latitude_tilt')
# extract relevant data for model chain
mc.run_model(fx_data.index, weather=fx_data)
/Users/holmgren/git_repos/pvlib-python/pvlib/pvsystem.py:1917: RuntimeWarning: invalid value encountered in maximum spectral_loss = np.maximum(0, np.polyval(am_coeff, airmass_absolute))
ModelChain: name: None orientation_strategy: south_at_latitude_tilt clearsky_model: ineichen transposition_model: haydavies solar_position_method: nrel_numpy airmass_model: kastenyoung1989 dc_model: sapm ac_model: snlinverter aoi_model: sapm_aoi_loss spectral_model: sapm_spectral_loss temp_model: sapm_temp losses_model: no_extra_losses
mc.total_irrad.plot()
<matplotlib.axes._subplots.AxesSubplot at 0x12615c0b8>
mc.temps.plot()
<matplotlib.axes._subplots.AxesSubplot at 0x12660b668>
mc.ac.plot()
<matplotlib.axes._subplots.AxesSubplot at 0x1265b0fd0>