if radarcomp: en = ensnames[0] ex = experiments[0] out_sd, wrf_sd = get_folders(en,ex) outdir, datadir = get_verif_dirs() # p.plot_radar(compt,datadir,outdir,ncdir=wrf_sd,composite=True) p.plot_radar(compt,datadir,outdir,composite=True, # Nlim=40.1,Elim=-94.9,Slim=34.3,Wlim=-100.8) Nlim=42.7,Elim=-94.9,Slim=37.0,Wlim=-101.8) if streamlines: for en in ensnames: for ex in experiments: for t in times: out_sd, wrf_sd = get_folders(en,ex) p.plot_streamlines(t,2000,out_sd=out_sd,wrf_sd=wrf_sd) if rucplot: # RUC file is one-per-time so .nc file is specified beforehand en = ensnames[0] RC = Settings() RC.output_root = os.path.join(config.output_root,case,IC,en,experiment) RC.path_to_RUC = os.path.join(config.RUC_root,case,IC,en,experiment) WRF_dir = os.path.join(config.wrfout_root,case,'NAM',en,'ICBC') variables = ['streamlines',] level = 2000 for t in sl_times: RUC = RUCPlot(RC,t,wrfdir=WRF_dir) #limits = RUC.colocate_WRF_map(WRF_dir)
# Nlim=40.1,Elim=-94.9,Slim=34.3,Wlim=-100.8) Nlim=42.7, Elim=-94.9, Slim=37.0, Wlim=-101.8) if streamlines: 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)) for t in times: print(ncdir) p.plot_streamlines(t, 700, ncdir, outdir, nct=nct, dom=dom) if rucplot: # RUC file is one-per-time so .nc file is specified beforehand en = ensnames[0] RC = Settings() RC.output_root = os.path.join(config.output_root, case, IC, en, experiment) RC.path_to_RUC = os.path.join(config.RUC_root, case, IC, en, experiment) WRF_dir = os.path.join(config.wrfout_root, case, 'NAM', en, 'ICBC') variables = [ 'streamlines', ] level = 2000
levels = (2000, ) vrbls = ('cref', ) # import pdb; pdb.set_trace() # Plot standard 2D plots if plot2D: for t in times: for lv in levels: for v in vrbls: p.plot2D(v, t, lv, ncdir, outdir) # Streamline 2D plots if streamlines: for t in times: for lv in levels: p.plot_streamlines(t, lv, ncdir, outdir, smooth=5) # Skew Ts # skewT_time = (2013,8,16,3,0,0) # skewT_latlon = (35.2435,-97.4708) # p.plot_skewT(skewT_time,skewT_latlon) # DKE # p.compute_diff_energy('sum_z','total',path_to_wrfouts,times, # d_save=picklefolder, d_return=0,d_fname=pfname) # latA, lonA, latB, lonB = (40.1,-89.0,38.1,-86.0) # xstime = (2011,4,20,3,0,0) # clvs = N.arange(-25,27.5,2.5) #clvs = N.arange(0.0001,0.001,0.0001) # p.plot_xs('parawind',xstime,latA=latA,lonA=lonA,latB=latB,lonB=lonB,
levels = (2000,) vrbls = ('cref',) # import pdb; pdb.set_trace() # Plot standard 2D plots if plot2D: for t in times: for lv in levels: for v in vrbls: p.plot2D(v,t,lv,ncdir,outdir) # Streamline 2D plots if streamlines: for t in times: for lv in levels: p.plot_streamlines(t,lv,ncdir,outdir,smooth=5) # Skew Ts # skewT_time = (2013,8,16,3,0,0) # skewT_latlon = (35.2435,-97.4708) # p.plot_skewT(skewT_time,skewT_latlon) # DKE # p.compute_diff_energy('sum_z','total',path_to_wrfouts,times, # d_save=picklefolder, d_return=0,d_fname=pfname) # latA, lonA, latB, lonB = (40.1,-89.0,38.1,-86.0) # xstime = (2011,4,20,3,0,0) # clvs = N.arange(-25,27.5,2.5) #clvs = N.arange(0.0001,0.001,0.0001) # p.plot_xs('parawind',xstime,latA=latA,lonA=lonA,latB=latB,lonB=lonB,
import os import pdb import sys import matplotlib as M M.use('agg') import matplotlib.pyplot as plt import numpy as N sys.path.append('/home/jrlawson/gitprojects/') from WEM.postWRF.postWRF import WRFEnviron import WEM.utils as utils #from WEM.postWRF.postWRF.rucplot import RUCPlot ncroot = '/ptmp/jrlawson/WRF_3.6.1_ideal/run/' outroot = '/home/jrlawson/public_html/paper5' p = WRFEnviron() nct = (2000,1,1,0,0,0) t = (2000,1,1,1,30,0) # p.plot2D('REFL_comp',level=False,utc=t,ncdir=ncroot,nct=nct,outdir=outroot,cb=True,dom=1,ideal=True) # p.plot2D('lyapunov',level=500,utc=t,ncdir=ncroot,nct=nct,outdir=outroot,cb=True,dom=1,ideal=True) # p.plot2D('U',level=500,utc=t,ncdir=ncroot,nct=nct,outdir=outroot,cb=True,dom=1,ideal=True) # p.plot2D('V',level=500,utc=t,ncdir=ncroot,nct=nct,outdir=outroot,cb=True,dom=1,ideal=True) p.plot_streamlines(t,500,ncroot,outroot,nct=nct,dom=1,ideal=True)
compt, datadir, outdir, composite=True, # Nlim=40.1,Elim=-94.9,Slim=34.3,Wlim=-100.8) Nlim=42.7, Elim=-94.9, Slim=37.0, Wlim=-101.8) if streamlines: for en in ensnames: for ex in experiments: for t in times: out_sd, wrf_sd = get_folders(en, ex) p.plot_streamlines(t, 2000, out_sd=out_sd, wrf_sd=wrf_sd) if rucplot: # RUC file is one-per-time so .nc file is specified beforehand en = ensnames[0] RC = Settings() RC.output_root = os.path.join(config.output_root, case, IC, en, experiment) RC.path_to_RUC = os.path.join(config.RUC_root, case, IC, en, experiment) WRF_dir = os.path.join(config.wrfout_root, case, 'NAM', en, 'ICBC') variables = [ 'streamlines', ] level = 2000 for t in sl_times:
outdir, datadir = get_verif_dirs() # p.plot_radar(compt,datadir,outdir,ncdir=wrf_sd,composite=True) p.plot_radar(compt,datadir,outdir,composite=True, # Nlim=40.1,Elim=-94.9,Slim=34.3,Wlim=-100.8) Nlim=42.7,Elim=-94.9,Slim=37.0,Wlim=-101.8) if streamlines: 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)) for t in times: print(ncdir) p.plot_streamlines(t,700,ncdir,outdir,nct=nct,dom=dom) if rucplot: # RUC file is one-per-time so .nc file is specified beforehand en = ensnames[0] RC = Settings() RC.output_root = os.path.join(config.output_root,case,IC,en,experiment) RC.path_to_RUC = os.path.join(config.RUC_root,case,IC,en,experiment) WRF_dir = os.path.join(config.wrfout_root,case,'NAM',en,'ICBC') variables = ['streamlines',] level = 2000 for t in sl_times: RUC = RUCPlot(RC,t,wrfdir=WRF_dir) #limits = RUC.colocate_WRF_map(WRF_dir)