#!/usr/bin/env python # Wenchang Yang (wenchang@princeton.edu) # Thu Feb 11 15:12:50 EST 2021 if __name__ == '__main__': from misc.timer import Timer tt = Timer(f'start {__file__}') import sys, os.path, os, glob, datetime import xarray as xr, numpy as np, pandas as pd import matplotlib.pyplot as plt #more imports from fig_map_corr_tc_lmr2019sst import plot_map_corr from fig_map_corr_tc_FLORts_bp import plot_map_corr as plot_map_corr_FLOR # if __name__ == '__main__': tt.check('end import') # #start from here if __name__ == '__main__': from wyconfig import * #my plot settings import cartopy.crs as ccrs, cartopy.feature as cfeature from shared import labelax proj = ccrs.Robinson(central_longitude=180) dproj = ccrs.PlateCarree() fig, axes = plt.subplots(2, 2, figsize=(9,4.5), subplot_kw=dict(projection=proj)) tagfontsize = 'large' ax = axes[0,0] plot_map_corr(ax, 'r_rsst', cbar_kwargs=dict(label='correlation')) ax.set_title('LMR rSST with TC proxy') labelax(ax, 'A', fontsize=tagfontsize) ax = axes[0,1] plot_map_corr(ax, 'b_rsst', cbar_kwargs=dict(label='slope [K per STD of NA TC]'), extend='both') ax.set_title('LMR rSST regressed on TC proxy') labelax(ax, 'B', fontsize=tagfontsize) ax = axes[1,0] plot_map_corr_FLOR(ax, 'r_rsst', cbar_kwargs=dict(label='correlation')) ax.set_title('FLOR rSST with TC') labelax(ax, 'C', fontsize=tagfontsize) ax = axes[1,1] plot_map_corr_FLOR(ax, 'b_rsst', cbar_kwargs=dict(label='slope [K per STD of NA TC]')) ax.set_title('FLOR rSST regressed on TC') labelax(ax, 'D', fontsize=tagfontsize) figname = __file__.replace('.py', f'.png') if len(sys.argv) > 1 and sys.argv[1] == 'savefig': wysavefig(figname) tt.check(f'**Done**') plt.show()