In [1]:
import netCDF4 as nc
import matplotlib.pyplot as plt
import numpy.ma as ma
%matplotlib inline

mask = nc.Dataset('/data/vdo/MEOPAR/NEMO-forcing/grid/mesh_mask201702.nc')
abort = nc.Dataset('/ocean/vdo/MEOPAR/completed-runs/output.abort.nc')

fig,ax = plt.subplots(1,1,figsize = ((10,8)))
ssh = ma.masked_array(abort.variables['vosaline'][0,4,:,:], mask = 1 - mask.variables['tmask'][0,4,:,:])
mesh = ax.pcolormesh(ssh, vmin = 10, vmax = 33
                    )
fig.colorbar(mesh)
plt.plot(127,733,'ro')
plt.title('Salinity')
Out[1]:
<matplotlib.text.Text at 0x7f009b02d748>
In [2]:
fig,ax = plt.subplots(1,1,figsize = ((10,8)))
ssh = ma.masked_array(abort.variables['votemper'][0,4,:,:], mask = 1 - mask.variables['tmask'][0,4,:,:])
mesh = ax.pcolormesh(ssh, vmin = 6, vmax = 22
                    )
fig.colorbar(mesh)
plt.plot(127,733,'ro')
plt.title('Temperature')
Out[2]:
<matplotlib.text.Text at 0x7f009ac34400>
In [ ]: