if plot_type == 'd': obs_datetimes = obs_datetime_time[:24] model_datetimes = model_datetime_time[:24] if plot_type == 's': obs_datetimes = obs_datetime_time[:8766] model_datetimes = model_datetime_time[:8766] obs_time_pd = pd.date_range(start=obs_datetimes[0], end=obs_datetimes[-1], freq='H') model_time_pd = pd.date_range(start=model_datetimes[0], end=model_datetimes[-1], freq='H') area_boundaries, area_tags, area_labels = modules.area_dicts() fig, axes = plt.subplots(nrows=5, ncols=5, figsize=(19, 13)) fig.patch.set_facecolor('white') count = 0 for ax in axes.flat: try: area = areas[count] except: ax.axis('off') continue print area area_grid = area_boundaries[area] area_tag = area_tags[area]
obs_seasonal_amplitudes = obs_data.variables['seasonal_amplitude'][:] obs_seasonal_phases = obs_data.variables['seasonal_max_phase'][:] model_seasonal_waveforms = model_data.variables['seasonal_waveform'][:] model_seasonal_amplitudes = model_data.variables['seasonal_amplitude'][:] model_seasonal_phases = model_data.variables['seasonal_max_phase'][:] test = obs_seasonal_waveforms < 0 obs_seasonal_waveforms[test] = np.NaN test = obs_seasonal_amplitudes < 0 obs_seasonal_amplitudes[test] = np.NaN test = model_seasonal_waveforms < 0 model_seasonal_waveforms[test] = np.NaN area_boundaries,area_tags,area_labels = modules.area_dicts() tags = modules.get_tags(refs) areas = ['ANT','S_O','AF','N_O','S_EU','C_EU','NE_NA','ARC'] obsn_linspace = np.linspace(0, 1, len(areas)) fig, axes = plt.subplots(nrows=2, ncols=4,figsize=(19,13)) fig.patch.set_facecolor('white') count = 0 for ax in axes.flat: try: area = areas[count] except: ax.axis('off') continue
#get observational location tags tags = modules.get_tags(obs_refs) #----------------------------------- #get area areas = ['ANT','AF','SE_US','S_US','W_US','N_US','NE_US','W_CAN','E_CAN','AL','S_EU','C_EU','NW_EU','N_EU','AS','ARC'] if c == 0: if plot_type == 'd': obs_datetimes = obs_datetimes[:24] if plot_type == 's': obs_datetimes = obs_datetimes[:8766] obs_time_pd = pd.date_range(start = obs_datetimes[0],end = obs_datetimes[-1], freq = 'H') area_colors,area_boundaries,area_countries,area_labels = modules.area_dicts() #count = 0 #for ax in axes.flat: #try: #area = areas[count] #except: #ax.axis('off') #continue count = 0 for area in areas: print area area_grid = area_boundaries[area] area_country = area_countries[area] area_label = area_labels[area]