ncdir = os.path.join(ncroot, ens) else: outdir = os.path.join(outroot, 'hires', 'd0{0}'.format(dom)) ncdir = ncroot for t in times: fig = plt.figure(figsize=(8, 6)) gs = M.gridspec.GridSpec(1, 2, width_ratios=[1, 3]) ax0 = plt.subplot(gs[0]) ax1 = plt.subplot(gs[1]) # import pdb; pdb.set_trace() cf0, cf1 = p.cold_pool_strength(t, ncdir=ncdir, outdir=outdir, nct=nct, dom=dom, swath_width=130, fig=fig, axes=(ax0, ax1), dz=1) hr = utils.ensure_timetuple(t)[3] fpath = os.path.join(outdir, 'coldpool_{0:02d}Z.png'.format(hr)) fig.savefig(fpath) print(("Saving figure to {0}".format(fpath))) plt.close(fig) if spaghetti: wrf_sds = [] for en in ensnames: for ex in experiments: out_sd, wrf_sd = get_folders(en, ex)
if coldpoolstrength: for t in times: for en in ensnames: for ex in experiments: fig = plt.figure(figsize=(8, 6)) gs = M.gridspec.GridSpec(1, 2, width_ratios=[1, 3]) ax0 = plt.subplot(gs[0]) ax1 = plt.subplot(gs[1]) out_sd, wrf_sd = get_folders(en, ex) # print out_sd, wrf_sd cf0, cf1 = p.cold_pool_strength(t, wrf_sd=wrf_sd, out_sd=out_sd, swath_width=130, fig=fig, axes=(ax0, ax1), dz=1) plt.close(fig) if spaghetti: wrf_sds = [] for en in ensnames: for ex in experiments: out_sd, wrf_sd = get_folders(en, ex) wrf_sds.append(wrf_sd) lv = 2000 # Save to higher directory out_d = os.path.dirname(out_sd)
RUC = RUCPlot(RC,t,wrfdir=WRF_dir) #limits = RUC.colocate_WRF_map(WRF_dir) RUC.plot(variables,level) if coldpoolstrength: for t in times: for en in ensnames: for ex in experiments: fig = plt.figure(figsize=(8,6)) gs = M.gridspec.GridSpec(1,2,width_ratios=[1,3]) ax0 = plt.subplot(gs[0]) ax1 = plt.subplot(gs[1]) out_sd, wrf_sd = get_folders(en,ex) # print out_sd, wrf_sd cf0, cf1 = p.cold_pool_strength(t,wrf_sd=wrf_sd,out_sd=out_sd, swath_width=130,fig=fig,axes=(ax0,ax1),dz=1) plt.close(fig) if spaghetti: wrf_sds = [] for en in ensnames: for ex in experiments: out_sd, wrf_sd = get_folders(en,ex) wrf_sds.append(wrf_sd) lv = 2000 # Save to higher directory out_d = os.path.dirname(out_sd) for t in times: p.spaghetti(t,lv,'cref',40,wrf_sds[:4],out_d)
if coldpoolstrength: if ens: outdir = os.path.join(outroot,'hires','d0{0}'.format(dom),ens) ncdir = os.path.join(ncroot,ens) else: outdir = os.path.join(outroot,'hires','d0{0}'.format(dom)) ncdir = ncroot for t in times: fig = plt.figure(figsize=(8,6)) gs = M.gridspec.GridSpec(1,2,width_ratios=[1,3]) ax0 = plt.subplot(gs[0]) ax1 = plt.subplot(gs[1]) # import pdb; pdb.set_trace() cf0, cf1 = p.cold_pool_strength(t,ncdir=ncdir,outdir=outdir,nct=nct,dom=dom, swath_width=130,fig=fig,axes=(ax0,ax1),dz=1) hr = utils.ensure_timetuple(t)[3] fpath = os.path.join(outdir,'coldpool_{0:02d}Z.png'.format(hr)) fig.savefig(fpath) print(("Saving figure to {0}".format(fpath))) plt.close(fig) if spaghetti: wrf_sds = [] for en in ensnames: for ex in experiments: out_sd, wrf_sd = get_folders(en,ex) wrf_sds.append(wrf_sd) lv = 2000 # Save to higher directory