예제 #1
0
fr = FlowRouter(mg)
sp = SPEroder(mg, input_file)
vid = VideoPlotter(mg, data_centering='node')

time_on = time()
#perform the loops:
for i in xrange(nt):
    print 'loop ', i
    mg['node']['planet_surface__elevation'][mg.core_nodes] += uplift_per_step
    mg = fr.route_flow(grid=mg)
    mg = sp.erode(mg)
    #vid.add_frame(mg, 'planet_surface__elevation')
    vid.add_frame(mg, mg.hillshade(alt=15.), cmap='gray')
    
 
print 'Completed the simulation. Plotting...'

time_off = time()

#Finalize and plot

elev = mg['node']['planet_surface__elevation']
#imshow.imshow_node_grid(mg, elev)

print('Done.')
print 'Time: ', time_off-time_on

#pylab.show()

vid.produce_video(override_min_max=(0,1))
#vid.produce_video()
예제 #2
0
fr = FlowRouter(mg)
sp = SPEroder(mg, input_file)
vid = VideoPlotter(mg, data_centering='node')

time_on = time()
#perform the loops:
for i in xrange(nt):
    print 'loop ', i
    mg['node']['topographic_elevation'][mg.core_nodes] += uplift_per_step
    mg = fr.route_flow(grid=mg)
    mg = sp.erode(mg)
    #vid.add_frame(mg, 'topographic_elevation')
    vid.add_frame(mg, mg.hillshade(alt=15.), cmap='gray')

print 'Completed the simulation. Plotting...'

time_off = time()

#Finalize and plot

elev = mg['node']['topographic_elevation']
#imshow.imshow_node_grid(mg, elev)

print('Done.')
print 'Time: ', time_off - time_on

#pylab.show()

vid.produce_video(override_min_max=(0, 1))
#vid.produce_video()
예제 #3
0
        profile_IDs = prf.channel_nodes(mg, mg.at_node['topographic__steepest_slope'],
                        mg.at_node['drainage_area'], mg.at_node['flow_receiver'])
        dists_upstr = prf.get_distances_upstream(mg, len(mg.at_node['topographic__steepest_slope']),
                        profile_IDs, mg.at_node['links_to_flow_receiver'])
        prf.plot_profiles(dists_upstr, profile_IDs, mg.at_node['topographic__elevation'])

    #add uplift
    mg.at_node['topographic__elevation'][mg.core_nodes] += 5.*uplift*dt

    elapsed_time += dt

#Finalize and plot
elev = mg['node']['topographic__elevation']
elev_r = mg.node_vector_to_raster(elev)

vid.produce_video()

# Clear previous plots
pylab.figure("topo")
pylab.close()

# Plot topography
pylab.figure("topo")
#im = pylab.imshow(elev_r, cmap=pylab.cm.RdBu)  # display a colored image
im = llplot.imshow_node_grid(mg, elev)
#print elev_r
#pylab.colorbar(im)
#pylab.title('Topography')

pylab.figure("Xsec")
im = pylab.plot(dx*numpy.arange(nrows), elev_r[:,int(ncols//2)])  # display a colored image
예제 #4
0
        dists_upstr = prf.get_distances_upstream(
            mg, len(mg.at_node['steepest_slope']), profile_IDs,
            mg.at_node['links_to_flow_receiver'])
        prf.plot_profiles(dists_upstr, profile_IDs,
                          mg.at_node['topographic_elevation'])

    #add uplift
    mg.at_node['topographic_elevation'][mg.core_nodes] += 5. * uplift * dt

    elapsed_time += dt

#Finalize and plot
elev = mg['node']['topographic_elevation']
elev_r = mg.node_vector_to_raster(elev)

vid.produce_video()

# Clear previous plots
pylab.figure("topo")
pylab.close()

# Plot topography
pylab.figure("topo")
#im = pylab.imshow(elev_r, cmap=pylab.cm.RdBu)  # display a colored image
im = llplot.imshow_node_grid(mg, elev)
#print elev_r
#pylab.colorbar(im)
#pylab.title('Topography')

pylab.figure("Xsec")
im = pylab.plot(dx * numpy.arange(nrows),