Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
517 views
Kernel:
%matplotlib inline import numpy as np import pandas as pd import matplotlib.pyplot as plt time_sec = np.array([1,2,3,4,5,6,7,8,9,10]) velocity_mps = np.array([10,12,14,16,18,20,22,24,26,28])
plt.plot(time_sec, velocity_mps) plt.grid(True) plt.ylim((0,30))
(0, 30)
Image in a Jupyter notebook
delta_T = 1 velocity_mps.sum() * delta_T
190
try: santa_rosa except NameError: # 724957 Santa Rosa, CA santa_rosa = pd.read_table('http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/724957TYA.CSV', skiprows=1, sep=',') else: print('skipping download')
santa_rosa.head()
santa_rosa['Dry-bulb (C)'].plot()
<matplotlib.axes._subplots.AxesSubplot at 0x7f60a300e2b0>
Image in a Jupyter notebook
delta_T = 18 - santa_rosa['Dry-bulb (C)']
delta_T[delta_T < 0] = 0 delta_T.plot()
<matplotlib.axes._subplots.AxesSubplot at 0x7f45f09530b8>
Image in a Jupyter notebook
# degree days # compare to https://wrcc.dri.edu/cgi-bin/cliMONthdd.pl?casros delta_T.sum() / 24
1557.5958333333331
# energy # multiply degree days by UA product to get energy