#!/usr/bin/env python import xarray as xr import matplotlib.pyplot as plt import xfilter alpha = 0.5 thin = 1 thick = 2 n_years = 9 plt.figure(figsize=(8,4)) # ctl ifile = '/tigress/wenchang/analysis/TC/CTL1860_newdiag_tigercpu_intelmpi_18_576PE/netcdf/tc_counts.0001-1000.yearly.nc' ds = xr.open_dataset(ifile) da = ds['global'] da.plot(color='k', lw=thin, alpha=alpha) da.filter.lowpass(1/n_years).plot(color='k', lw=thick, label='CTL') # m6 ifile = '/tigress/wenchang/analysis/TC/m6p0sol_CTL1860_tigercpu_intelmpi_18_576PE/netcdf/tc_counts.0101-0597.yearly.nc' ds_m6 = xr.open_dataset(ifile) da = ds_m6['global'] da.plot(color='C0', lw=thin, alpha=alpha) da.filter.lowpass(1/n_years).plot(color='C0', lw=thick, label='$-6$% solar') # p6 ifile = '/tigress/wenchang/analysis/TC/p6p0sol_CTL1860_tigercpu_intelmpi_18_576PE/netcdf/tc_counts.0101-0400.yearly.nc' ds_p6 = xr.open_dataset(ifile) da = ds_p6['global'] da.plot(color='C1', lw=thin, alpha=alpha) da.filter.lowpass(1/n_years).plot(color='C1', lw=thick, label='+6% solar') # m6 recover ifile = '/tigress/wenchang/analysis/TC/m6p0sol_CTL1860_recover0501_tigercpu_intelmpi_18_576PE/netcdf/tc_counts.0501-0900.yearly.nc' ds_m6r = xr.open_dataset(ifile) da = ds_m6r['global'] da.plot(color='C2', lw=thin, alpha=alpha) da.filter.lowpass(1/n_years).plot(color='C2', lw=thick, label='$-$6% solar recover') plt.legend() plt.ylabel('# of global TC') plt.tight_layout() plt.savefig('fig.n_global_TC.png', dpi=128)