import iris
iris.FUTURE.netcdf_promote = True
print(iris.__version__)
import os.path
os.path.abspath(iris.__file__)
1.7.2-DEV
'/home/usgs/anaconda/lib/python2.7/site-packages/iris/__init__.pyc'
%load_ext pymatbridge
The pymatbridge extension is already loaded. To reload it, use: %reload_ext pymatbridge
import iris.plot as iplt
import matplotlib.pyplot as plt
def plot_profile(c):
coord = c.coord('sea_surface_height_above_reference_ellipsoid')
lon = c.coord(axis='X').points.squeeze()
lat = c.coord(axis='Y').points.squeeze()
depth = coord.points.min()
fig, ax = plt.subplots(figsize=(5, 6))
kw = dict(linewidth=2, color=(.3, .4, .5),
alpha=0.75, marker='o', label='iris')
iplt.plot(c, coord, **kw)
ax.grid()
ax.set_ylabel('{} ({})'.format(coord.standard_name, coord.units))
ax.set_xlabel('{} ({})'.format(c.name(), c.units))
ax.set_title('lon: %s\nlat: %s\nMax depth = %s' % (lon, lat, depth))
return fig, ax
a=2
%%matlab -i a -o b
b=a^3;
print b
8
%%matlab
peaks;
colorbar;
z = 3*(1-x).^2.*exp(-(x.^2) - (y+1).^2) ... - 10*(x/5 - x.^3 - y.^5).*exp(-x.^2-y.^2) ... - 1/3*exp(-(x+1).^2 - y.^2)