#filenames = glob('./data/matchup_*txt') #filenames = glob('./radvaldata/matchup_*txt') #filenames = glob('./matchup_all_npp*txt') #filenames = glob('./matchup_synop_radval_npp.txt') filenames = glob('./matchup_synop_all_npp.txt') this = MatchupAnalysis(mtype='synop') #this = MatchupAnalysis(mtype='point') this.get_results(filenames) res = this.data[np.isfinite(this.data['sat'])] # Illumination filtering: # res = sunz_filter(res, [0, 80]) # Daytime # res = sunz_filter(res, [90, 180]) # Night # res = sunz_filter(res, [80, 90]) # Twilight hist1d_plot(res, 'sat', 'PPS cloud cover', color='blue') #synop_validation(res, './ppsval_nightime.txt') synop_validation(res, './ppsval.txt') x = res.date + res.delta_t.apply(lambda d: timedelta(minutes=d)) startdate = x.min() enddate = x.max() mydate = startdate delta_t = timedelta(minutes=60 * 24 * 10) # 10 days datelist = [] frequency = [] while mydate < enddate: mydate = mydate + delta_t a = np.where(np.logical_and(x.astype(datetime).values < mydate,
"""Plot a histogram of the cloud cover for selected Synop stations """ from analyse_results import (MatchupAnalysis, hist1d_plot, sunz_filter, station_filter) from glob import glob import numpy as np # -------------------------------------------------------- if __name__ == "__main__": #filenames = glob('./data/matchup_*txt') filenames = glob('./data/results_n*txt') manual_stations = ['02616', '02496', '02020'] #this = MatchupAnalysis(mtype='point') this = MatchupAnalysis(mtype='synop') res = this.get_results(filenames) res = res[np.isfinite(res['obs'])] #res = geo_filter(res, outside=False) #res = geo_filter(res) res = sunz_filter(res, [0, 80]) # Daytime # res = sunz_filter(res, [90, 180]) # Night # res = sunz_filter(res, [80, 90]) # Twilight res = station_filter(res, manual_stations) hist1d_plot(res, 'obs', 'Observations')
""" from analyse_results import (MatchupAnalysis, hist1d_plot, sunz_filter, station_filter) from glob import glob import numpy as np # -------------------------------------------------------- if __name__ == "__main__": #filenames = glob('./data/matchup_*txt') filenames = glob('./data/results_n*txt') manual_stations = ['02616', '02496', '02020'] #this = MatchupAnalysis(mtype='point') this = MatchupAnalysis(mtype='synop') res = this.get_results(filenames) res = res[np.isfinite(res['obs'])] #res = geo_filter(res, outside=False) #res = geo_filter(res) res = sunz_filter(res, [0, 80]) # Daytime # res = sunz_filter(res, [90, 180]) # Night # res = sunz_filter(res, [80, 90]) # Twilight res = station_filter(res, manual_stations) hist1d_plot(res, 'obs', 'Observations')
#filenames = glob('./data/matchup_*txt') #filenames = glob('./radvaldata/matchup_*txt') #filenames = glob('./matchup_all_npp*txt') #filenames = glob('./matchup_synop_radval_npp.txt') filenames = glob('./matchup_synop_all_npp.txt') this = MatchupAnalysis(mtype='synop') #this = MatchupAnalysis(mtype='point') this.get_results(filenames) res = this.data[np.isfinite(this.data['sat'])] # Illumination filtering: # res = sunz_filter(res, [0, 80]) # Daytime # res = sunz_filter(res, [90, 180]) # Night # res = sunz_filter(res, [80, 90]) # Twilight hist1d_plot(res, 'sat', 'PPS cloud cover', color='blue') #synop_validation(res, './ppsval_nightime.txt') synop_validation(res, './ppsval.txt') x = res.date + res.delta_t.apply(lambda d: timedelta(minutes=d)) startdate = x.min() enddate = x.max() mydate = startdate delta_t = timedelta(minutes=60 * 24 * 10) # 10 days datelist = [] frequency = [] while mydate < enddate: mydate = mydate + delta_t a = np.where(