Пример #1
0
import sys
import numpy as N

sys.path.append('/home/jrlawson/gitprojects/WEM')

from WEM.postWRF.postWRF import WRFEnviron

# Initialise the environment
p = WRFEnviron()

# output directory
outdir = '/home/jrlawson/public_html/bowecho'
# netcdf directory.
ncdir = '/chinook2/jrlawson/bowecho/20130815/GEFSR2/c00/ICBC'

# initial and final times.
itime = (2013, 8, 15, 3, 0, 0)
ftime = (2013, 8, 15, 3, 0, 0)
hourly = 6
times = p.generate_times(itime, ftime, hourly * 60 * 60)

# Loop over all times.
# clvs lets you change the contour values
# The second argument is accumulation time, in hours
for t in times:
    p.plot_accum_rain(t, hourly, ncdir, outdir, clvs=N.arange(5, 85, 1))
Пример #2
0
p = WRFEnviron()

outdir = ('/home/jrlawson/public_html/bowecho/'
            '20110419/GEFSR2/p04/WDM6_Hail/test')
ncdir = ('/chinook2/jrlawson/bowecho/'
            '20110419/GEFSR2/p04/WDM6_Hail')

plot2D = 1
streamlines = 0

# Create list of times
itime = (2013,8,16,1,0,0)
ftime = (2013,8,16,5,0,0)
hourly = 1
times = p.generate_times(itime,ftime,hourly*60*60)
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: