#!/usr/bin/env python # Wenchang Yang (wenchang@princeton.edu) # Sat Apr 3 20:47:44 EDT 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, matplotlib.pyplot as plt #more imports # if __name__ == '__main__': tt.check('end import') # #start from here ifile = '/tigress/wenchang/data/ibtracs/v04r00/analysis/v2/IBTrACS.ALL.v04r00.tracksByYear.1980-2019.nc' ds = xr.open_dataset(ifile) if __name__ == '__main__': from wyconfig import * #my plot settings ds.windmax.max('stage').plot.hist(bins=20) #savefig if len(sys.argv) > 1 and sys.argv[1] == 'savefig': figname = __file__.replace('.py', f'.png') wysavefig(figname) tt.check(f'**Done**') plt.show()