#!/usr/bin/env python
"""
Create a .tif file with accumulated precip over Beijing.
"""

import numpy as np
import pylab as pl
from netCDF4 import Dataset

f=Dataset('/global/cfs/cdirs/e3sm/www/petercal/other/PRECTacc_Beijing.nc')
prac=f.variables['PRECTacc']
lat=f.variables['lat']
lon=f.variables['lon']

LON,LAT=pl.meshgrid(lon,lat)
pl.contourf(LON,LAT,prac[-1,:,:])
pl.savefig('/global/cfs/cdirs/e3sm/www/petercal/other/hires_Beijing_pcp.tif')
pl.show()

