Beispiel #1
0
    tight_layout=None)
fig.set_frameon(False)
# Attach a canvas
canvas = FigureCanvas(fig)

# Projection for plotting
cs = iris.coord_systems.RotatedGeogCS(args.pole_latitude, args.pole_longitude,
                                      args.npg_longitude)

wind_pc = plot_cube(0.2, -180 / args.zoom, 180 / args.zoom, -90 / args.zoom,
                    90 / args.zoom)
rw = iris.analysis.cartography.rotate_winds(u10m, v10m, cs)
u10m = rw[0].regrid(wind_pc, iris.analysis.Linear())
v10m = rw[1].regrid(wind_pc, iris.analysis.Linear())
seq = (dte - datetime.datetime(2000, 1, 1)).total_seconds() / 3600
z = make_wind_seed(resolution=0.4, seed=0)
wind_noise_field = wind_field(u10m,
                              v10m,
                              z,
                              sequence=int(seq * 5),
                              epsilon=0.01)

# Define an axes to contain the plot. In this case our axes covers
#  the whole figure
ax = fig.add_axes([0, 0, 1, 1])
ax.set_axis_off()  # Don't want surrounding x and y axis

# Lat and lon range (in rotated-pole coordinates) for plot
ax.set_xlim(-180 / args.zoom, 180 / args.zoom)
ax.set_ylim(-90 / args.zoom, 90 / args.zoom)
ax.set_aspect('auto')
Beispiel #2
0
    frameon=False,  # Don't draw a frame
    subplotpars=None,
    tight_layout=None)
fig.set_frameon(False)
# Attach a canvas
canvas = FigureCanvas(fig)

# Make the wind noise
wind_pc = plot_cube(0.2, -180 / args.zoom, 180 / args.zoom, -90 / args.zoom,
                    90 / args.zoom)
cs = iris.coord_systems.RotatedGeogCS(90.0, 180.0, 0.0)
rw = iris.analysis.cartography.rotate_winds(u10m, v10m, cs)
u10m = rw[0].regrid(wind_pc, iris.analysis.Linear())
v10m = rw[1].regrid(wind_pc, iris.analysis.Linear())
seq = (dte - datetime.datetime(2000, 1, 1)).total_seconds() / 3600
z = make_wind_seed(0.4, seed=1)
wind_noise_field = wind_field(u10m,
                              v10m,
                              z,
                              sequence=int(seq * 5),
                              epsilon=0.01)

# Define an axes to contain the plot. In this case our axes covers
#  the whole figure
ax = fig.add_axes([0, 0, 1, 1])
ax.set_axis_off()  # Don't want surrounding x and y axis

# Lat and lon range (in rotated-pole coordinates) for plot
ax.set_xlim(-180 / args.zoom, 180 / args.zoom)
ax.set_ylim(-90 / args.zoom, 90 / args.zoom)
ax.set_aspect('auto')