p = proxy(**vargs) """ initialise output file list """ images = [] """ process the proxy """ # 1: find the analog seasons if verbose: save_progress(opath, 'Process the proxy', 0) p.find_analogs() # 2: save the proxy in the JSON file p.proxy_repr() # 3: plot the time-series of seasonal values with the analog years and save if verbose: save_progress(opath, 'Time Series', 10) f = p.plot_season_ts() f.savefig(os.path.join(opath, 'time_series.png')) images.append({'id': 'time_series', 'title' : 'Analog Seasons', 'filename': 'time_series.png'}) plt.close(f) """
""" HGT at 1000 hPa, NZ domain, composite """ f = scalar_plot(hgt, test=0.1, proj='cyl', domain=[165, 180, -50., -30], res='h').plot(subplots=False) f.savefig(os.path.join(opath,'hgt_1000_proxy_NZ.png')) images.append({'id': 'hgt_1000_NZ', 'title' : 'Geopotential at 1000 hPa, NZ domain', 'filename': 'HGT_1000_NZ_proxy.png'}) plt.close(f) if verbose: save_progress(opath, 'HGT 1000 NZ domain composite', 40) """ HGT at 1000 hPa, NZ domain, one map per year """ f = scalar_plot(hgt, test=0.1, proj='cyl', domain=[165, 180, -50., -30], res='h').plot(subplots=True) f.savefig(os.path.join(opath,'hgt_1000_proxy_NZ_years.png')) images.append({'id': 'hgt_1000_NZ_samples', 'title' : 'Geopotential at 1000 hPa, NZ domain, analog years', 'filename': 'HGT_1000_NZ_sample_proxy.png'}) plt.close(f) if verbose: save_progress(opath, 'HGT 1000 NZ domain analogs', 50)
""" opath = vargs.pop('opath') """ pop `verbose` out of the dictionnary """ verbose = vargs.pop('verbose') """ instantiates an `ensemble` class, pass the `vargs` dict of keyword arguments to the class """ ens = ensemble(**vargs) if verbose: save_progress(opath, 'Process the ensemble', 0) """ Creates output file array """ images = [] """ instantiate the analog classes with the proxy for each dataset + variable we want to map """ # ============================================================================== """ HGT 1000