March HS1
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
mar = xr.open_dataset('/ocean/vdo/MEOPAR/analysis-sprints/1_output.abort.nc')
mar.vosaline.isel(deptht=0).plot()
#plt.plot(121,532,'ro')
<matplotlib.collections.QuadMesh at 0x7fb0eb482fd0>
mar.votemper.isel(deptht = 0).plot()
<matplotlib.collections.QuadMesh at 0x7f6e2a5954e0>
mar.vomecrty.isel(deptht=0).plot(figsize=((14,12)),#vmin=-1,vmax=1
)
<matplotlib.collections.QuadMesh at 0x7f6e20ff89e8>
mar.vozocrtx.isel(deptht=0).plot()
<matplotlib.collections.QuadMesh at 0x7f6e20eee3c8>
mar.sossheig.plot(figsize=((10,8)),vmin = -0.4,vmax = 1.5)
<matplotlib.collections.QuadMesh at 0x7f6e203aedd8>
mar_n = nc.Dataset('/ocean/vdo/MEOPAR/analysis-sprints/1_output.abort.nc')
mesh = nc.Dataset('/data/vdo/MEOPAR/files')
tmask = mesh.variables['tmask']
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)
<matplotlib.colorbar.Colorbar at 0x7fb0f05a27f0>