# END INPUT DATA # ############################################################################## import os from setup import raster_outputs as ro from setup import prepare_data project = prepare_data.PrepareData(xls_config_file, make_directories=False) # Ensure timesteps is a list if timesteps is not 'collected_max': try: tmp = list(timesteps) except: tmp = [timesteps] timesteps = tmp if cellsize is None: cellsize = project.output_tif_cellsize # Make the tifs ro.make_me_some_tifs( sww_file, project.bounding_polygon, project.proj4string, my_time_step=timesteps, tif_output_subdir='/TIFS/', cell_size=cellsize, k_nearest_neighbours=k_nearest_neighbours)
# # END INPUT DATA # ############################################################################## import os from setup import raster_outputs as ro from setup import prepare_data project = prepare_data.PrepareData(xls_config_file, make_directories=False) # Ensure timesteps is a list if timesteps is not 'collected_max': try: tmp = list(timesteps) except: tmp = [timesteps] timesteps = tmp if cellsize is None: cellsize = project.output_tif_cellsize # Make the tifs ro.make_me_some_tifs(sww_file, project.bounding_polygon, project.proj4string, my_time_step=timesteps, tif_output_subdir='/TIFS/', cell_size=cellsize, k_nearest_neighbours=k_nearest_neighbours)
os.chdir(project.output_dir) if myid == 0 and numprocs > 1: print 'Number of processors %g ' % numprocs print 'That took %.2f seconds' % (time.time() - t0) print 'Communication time %.2f seconds' % domain.communication_time print 'Reduction Communication time %.2f seconds' \ % domain.communication_reduce_time print 'Broadcast time %.2f seconds' \ % domain.communication_broadcast_time anuga.utilities.sww_merge.sww_merge_parallel( project.scenario, np=numprocs, verbose=True, delete_old=True) # Make Geotif raster files if myid == 0: try: raster_outputs.make_me_some_tifs( sww_file='./' + project.scenario + '.sww', bounding_polygon=project.bounding_polygon, proj4string=project.proj4string, cell_size=project.output_tif_cellsize) except: print 'GeoTif creation failed, you can try manually using' + \ ' raster_outputs.py or anuga.utilities.plot_utils.Make_Geotif' barrier() finalize()