import numpy as np
import Nio
import matplotlib.pyplot as plt
import matplotlib
from mpl_toolkits import basemap

filename = "http://rda.ucar.edu/thredds/dodsC/files/g/ds728.2/netcdf/gpcp_v2.2.2015.nc"
nc = Nio.open_file(filename)

precip=nc.variables['Precip'][0,:,:]   # Read first time step

plt.imshow(precip)
plt.colorbar(orientation='horizontal',pad=0.06)
plt.savefig('gpcp_opendap_pcp_mpl.png')
plt.close()
