import cmocean.cm as cm
import matplotlib.pyplot as plt
import xarray as xr
%matplotlib inline
data = xr.open_dataset('/data/sallen/results/MEOPAR/new_waves/part2_06apr17/mean_T_06apr17.nc')
dataV = xr.open_dataset('/data/sallen/results/MEOPAR/new_waves/part2_06apr17/mean_V_06apr17.nc')
bathy = xr.open_dataset('/home/sallen/MEOPAR/sea_initial/bathymetry_201803b.nc')
fig, axs = plt.subplots(1, 3, figsize=(15, 4))
data.vosaline[0, :, 420, 230:300].plot(ax=axs[0], vmin=24, cmap=cm.haline)
data.votemper[0, :, 420, 230:300].plot(ax=axs[1], cmap=cm.thermal)
dataV.vomecrty[0, :, 420, 230:300].plot(ax=axs[2], cmap=cm.balance)
for ax in axs:
ax.invert_yaxis()
ax.set_ylim((350, 0))
difference_sal = data.vosaline[0, :, 420, 230:300]-data.vosaline[0, :, 420, 333]
fig, axs = plt.subplots(1, 3, figsize=(15, 4))
(data.vosaline[0, :, 420, 230:300]-data.vosaline[0, :, 420, 263]).plot(ax=axs[0], cmap=cm.balance, vmax=0.1, vmin=-0.1)
(data.votemper[0, :, 420, 230:300]-data.votemper[0, :, 420, 263]).plot(ax=axs[1], cmap=cm.balance, vmax=0.1, vmin=-0.1)
dataV.vomecrty[0, :, 420, 230:300].plot(ax=axs[2], cmap=cm.balance)
for ax in axs:
ax.invert_yaxis()
ax.set_ylim((350, 0))
bathy.Bathymetry[350:500, 230:330].plot()
<matplotlib.collections.QuadMesh at 0x7f819c3b0550>
dataV.vomecrty[0, 25, 350:500, 230:330].plot()
<matplotlib.collections.QuadMesh at 0x7f81952ee048>