level = 2000 times = utils.generate_times(itime, ftime, hourly * 60 * 60) # times = [(2011,4,20,2,0,0),] # times = [(2013,8,15,22,0,0),] # dtetimes = utils.generate_times(itime,ftime,3*60*60) skewT_time = (2006, 5, 27, 0, 0, 0) skewT_latlon = (36.73, -102.51) # Boise City, OK for ens in ensnames: if skewT: for en in ensnames: for ex in experiments: outdir, ncdir = get_folders(en, ex) p.plot_skewT(skewT_time, latlon=skewT_latlon, outdir=outdir, ncdir=ncdir) locs = {'Norman': (35.2, -97.4)} if plot2D or radarplot or strongestwind: if ens: outdir = os.path.join(outroot, 'd0{0}'.format(dom), ens) ncdir = os.path.join(ncroot, ens) else: ncdir = ncroot outdir = os.path.join(outroot, 'd0{0}'.format(dom)) if strongestwind: p.plot_strongest_wind(iwind, fwind, 2000,
skewT_latlon = (35.2435,-97.4708) # NUMBER 5: # This is a loop over different folders # For one plot, just use the (last line) plot_skewT command # For Skew Ts for en in ensnames: for ex in experiments: # Reload settings p.C = Settings() # Change paths to new location p.C.output_root = os.path.join(config.output_root,case,IC,en,MP,ex) p.C.wrfout_root = os.path.join(config.wrfout_root,case,IC,en,MP,ex) p.C.pickledir = os.path.join(config.wrfout_root,case,IC,en,MP,ex) # save_output saves pickle files for later use p.plot_skewT(skewT_time,skewT_latlon,save_output=1) # For composite profiles path_to_wrfouts = [] for ens in ICens: for ex in experiments: fpath = os.path.join(config.wrfout_root,case,ens,ex) path_to_wrfouts.append(p.wrfout_files_in(fpath,dom=1)[0]) va = 'theta' p.composite_profile(va,skewT_time,skewT_latlon,path_to_wrfouts,mean=1,std=1)
#variables['shear'] = {'top':3,'bottom':0,'pt':shear_times} # variables = {'shear':{'pt':shear_times, 'top':3, 'bottom':0}} # variables = {'thetae':{'lv':2000,'pt':times}, 'CAPE':{'pt':times}} # variables = {'cref':{'lv':2000,'pt':times}, 'shear':{'pt':shear_times, 'top':3, 'bottom':0}} #variables = {'PMSL':{'lv':2000,'pt':times,'plottype':'contour','smooth':5}} #shear06 = {'shear':{'top':6,'bottom':0,'pt':shear_times}} skewT_time = (2006,5,27,0,0,0) skewT_latlon = (36.73,-102.51) # Boise City, OK if skewT: for en in ensnames: for ex in experiments: outdir, ncdir = get_folders(en,ex) p.plot_skewT(skewT_time,latlon=skewT_latlon,outdir=outdir,ncdir=ncdir) locs = {'Norman':(35.2,-97.4)} if plot2D or radarplot: for en in ensnames: for ex in experiments: for t in times: outdir, ncdir = get_folders(en,ex) if plot2D: # p.plot2D('Z',t,500,wrf_sd=wrf_sd,out_sd=out_sd,plottype='contour',smooth=10) # p.plot2D('Td2',t,ncdir=ncdir,outdir=outdir,nct=t,match_nc=matchnc,clvs=N.arange(260,291,1)) # p.plot2D('Q2',t,ncdir=ncdir,outdir=outdir,nct=t,match_nc=matchnc,clvs=N.arange(1,20.5,0.5)*10**-3) # p.plot2D('RAINNC',t,ncdir=wrf_sd,outdir=out_sd,locations=locs,clvs=N.arange(1,100,2)) # p.plot2D('REFL_comp',t,ncdir=ncdir,outdir=outdir,cb=True,match_nc=matchnc) p.plot2D('cref',t,ncdir=ncdir,outdir=outdir,cb=True) # p.plot2D('wind10',t,ncdir=ncdir,outdir=outdir,locations=locs,cb=True,clvs=N.arange(10,32,2))
# For Skew Ts for en in ensnames: for ex in experiments: # Reload settings p.C = Settings() # Change paths to new location p.C.output_root = os.path.join(config.output_root, case, IC, en, MP, ex) p.C.wrfout_root = os.path.join(config.wrfout_root, case, IC, en, MP, ex) p.C.pickledir = os.path.join(config.wrfout_root, case, IC, en, MP, ex) # save_output saves pickle files for later use p.plot_skewT(skewT_time, skewT_latlon, save_output=1) # For composite profiles path_to_wrfouts = [] for ens in ICens: for ex in experiments: fpath = os.path.join(config.wrfout_root, case, ens, ex) path_to_wrfouts.append(p.wrfout_files_in(fpath, dom=1)[0]) va = 'theta' p.composite_profile(va, skewT_time, skewT_latlon, path_to_wrfouts, mean=1, std=1)