-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvar_vs_alt.py
54 lines (50 loc) · 2.22 KB
/
var_vs_alt.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import glob
import LCBnet_lib
from LCBnet_lib import *
import matplotlib.pyplot as plt
from matplotlib.pyplot import cm
import statsmodels.api as sm
import matplotlib
from scipy.interpolate import interp1d
from collections import Counter
from scipy import interpolate
from LapseRate import AltitudeAnalysis
if __name__=='__main__':
#===========================================================================
# Get input Files
#===========================================================================
Path='/home/thomas/PhD/obs-lcb/LCBData/obs/Full/'
Files=glob.glob(Path+"*")
print Files
# AttSta = att_sta()
# AttSta.setInPaths(dirInPath)
#
# station_names =AttSta.stations(['Head','West','valley'])
# # station_names.append('C17')
#
# Files =AttSta.getatt(station_names,'InPath')
# Files = Files + AttSta.getatt(AttSta.stations(['Head','West','slope']),'InPath')
#
altanal = AltitudeAnalysis(Files, net='LCB')
#===========================================================================
# Plot var in function of Altitude
#===========================================================================
# hours = np.arange(15,24,1)
hours = [12, 6]
altanal.VarVsAlt(vars= ['Ta C'], by= 'H', dates = hours, From='2015-03-01 00:00:00', To='2015-08-01 00:00:00')
altanal.plot(analysis = 'var_vs_alt', marker_side = True, plot_mean_profile=True, annotate = True, print_= True)
#===========================================================================
# Plot var in function of Altitude - Mean summer and Winter
#===========================================================================
#
# hours = [10,12,14]
# altanal.VarVsAlt(vars= ['Ta C', 'Ua g/kg', 'Theta C', 'Sm m/s'], by= 'H', dates = hours, From='2014-10-01 00:00:00', To='2015-08-01 00:00:00')
# altanal.plot(analysis = 'var_vs_alt', annotate = True, print_= True)
#
#
# plt.figure()
# East =AttSta.getatt(AttSta.stations(['Head','slope']),'InPath')
# East = East + AttSta.getatt(AttSta.stations(['Head','ridge']),'InPath')
#
# West =AttSta.getatt(AttSta.stations(['Head','slope']),'InPath')
# West = West + AttSta.getatt(AttSta.stations(['Head','ridge']),'InPath')