#!/usr/bin/env python # coding: utf-8 # Looking at JEMS data # In[1]: import matplotlib.pyplot as plt import numpy as np import pandas as pd import os import datetime import netCDF4 as nc import seaborn as sns import glob import JEMS from salishsea_tools import tidetools, viz_tools get_ipython().run_line_magic('matplotlib', 'inline') # In[2]: sns.set_style('darkgrid') # In[3]: sdt = datetime.datetime(2014,10,27) edt = datetime.datetime(2015,12,31) # In[4]: grid_B = nc.Dataset('/data/nsoontie/MEOPAR/NEMO-forcing/grid/bathy_meter_SalishSea2.nc') # In[5]: nowcasts= '/data/dlatorne/MEOPAR/SalishSea/nowcast/' # Dotted lines are mean +- 2 standard deviations. # In[6]: figmap, fig = JEMS.compare_JEMS_model('ADM001', sdt,edt, grid_B, nowcasts,smin=25) # In[7]: figmap, fig = JEMS.compare_JEMS_model('ADM002', sdt,edt, grid_B, nowcasts,smin=30, smax=33) # In[8]: figmap, fig = JEMS.compare_JEMS_model('BLL009', sdt,edt, grid_B, nowcasts,smin=20, tmin=7) # In[9]: figmap, fig = JEMS.compare_JEMS_model('GRG002', sdt,edt, grid_B, nowcasts, smin=15) # Deep water is too fresh but, in general, the profiles have a similar structure. # In[10]: figmap, fig = JEMS.compare_JEMS_model('PSS019', sdt,edt, grid_B, nowcasts,smin=15, tmax=13) # These comaprisons look very good. # In[11]: figmap, fig = JEMS.compare_JEMS_model('SEQ002', sdt,edt, grid_B, nowcasts,smin=30,smax=34,tmin=5,tmax=10) # Is there something off with the salinity observation? # In[12]: figmap, fig = JEMS.compare_JEMS_model('SKG003', sdt,edt, grid_B, nowcasts,smin=10,tmin=6,tmax=15) # There is a lot of diurnal variability in the salinity at this station, at all depths. Are there rivers close by? # #Summary # # * We haven't looked carefully at the stratificaiton in Puget Sound. There are many more stations that we could compare with. # * Our model depths are sometimes a lot shallower than the observed depths. Even if we take into account the partial step correction, we are still typically shallower. But the bathymetry is super complicated and we have to make compromises! # * Station GRG002 is most interesting to me because it is close to the Boundary Pass waters. We are too fresh at depth here. But, the stratitification profile is similar to observations for the 4 comparisons shown here. # * Some of the JEMS data (2015) is marked as preliminary. # * Too bad I can't get the SJDF001 stations... # In[ ]: