import numpy as np
import netCDF4 as nc
import matplotlib.pyplot as plt
%matplotlib inline
f = nc.Dataset('/ocean/vdo/MEOPAR/completed-runs/SalishSeaLake/test25/SalishSea_1ts_20160601_20160601_ptrc_T.nc')
np.unravel_index(np.argmax(f.variables['mytracer'][-1,...]), f.variables['mytracer'][-1,...].shape)
fig,ax=plt.subplots(1,1,figsize=(10,10))
pmesh=ax.pcolormesh(f.variables['mytracer'][-2,7,:,:],vmin=-5,vmax=5)
fig.colorbar(pmesh)
fig,ax=plt.subplots(1,1,figsize=(10,10))
pmesh=ax.pcolormesh(f.variables['mytracer'][-1,7,100:200,100:200],vmin=-5,vmax=5)
fig.colorbar(pmesh)
f2 = nc.Dataset('/ocean/vdo/MEOPAR/completed-runs/SalishSeaLake/test25/SalishSea_1ts_20160601_20160601_grid_T.nc')
fig,ax=plt.subplots(1,1,figsize=(10,10))
pmesh=ax.pcolormesh(f2.variables['vosaline'][-2,7,100:200,100:200],vmin=26,vmax=30)
fig.colorbar(pmesh)