rotation=18.,
        **ax_props)

ax.text(646865, 4185800., r'$\leftarrow$ Old R.', rotation=0., **ax_props)

ax.text(647300,
        4185950.,
        r'San Joaquin R. $\rightarrow$',
        rotation=40.,
        **ax_props)

sbar = plot_utils.scalebar([0.55, 0.03],
                           dy=0.02,
                           L=500,
                           ax=ax,
                           fractions=[0, 0.2, 0.4, 1.0],
                           label_txt='m',
                           style='ticks',
                           lw=1.25,
                           xy_transform=ax.transAxes)

plot_wkb.plot_wkb(delta_bdry,
                  ax=overview_ax,
                  fc='0.85',
                  ec='0.7',
                  ls='-',
                  lw=0.5,
                  zorder=-2)

##
fig.savefig('fig_study_area.png', dpi=200)
Beispiel #2
0
            ax.quiverkey(quiv, 0.9, 0.9, 0.5, "0.5 m/s", coordinates='axes')
            ax.text(0.05, 0.95, ds.source, transform=ax.transAxes, color=col)

            set_bounds(ax, ds)

            for x in ax, over_ax:
                bathy().plot(ax=x, cmap='gray', vmin=-20, vmax=6)
                x.xaxis.set_visible(0)
                x.yaxis.set_visible(0)

            over_ax.axis(zoom_overview)

            over_ax.plot(ds.x_utm.values, ds.y_utm.values, color=col)
            plot_utils.scalebar([0.3, 0.03],
                                divisions=[0, 10, 20, 50],
                                label_txt="m",
                                ax=ax,
                                xy_transform=ax.transAxes,
                                dy=0.02)

            fig.savefig(
                os.path.join(tran_fig_dir,
                             'quiver-2d-repeat%02d.png' % repeat))

    if 0 and len(tran_dss) > 1:  # Plan view quiver of all repeats together:
        fig = plt.figure(3)
        fig.clf()
        fig.set_size_inches((8, 6), forward=True)
        ax = fig.add_axes([0, 0, 1, 1])
        over_ax = fig.add_axes([0, 0, 0.15, 0.15])

        for repeat, ds in enumerate(tran_dss):
Beispiel #3
0
ax.yaxis.set_visible(0)

grid_ocean.plot_edges(ax=ax, lw=0.5, color='k', alpha=0.2)
ccoll = grid_ocean.plot_cells(ax=ax,
                              values=(-grid_ocean.cells['z_bed']).clip(
                                  1, np.inf),
                              norm=colors.LogNorm(),
                              cmap=cmap)
cax = fig.add_axes([0.07, 0.15, 0.03, 0.35])

cbar = plt.colorbar(ccoll, cax=cax, label="Depth (m)")
cax.invert_yaxis()
plot_utils.scalebar([0.07, 0.025],
                    L=100000,
                    fractions=[0, 0.25, 0.5, 1.0],
                    unit_factor=1e-3,
                    label_txt=" km",
                    ax=ax,
                    xy_transform=ax.transAxes,
                    dy=0.01)
fig.savefig("sfb_ocean_grid_bathy-panels.png", dpi=150)

##
# (1.0, 4177.424014636387)

normed = ccoll.norm((-grid_ocean.cells['z_bed']).clip(1, np.inf))

grid_ocean.write_cells_shp(
    "../gis/merge-suisun-bathy.shp",
    extra_fields=[('depth', (-grid_ocean.cells['z_bed']).clip(1, np.inf)),
                  ('elev', grid_ocean.cells['z_bed'].clip(-np.inf, -1)),
                  ('logdepth',
Beispiel #4
0
                        cmap='jet',
                        clim=[-10, 2],
                        ax=ax,
                        mask=valid)
missing = grid.plot_cells(color='0.8', ax=ax, mask=~valid)

ax.axis('equal')

plt.colorbar(ccoll, ax=ax, label='Bed elev. (m)')
plt.setp(ax.xaxis, visible=0)
plt.setp(ax.yaxis, visible=0)
plt.setp(ax.spines.values(), visible=0)
plot_utils.scalebar([0.10, 0.10],
                    ax=ax,
                    xy_transform=ax.transAxes,
                    L=500.0,
                    dy=0.02,
                    label_txt="m",
                    fractions=[0, 0.2, 0.4, 1.0])
fig.tight_layout()
ax.text(0.05, 0.95, meth_pretty, transform=ax.transAxes, va='top')
ax.axis(zoom)

fig.savefig('gridded-%s-%s.png' % (meth, params))

##

# So far it's looking pretty bad.
# this is still just using the single diffusion source.
# should look more closely at some examples -- might be buggy.
Beispiel #5
0
#                      **overview_props)

overview_ax.axis((591145.4117244165, 685561.9795310685, 4122628.38358537,
                  4276184.999358825))
if overview_ax2:
    overview_ax2.axis(zoom2)

# A few geographic labels
# Better done in inkscape, but try it here...
ax.texts = []

sbar = plot_utils.scalebar([0.55, 0.03],
                           dy=0.02,
                           L=400,
                           ax=ax,
                           fractions=[0, 0.25, 0.5, 1.0],
                           label_txt='m',
                           style='ticks',
                           lw=1.25,
                           xy_transform=ax.transAxes)

plot_wkb.plot_wkb(delta_bdry,
                  ax=overview_ax,
                  fc='0.85',
                  ec='0.7',
                  ls='-',
                  lw=0.5,
                  zorder=-2)

if 1:
    # Add a location in CA mini-inset