%matplotlib inline
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import numpy as np

def basemap(wave,mean):
	# set up orthographic map projection with
	# perspective of satellite looking down at 50N, 100W.
	# use low resolution coastlines.
	map = Basemap(projection='ortho',lat_0=45,lon_0=-100,resolution='l')
	# draw coastlines, country boundaries, fill continents.
	map.drawcoastlines(linewidth=0.25)
	map.drawcountries(linewidth=0.25)
	map.fillcontinents(color='coral',lake_color='aqua')
	# draw the edge of the map projection region (the projection limb)
	map.drawmapboundary(fill_color='aqua')
	# draw lat/lon grid lines every 30 degrees.
	map.drawmeridians(np.arange(0,360,30))
	map.drawparallels(np.arange(-90,90,30))

	# make up some data on a regular lat/lon grid.
	nlats = wave.shape[0]
	nlons = wave.shape[1]

	delta = 2.*np.pi/(nlons-1)
	lats = (0.5*np.pi-delta*np.indices((nlats,nlons))[0,:,:])
	lons = (delta*np.indices((nlats,nlons))[1,:,:])

	# compute native map projection coordinates of lat/lon grid.
	x, y = map(lons*180./np.pi, lats*180./np.pi)

	# contour data over the map.
	cs = map.contour(x,y,wave+mean,15,linewidths=1.5)
	plt.show()
