#!/usr/bin/env python # coding: utf-8 # Noteboook to test analyze.py functions # # Test analyze.py module # In[1]: from __future__ import division import datetime from glob import glob import os from IPython.core.display import HTML import netCDF4 as nc from salishsea_tools.nowcast import figures from salishsea_tools.nowcast import analyze get_ipython().run_line_magic('matplotlib', 'inline') # In[2]: import matplotlib.pyplot as plt # In[3]: bathy = nc.Dataset('/data/nsoontie/MEOPAR/NEMO-forcing/grid/bathy_meter_SalishSea2.nc') # In[4]: path='/data/dlatorne/MEOPAR/SalishSea/nowcast/' # In[5]: t_orig=datetime.datetime(2015,2,20); t_final=datetime.datetime(2015, 2, 24) # # Functions # In[6]: reload(analyze) # In[7]: files_all=analyze.get_filenames(t_orig, t_final, '1h', 'grid_T', path) # In[8]: fig = analyze.compare_ssh_tides(bathy, files_all, t_orig, t_final, 'Point Atkinson') # In[ ]: