#!/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_trackdensity_change import wyplot as plot_map_density from wyplot_map_genesis_change import wyplot as plot_map_genesis from wyplot_map_spi_change import wyplot as plot_map_spi from wyplot_map_precip_change import wyplot as plot_map_precip from wyplot_map_pvi_change import wyplot as plot_map_pvi from wyplot_map_shear_change import wyplot as plot_map_shear # 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_density(ax=ax) ax = axes[0,1] plot_map_genesis(ax=ax) ax = axes[1,0] plot_map_spi(ax=ax) ax = axes[1,1] plot_map_precip(ax=ax) ax = axes[2,0] plot_map_pvi(ax=ax) ax = axes[2,1] plot_map_shear(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()