import xarray as xr
import numpy as np
%matplotlib inline
import matplotlib.pyplot as plt
import cmocean
TN = xr.open_dataset('/home/vdo/MEOPAR/SalishSea/SalishSeaLakeJan/SalishSea_1h_20170101_20170101_grid_T.nc')
UN = xr.open_dataset('/home/vdo/MEOPAR/SalishSea/SalishSeaLakeJan/SalishSea_1h_20170101_20170101_grid_U.nc')
VN = xr.open_dataset('/home/vdo/MEOPAR/SalishSea/SalishSeaLakeJan/SalishSea_1h_20170101_20170101_grid_V.nc')
WN = xr.open_dataset('/home/vdo/MEOPAR/SalishSea/SalishSeaLakeJan/SalishSea_1h_20170101_20170101_grid_W.nc')
TS = xr.open_dataset('/home/vdo/MEOPAR/SalishSea/JanS0.1/SalishSea_1h_20170101_20170102_grid_T.nc')
US = xr.open_dataset('/home/vdo/MEOPAR/SalishSea/JanS0.1/SalishSea_1h_20170101_20170102_grid_U.nc')
VS = xr.open_dataset('/home/vdo/MEOPAR/SalishSea/JanS0.1/SalishSea_1h_20170101_20170102_grid_V.nc')
WS = xr.open_dataset('/home/vdo/MEOPAR/SalishSea/JanS0.1/SalishSea_1h_20170101_20170102_grid_W.nc')
bathy = xr.open_dataset('/home/vdo/MEOPAR/NEMO-forcing/grid/bathy_downonegrid2.nc')
figs,(ax1,ax2) = plt.subplots(1,2,sharey = True,figsize = (10,8))
TN.sossheig.isel(time_counter = 0).plot(ax=ax1)
TS.sossheig.isel(time_counter = 0).plot(ax=ax2)
<matplotlib.collections.QuadMesh at 0x7f5fb73efa20>
figs,(ax1,ax2) = plt.subplots(1,2,sharey = True,figsize = (10,8))
TN.sossheig.isel(time_counter = 23).plot(ax=ax1)
TS.sossheig.isel(time_counter = 23).plot(ax=ax2)
<matplotlib.collections.QuadMesh at 0x7f5fb683b2b0>
figs,(ax1,ax2) = plt.subplots(1,2,sharey = True,figsize = (10,8))
VN.vomecrty.isel(depthv = 0,time_counter = 0).plot(ax = ax1)
VS.vomecrty.isel(depthv = 0,time_counter = 0).plot(ax = ax2)
<matplotlib.collections.QuadMesh at 0x7f5fb5c922e8>
figs,(ax1,ax2) = plt.subplots(1,2,sharey = True,figsize = (10,8))
VN.vomecrty.isel(depthv = 0,time_counter = 23).plot(ax = ax1)
VS.vomecrty.isel(depthv = 0,time_counter = 23).plot(ax = ax2)
<matplotlib.collections.QuadMesh at 0x7f5fb5032a20>
figs,(ax1,ax2) = plt.subplots(1,2,sharey = True,figsize=(20,8))
VN.vomecrty.isel(y=150,time_counter=23).plot.contourf(ax=ax1,levels = np.arange(-0.3,0.35,0.05),cmap = cmocean.cm.curl)
VS.vomecrty.isel(y=150,time_counter=23).plot(ax=ax2)
ax1.set_ylim((50,0))
ax2.set_ylim((50,0))
<matplotlib.collections.PolyCollection at 0x7fd48831d080>
bathy.Bathymetry.isel(y=150)
<xarray.DataArray 'Bathymetry' (x: 398)> array([ nan, nan, nan, ..., nan, nan, nan]) Dimensions without coordinates: x Attributes: units: metres