#Generate a random flow field
accum  = np.random.random(size=dem.shape)

#Modify the flow field into a flow accumulation field in place. A view of
#the modified data is returned as a metadata-enriched rdarray.
accum  = rd.FlowAccumulation(dem, method='D8', weights=accum, in_place=True)

d8_fig = rd.rdShow(accum, zxmin=450, zxmax=550, zymin=550, zymax=450, figsize=(8,5.5), axes=False, cmap='jet')