calculate_significance=False, title='Difference') cs = contour_plot( 2, 2, np.mean(data_am[NINO34_plus & IOBM_plus, :, :], axis=0) - np.mean(data_am[NINO34_plus & IOBM_minus, :, :], axis=0), clevs, lats_var, lons_var, None, mask=None, calculate_significance=False, title='Difference') ax = plt.subplot(gs[3, :]) make_plots.colorbar(ax, cs, orientation='horizontal') #save figure if decadal_mean == True: save_file_name = figure_dir + '/IOBM_NINO34_composites_' + var_name + '_decadal_' + model_name + '_' + season + '.png' else: save_file_name = figure_dir + '/IOBM_NINO34_composites_' + var_name + '_' + model_name + '_' + season + '.png' print('saving to %s' % (save_file_name)) plt.savefig(save_file_name, bbox_inches='tight') elif average_over_models == True: # add composites to arrays if i == 0: standard_lats = np.arange(-88, 88.1, 2) standard_lons = np.arange(0, 360.1, 2) n_lats, n_lons = standard_lats.shape[0], standard_lons.shape[0] if decadal_mean == False:
lats_psl, lons_psl, title=index_name + ' psl', extent=[60, 300, -30, 60]) ax = plt.subplot( gs[j, 2], projection=ccrs.PlateCarree(central_longitude=180.)) cs_pr = contour_plot(86400 * regress_coeffs_pr, clevs_pr, lats_pr, lons_pr, title=index_name + ' pr', cmap='RdBu', extent=[60, 150, 20, 50]) ax = plt.subplot(gs[j + 1, 0]) make_plots.colorbar(ax, cs_SST) ax = plt.subplot(gs[j + 1, 1]) make_plots.colorbar(ax, cs_psl) ax = plt.subplot(gs[j + 1, 2]) make_plots.colorbar(ax, cs_pr) # save #plt.subplots_adjust(hspace=0.4) save_file_name = figure_dir + '/regress_SST_indices_circulation_' + model_name + '_' + season + '.png' print('saving to %s' % (save_file_name)) plt.savefig(save_file_name, bbox_inches='tight') except: message = 'Error, skipping model ' + model_name print(message)