Ejemplo n.º 1
0
              'bowl1': bowl1_p, 'bowl2': bowl2_p, 'labBowl': labBowl}
    varAtl = {'name': 'Atlantic', 'var_change': var_change_a, 'var_mean': None,
              'bowl1': bowl1_a, 'bowl2': bowl2_a, 'labBowl': labBowl}
    varInd = {'name': 'Indian', 'var_change': var_change_i, 'var_mean': None,
              'bowl1': bowl1_i, 'bowl2': bowl2_i, 'labBowl': labBowl}

# ------------------------------------
#               Plot
# ------------------------------------

fig, axes = plt.subplots(nrows=2, ncols=3, figsize=(17,5))


if name == 'Durack & Wijffels':
    levels = np.linspace(minmax[0], minmax[1], minmax[2])
    cmap = custom_div_cmap()

    cnplot = zonal_2D(plt, 'total', axes[0,0], axes[1,0], 'left', lat, density, varAtl, domrho, cmap, levels, clevsm, clevsm_bold)

    cnplot = zonal_2D(plt, 'total', axes[0,1], axes[1,1], 'mid', lat, density, varPac, domrho, cmap, levels, clevsm, clevsm_bold)

    cnplot = zonal_2D(plt, 'total', axes[0,2], axes[1,2], 'right', lat, density, varInd, domrho, cmap, levels, clevsm, clevsm_bold)

else:
    levels = np.linspace(minmax[0], minmax[1], minmax[2])
    cmap = custom_div_cmap() # plt.get_cmap('bwr')

    cnplot = zonal_2D(plt, 'total_mme', axes[0, 0], axes[1, 0], 'left', lat, density, varAtl, domrho, cmap, levels, clevsm, clevsm_bold)

    cnplot = zonal_2D(plt, 'total_mme', axes[0, 1], axes[1, 1], 'mid', lat, density, varPac, domrho, cmap, levels, clevsm, clevsm_bold)
Ejemplo n.º 2
0
    'bowl2': bowl2z[3, :],
    'labBowl': labBowl,
    'density': density_z[3, :, :]
}

# -------------------------------------------------------------------------------
#                                Plot
# -------------------------------------------------------------------------------

domzed = [0, 500, 2000]

# -- Create figure and axes instances
fig, axes = plt.subplots(nrows=2, ncols=3, figsize=(17, 5))

# -- color map
cmap = custom_div_cmap()

# -- levels
levels = np.linspace(minmax[0], minmax[1], minmax[2])  # Change
#levels = np.arange(33.5,35.5,0.2) # Mean salinity
#levels = np.arange(-2,30,2) # Mean temperature
#levels = np.arange(0,701,50) # Mean volume

ext_cmap = 'both'
contourDict = {
    'cmap': cmap,
    'levels': levels,
    'ext_cmap': ext_cmap,
    'isopyc': False
}
Ejemplo n.º 3
0
plt.subplots_adjust(hspace=.0001, wspace=0.05, left=0.04, right=0.86)

cb = plt.colorbar(cnplot1, ax=axes.ravel().tolist(), ticks=levels[::3])

plt.suptitle('dS/dy (%s)' %(name,),
          fontweight='bold', fontsize=14, verticalalignment='top')

#plt.close()

# ==== dS/dy change ====

fig2, axes = plt.subplots(nrows=2, ncols=3, figsize=(17,5))

levels = np.linspace(-0.1,0.1,16)
cmap = custom_div_cmap()

cnplot2 = zonal_2D(plt, 'spiciness_change', axes[0,0], axes[1,0], 'left', lat, density, varAtl,
                   domrho, cmap, levels)

cnplot2 = zonal_2D(plt, 'spiciness_change', axes[0,1], axes[1,1], 'mid', lat, density, varPac,
                   domrho, cmap, levels)

cnplot2 = zonal_2D(plt, 'spiciness_change', axes[0,2], axes[1,2], 'right', lat, density, varInd,
                   domrho, cmap, levels)


plt.subplots_adjust(hspace=.0001, wspace=0.05, left=0.04, right=0.86)

cb = plt.colorbar(cnplot1, ax=axes.ravel().tolist(), ticks=levels[::3])