import circular, os import sys from anuga.shallow_water.data_manager import sww2dem from anuga.abstract_2d_finite_volumes.util import start_screen_catcher from os import sep name='circular' print 'output dir:', name which_var = 4 if which_var == 0: # Stage outname = name + '_stage' quantityname = 'stage' if which_var == 1: # Absolute Momentum outname = name + '_momentum' quantityname = '(xmomentum**2 + ymomentum**2)**0.5' #Absolute momentum if which_var == 2: # Depth outname = name + '_depth' quantityname = 'stage-elevation' #Depth if which_var == 3: # Speed outname = name + '_speed' quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-30)' #Speed if which_var == 4: # Elevation outname = name + '_elevation' quantityname = 'elevation' #Elevation print 'start sww2dem' sww2dem(name, basename_out = outname, quantity = quantityname, cellsize = 0.1, ## easting_min = circular.xmin, ## easting_max = circular.xmax, ## northing_min = circular.ymin, ## northing_max = circular.ymax, reduction = max, verbose = True, format = 'asc')