Plots from abort and init files from runoff test of Haro Strait 1

In [1]:
import numpy as np
import netCDF4 as nc
import xarray as xr
import matplotlib.pyplot as plt
import numpy.ma as ma
%matplotlib inline
In [2]:
runoff_abort = nc.Dataset('/data/vdo/MEOPAR/completed-runs/runoff/1_output.abort.nc')
runoff_init = nc.Dataset('/data/vdo/MEOPAR/completed-runs/runoff/1_output.init.nc')
runoff_mask = nc.Dataset('/data/vdo/MEOPAR/completed-runs/runoff/1_mesh_mask.nc')
agrif_abort = nc.Dataset('/data/vdo/MEOPAR/completed-runs/changing_agrif/1_output.abort.nc')
agrif_init = nc.Dataset('/data/vdo/MEOPAR/completed-runs/changing_agrif/1_output.init.nc')
agrif_mask = nc.Dataset('/data/vdo/MEOPAR/completed-runs/changing_agrif/1_mesh_mask.nc')
vis_abort = nc.Dataset('/data/vdo/MEOPAR/completed-runs/viscosity/1_output.abort.nc')
vis_init = nc.Dataset('/data/vdo/MEOPAR/completed-runs/viscosity/1_output.init.nc')
vis_mask = nc.Dataset('/data/vdo/MEOPAR/completed-runs/viscosity/1_mesh_mask.nc')
In [62]:
fig,(ax1,ax2) = plt.subplots(1,2,figsize=((10,8)))
s = ma.masked_array(runoff_abort.variables['vosaline'][0,27,:,:], mask = 1 - runoff_mask.variables['tmask'][0,27,:,:])
mesh = ax1.pcolormesh(s)
fig.colorbar(mesh,ax=ax1)
ax1.plot(121,532,'ro')
plt.title('Salinity at deptht = 27')

s = ma.masked_array(runoff_abort.variables['vosaline'][0,:,532,:], mask = 1 - runoff_mask.variables['tmask'][0,:,532,:])
mesh = ax2.pcolormesh(s)
fig.colorbar(mesh,ax=ax2)
ax2.plot(121,27,'ro')
ax2.set_ylim((33,0))
plt.title('Salinity Slice at Y = 532')
Out[62]:
<matplotlib.text.Text at 0x7f3172d4ae10>
In [51]:
fig,(ax1,ax2) = plt.subplots(1,2,figsize=((10,8)))
s = ma.masked_array(runoff_abort.variables['votemper'][0,27,:,:], mask = 1 - runoff_mask.variables['tmask'][0,27,:,:])
mesh = ax1.pcolormesh(s)
fig.colorbar(mesh,ax=ax1)
ax1.plot(121,532,'ro')
plt.title('Temperature at deptht = 27')

s = ma.masked_array(runoff_abort.variables['votemper'][0,:,532,:], mask = 1 - runoff_mask.variables['tmask'][0,:,532,:])
mesh = ax2.pcolormesh(s)
fig.colorbar(mesh,ax=ax2)
ax2.plot(121,27,'ro')
ax2.set_ylim((33,0))
plt.title('Salinity Slice at Y = 532')
Out[51]:
<matplotlib.text.Text at 0x7f3178d71390>
In [63]:
fig,(ax1,ax2) = plt.subplots(1,2,figsize=(10,8))

s = ma.masked_array(runoff_abort.variables['vovecrtz'][0,27,:,:], mask = 1 - runoff_mask.variables['tmask'][0,27,:,:]
                   )
mesh = ax1.pcolormesh(s,vmin = -0.05, vmax = 0.05
                  )
fig.colorbar(mesh,ax=ax1)
ax1.plot(121,532,'ro')
plt.title('Vovecrtz at deptht = 27')

s = ma.masked_array(runoff_abort.variables['vovecrtz'][0,:,532,:], mask = 1 - runoff_mask.variables['tmask'][0,:,532,:]
                   )
mesh = ax2.pcolormesh(s,#vmin = 0.0, vmax = 0.03
                    )
fig.colorbar(mesh,ax=ax2)
ax2.plot(121,27,'ro')
plt.title('Vovecrtz at Y = 532')
ax2.set_ylim((32,0))
Out[63]:
(32, 0)
In [57]:
fig,(ax1,ax2) = plt.subplots(1,2,figsize=((10,8)))
s = ma.masked_array(runoff_abort.variables['vomecrty'][0,27,:,:], mask = 1 - runoff_mask.variables['vmask'][0,27,:,:]
                   )
mesh = ax1.pcolormesh(s,#vmin = -0.01, vmax = 0.01
                    )
fig.colorbar(mesh,ax=ax1)
ax1.plot(121,532,'ro')
plt.title('Vomecrty at deptht = 27')

s = ma.masked_array(runoff_abort.variables['vomecrty'][0,:,532,:], mask = 1 - runoff_mask.variables['vmask'][0,:,532,:]
                   )
mesh = ax2.pcolormesh(s,#vmin = -0.01, vmax = 0.01
                    )
fig.colorbar(mesh,ax=ax2)
ax2.plot(121,27,'ro')
plt.title('Vomecrty at Y = 532')
ax2.set_ylim((32,0))
Out[57]:
(32, 0)
In [59]:
fig,(ax1,ax2) = plt.subplots(1,2,figsize=((10,8)))
s = ma.masked_array(runoff_abort.variables['vozocrtx'][0,27,:,:], mask = 1 - runoff_mask.variables['umask'][0,27,:,:]
                   )
mesh = ax1.pcolormesh(s,vmin = -0.4, vmax = 1
                    )
fig.colorbar(mesh,ax=ax1)
ax1.plot(121,532,'ro')
plt.title('Vozocrtx at deptht = 27')

s = ma.masked_array(runoff_abort.variables['vozocrtx'][0,:,532,:], mask = 1 - runoff_mask.variables['umask'][0,:,532,:]
                   )
mesh = ax2.pcolormesh(s,#vmin = -0.4, vmax = 1
                    )
fig.colorbar(mesh,ax=ax2)
ax2.plot(121,27,'ro')
plt.title('Vozocrtx at Y = 532')
ax2.set_ylim((32,0))
Out[59]:
(32, 0)
In [79]:
fig,ax = plt.subplots(1,1,figsize=((14,12)))
ssh = ma.masked_array(runoff_abort.variables['sossheig'][0,:,:],mask = 1 - runoff_mask.variables['tmask'][0,0,:,:])
mesh = ax.pcolormesh(ssh,vmin=0,vmax=1.6)
fig.colorbar(mesh)
plt.plot(121,532,'ro')
Out[79]:
[<matplotlib.lines.Line2D at 0x7f3172c56518>]
In [81]:
fig,ax = plt.subplots(1,1,figsize=((14,12)))
ssh = ma.masked_array(runoff_init.variables['sossheig'][0,:,:],mask = 1 - runoff_mask.variables['tmask'][0,0,:,:])
mesh = ax.pcolormesh(ssh,#vmin=0,vmax=1.6
                    )
fig.colorbar(mesh)
plt.plot(121,532,'ro')
Out[81]:
[<matplotlib.lines.Line2D at 0x7f317822cbe0>]
In [85]:
fig,(ax1,ax2) = plt.subplots(1,2,figsize=((12,14)))
s = ma.masked_array(runoff_init.variables['vosaline'][0,27,:,:], mask = 1 - runoff_mask.variables['tmask'][0,27,:,:])
mesh = ax1.pcolormesh(s)
fig.colorbar(mesh,ax=ax1)
ax1.plot(121,532,'ro')
plt.title('Salinity at deptht = 27')

s = ma.masked_array(runoff_init.variables['vosaline'][0,:,532,:], mask = 1 - runoff_mask.variables['tmask'][0,:,532,:])
mesh = ax2.pcolormesh(s)
fig.colorbar(mesh,ax=ax2)
ax2.plot(121,27,'ro')
ax2.set_ylim((33,0))
plt.title('Salinity Slice at Y = 532')
Out[85]:
<matplotlib.text.Text at 0x7f317235f358>
In [ ]: