March HS1

In [20]:
import xarray as xr
import matplotlib.pyplot as plt
import numpy.ma as ma
%matplotlib inline
import netCDF4 as nc
from salishsea_tools import nc_tools
In [3]:
mar = xr.open_dataset('/ocean/vdo/MEOPAR/analysis-sprints/1_output.abort.nc')
In [22]:
mar.vosaline.isel(deptht=0).plot()
#plt.plot(121,532,'ro')
Out[22]:
<matplotlib.collections.QuadMesh at 0x7fb0eb482fd0>
In [8]:
mar.votemper.isel(deptht = 0).plot()
Out[8]:
<matplotlib.collections.QuadMesh at 0x7f6e2a5954e0>
In [15]:
mar.vomecrty.isel(deptht=0).plot(figsize=((14,12)),#vmin=-1,vmax=1
                                )
Out[15]:
<matplotlib.collections.QuadMesh at 0x7f6e20ff89e8>
In [16]:
mar.vozocrtx.isel(deptht=0).plot()
Out[16]:
<matplotlib.collections.QuadMesh at 0x7f6e20eee3c8>
In [27]:
mar.sossheig.plot(figsize=((10,8)),vmin = -0.4,vmax = 1.5)
Out[27]:
<matplotlib.collections.QuadMesh at 0x7f6e203aedd8>
In [9]:
mar_n = nc.Dataset('/ocean/vdo/MEOPAR/analysis-sprints/1_output.abort.nc')
mesh = nc.Dataset('/data/vdo/MEOPAR/files')
In [11]:
tmask = mesh.variables['tmask']
In [15]:
fig,ax = plt.subplots(1,1,figsize=(10,8))
masked = ma.masked_array(mar_n.variables['votemper'][0,:,314,:],mask=1-tmask[0,:,314,:])
mesh = ax.pcolormesh(masked)
fig.colorbar(mesh)
Out[15]:
<matplotlib.colorbar.Colorbar at 0x7fb0f05a27f0>
In [ ]: