In [1]:
%load_ext autoreload
%autoreload 2
%matplotlib inline
from smarts import *
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
In [1]:
defaults["IMASS"]=0
defaults["AMASS"]=2
file = build_smarts_file(
**defaults
)
data = send_to_smarts(file)
plt.plot(data.iloc[:,0],data.iloc[:,1],hold=True)
plt.plot(data.iloc[:,0],data.iloc[:,4])
plt.show()
In [3]:
defaults["WV2"]=1800
defaults["IMASS"]=2
defaults["AMASS"]=2.0
file = build_smarts_file(
**defaults
)
data2 = send_to_smarts(file)
plt.plot(data2.iloc[:,0],data2.iloc[:,1],hold=True)
plt.plot(data2.iloc[:,0],data2.iloc[:,4])
plt.plot(data.iloc[:,0],data.iloc[:,4])
plt.show()
In [4]:
amass=np.linspace(0,5,num=10)
for a in amass:
defaults["IMASS"]=2
defaults["AMASS"]=a
file = build_smarts_file(
**defaults
)
data2 = send_to_smarts(file)
plt.plot(data2.iloc[:,0],data2.iloc[:,4],hold=True,label="%s"%a)
plt.legend()
Out[4]:
In [5]:
ngo_lat=35.1814
ngo_lont=136.9064
defaults["IMASS"]=3
defaults["YEAR"]=2016
defaults["MONTH"]=12
defaults["DAY"]=20
defaults["HOUR"]=12
defaults["ZONE"]=9
defaults["LATIT"]=ngo_lat
defaults["LONGIT"]=ngo_lont
In [6]:
defaults['HOUR']=12
file = build_smarts_file(
**defaults
)
data2 = send_to_smarts(file)
type(data2)
Out[6]:
In [9]:
amass=np.linspace(0,5,num=10)
for i in range(1,23):
defaults["IMASS"]=3
defaults["HOUR"]=i
file = build_smarts_file(
**defaults
)
data2 = send_to_smarts(file)
if data2 is not None:
plt.plot(data2.iloc[:,0],data2.iloc[:,4],hold=True,label="%s"%i)
plt.legend()
Out[9]:
In [10]:
times=pd.date_range(start='2016-12-20 04:00',end='2016-12-21 23:00',freq='15T',tz='Japan')
df=get_clear_sky(times)
print(df.head())
In [12]:
df.to_hdf('store_tl.h5',key='df',mode='w')
In [15]:
df.index.unique().shape
Out[15]:
In [16]:
78*0.25
Out[16]:
In [ ]:
df.loc[pd.DatetimeIndex(['2016-12-20 05:00:00+09:00']),:]
In [ ]: