Updating old notebook to include hindcast.

In [1]:
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import netCDF4 as nc
import seaborn as sns
import matplotlib.colors as mcolors
import glob
import os

from salishsea_tools import viz_tools

import ONC_patrols as onc

from IPython.core.display import display, HTML
display(HTML("<style>.container { width:90% !important; }</style>"))

%matplotlib inline
In [2]:
sns.set_color_codes()
In [3]:
grid_B_new=nc.Dataset('/data/vdo/MEOPAR/NEMO-forcing/grid/bathymetry_201702.nc')
mesh_mask_new=nc.Dataset('/data/vdo/MEOPAR/NEMO-forcing/grid/mesh_mask201702.nc')
grid_B=nc.Dataset('/data/nsoontie/MEOPAR/NEMO-forcing/grid/bathy_meter_SalishSea2.nc')
mesh_mask=nc.Dataset('/data/nsoontie/MEOPAR/NEMO-forcing/grid/mesh_mask_SalishSea2.nc')
badQC=[0,3,4,9]

Victoria

In [10]:
file = "/ocean/nsoontie/MEOPAR/ONC/Patrols/Victoria_Patrol9_CTD_20150220T182104Z_20151001T195734Z-Corrected.csv"
In [11]:
data= onc.load_patrol_csv(file)
data = onc.exclude_bad(data,['Practical Salinity Corrected QC Flag  '], badQC)
data = onc.divide_into_casts(data)
In [12]:
names={'obs': 'Practical Salinity Corrected (psu)',
       'model': 'vosaline'}
onc.compare_patrol_model_obs(data, names, grid_B, mesh_mask, grid_B_new, mesh_mask_new, var_lims=[28,34])