#!/usr/bin/env python # coding: utf-8 # In[1]: import numpy as np import matplotlib.pyplot as plt import netCDF4 as nc get_ipython().run_line_magic('matplotlib', 'inline') # In[2]: fbathy=nc.Dataset('/data/eolson/results/MEOPAR/NEMO-forcing-new/grid/bathymetry_201702.nc') # In[3]: fphy=nc.Dataset('/results/SalishSea/nowcast-green.201812/01jun16/SalishSea_1d_20160601_20160601_ptrc_T.nc') # In[4]: fbathy.variables.keys() # In[5]: fphy.variables.keys() # In[6]: fbathy.variables['Bathymetry'] # In[7]: fig,ax=plt.subplots(1,1,figsize=(5,10)) ax.pcolormesh(fphy.variables['mesozooplankton'][0,0,:,:]) ax.contour(fbathy.variables['Bathymetry'][:,:],[100,],colors='w',linewidths=1) # In[8]: fig,ax=plt.subplots(1,1,figsize=(5,10)) ax.contourf(fphy.variables['mesozooplankton'][0,0,:,:],20) ax.contour(fbathy.variables['Bathymetry'][:,:],[100,],colors='w',linewidths=1) # In[9]: fbathy.close() fphy.close() # In[ ]: