<jupyter_start><jupyter_text>Investigate a Restart File<jupyter_code>%matplotlib inline
import matplotlib.pyplot as plt
import netCDF4 as NC
import numpy as np
from salishsea_tools import viz_tools
from salishsea_tools import tidetools
from salishsea_tools import nc_tools
filename = '/ocean/sallen/allen/research/MEOPAR/myResults/NEMO36_Tides/base_run/E5s/SalishSea_00055981_restart.nc'
fT = NC.Dataset(filename,'r')
# Check Dimensions
nc_tools.show_dimensions(fT)
# Check Variables
nc_tools.show_variables(fT)
sshn = fT.variables['sshn'][0,:]
print sshn.shape
me = sshn == 0
etan = np.ma.array(sshn,mask=me)
imin = 700; imax = 898; jmin = 100; jmax=300
imin = 750; imax = 800; jmin = 100; jmax=150
fig, ax = plt.subplots(1,1,figsize=(10,10))
mesh = ax.pcolormesh(etan[imin:imax,jmin:jmax])
fig.colorbar(mesh)
vvel =  fT.variables['vb'][0,:]
print vvel.shape
me = vvel == 0
v = np.ma.array(vvel,mask=me)
level = 0; imin = 00; imax = 898; jmin = 0; jmax=398
imin = 750; imax = 800; jmin = 100; jmax=150

fig, ax = plt.subplots(1,1,figsize=(10,10))
mesh = ax.pcolormesh(v[level,imin:imax,jmin:jmax])
fig.colorbar(mesh)
print level, v[level].max(), v[level].min()
sshb = fT.variables['sshb'][0,:]
print sshb.shape
me = sshb == 0
etab = np.ma.array(sshb,mask=me)
eta = etan - etab
imin = 750; imax = 800; jmin = 100; jmax=150
fig, ax = plt.subplots(1,1,figsize=(10,10))
mesh = ax.pcolormesh(eta[imin:imax,jmin:jmax])
fig.colorbar(mesh)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1538987688098495, 'fraction_numerical': 0.06429548563611491, 'mean_word_length': 6.0, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '79284', 'license': 'Apache-2.0', 'n_tokens_mistral': 712, 'n_tokens_neox': 635, 'n_words': 128, 'path': 'Susan/Restart File Investigator.ipynb', 'repo_name': 'SalishSeaCast/analysis', 'size': '1462'}