#!/usr/bin/env python # Wenchang Yang (wenchang@princeton.edu) # Tue Jun 2 01:58:17 PM EDT 2026 import sys wython = '/tigress/wenchang/wython' if wython not in sys.path: sys.path.append(wython); print('added to python path:', wython) if __name__ == '__main__': 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 #from misc import get_kws_from_argv # if __name__ == '__main__': try: tt.check('end import') except: pass # #start from here #settings #process ifile = 'wind_AM2.5C360_amipHadISSTlong_chancorr_tigercpu_intelmpi_18_1080PE_extend_ens01_2022-2022_atmos_daily_interp.286.074_40.5545.nc' da = xr.open_dataarray(ifile) ifile_max = 'wind_max_AM2.5C360_amipHadISSTlong_chancorr_tigercpu_intelmpi_18_1080PE_extend_ens01_2022-2022_atmos_daily_interp.286.074_40.5545.nc' da_max = xr.open_dataarray(ifile_max) #plot if __name__ == '__main__': from wyconfig import * #my plot settings da.plot(label='wind') da_max.plot(label='wind_max') plt.legend() #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()