#!/usr/bin/env python # Wenchang Yang (wenchang@princeton.edu) # Mon Jul 28 11:01:16 AM EDT 2025 if __name__ == '__main__': import sys,os try: from misc.timer import Timer tt = Timer(f'[{os.getcwd()}] start ' + ' '.join(sys.argv)) except: pass import sys, os.path, os, glob, datetime import xarray as xr, numpy as np, pandas as pd, matplotlib.pyplot as plt #more imports wython = '/tigress/wenchang/wython' if wython not in sys.path: sys.path.append(wython); print('added to python path:', wython) #from misc import get_kws_from_argv from wyplot_map_pviVshear_change import wyplot as plot_map_pviVshear from wyplot_map_shear_change import wyplot as plot_map_shear from wyplot_map_pvichi_change import wyplot as plot_map_pvichi from wyplot_map_chi_change import wyplot as plot_map_chi from wyplot_map_pviPI_change import wyplot as plot_map_pviPI from wyplot_map_PI_change import wyplot as plot_map_PI # if __name__ == '__main__': try: tt.check('end import') except: pass # #start from here if __name__ == '__main__': from wyconfig import * #my plot settings from geoplots.cartopy.api import cartoproj from misc import axlabel proj = cartoproj('cyl') fig,axes = plt.subplots(3, 2, figsize=(13,11), subplot_kw=dict(projection=proj), dpi=64) ax = axes[0,0] plot_map_pviVshear(ax=ax) ax = axes[0,1] plot_map_shear(ax=ax) ax = axes[1,0] plot_map_pvichi(ax=ax) ax = axes[1,1] plot_map_chi(ax=ax) ax = axes[2,0] plot_map_pviPI(ax=ax) ax = axes[2,1] plot_map_PI(ax=ax) for ax,label in zip(axes.flat, list('abcdef')): axlabel(ax, label+')', x=-0.1, y=1.05) #savefig if 'savefig' in sys.argv or 's' in sys.argv: figname = __file__.replace('.py', f'.png') if 'overwritefig' in sys.argv or 'o' in sys.argv: wysavefig(figname, overwritefig=True) else: wysavefig(figname) try: tt.check(f'**Done**') except: pass print() if 'notshowfig' in sys.argv or 'n' in sys.argv: pass else: if 'plt' in globals(): plt.show()