Changeset 4248


Ignore:
Timestamp:
Feb 9, 2007, 2:50:41 PM (17 years ago)
Author:
sexton
Message:

updates

Files:
11 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/abstract_2d_finite_volumes/util.py

    r4244 r4248  
    1515
    1616from anuga.geospatial_data.geospatial_data import ensure_absolute
    17 from anuga_parallel.parallel_api import barrier
    1817
    1918def file_function(filename,
     
    509508
    510509    dir_name = dir_name
    511     if myid == 0 and access(dir_name,F_OK) == 0:
    512 #        if access(dir_name,F_OK) == 0:
     510    if access(dir_name,W_OK) == 0:
    513511        print 'Make directory %s' %dir_name
    514         print "myid", myid
    515512        mkdir (dir_name,0777)
    516     barrier()
    517513    screen_output_name = dir_name + "screen_output_%d_%d.txt" %(myid,numprocs)
    518514    screen_error_name = dir_name + "screen_error_%d_%d.txt" %(myid,numprocs)
     
    789785       
    790786    if plot_quantity is None:
    791         plot_quantity = ['depth', 'speed', 'bearing']
     787        plot_quantity = ['depth', 'speed']
    792788    else:
    793789        assert type(plot_quantity) == list,\
     
    10641060                    vh = f(t, point_id = k)[3]
    10651061                    depth = w-z     
    1066                     m = sqrt(uh*uh + vh*vh)   
     1062                    m = sqrt(uh*uh + vh*vh)
    10671063                    if depth < 0.001:
    10681064                        vel = 0.0
    10691065                    else:
    1070                         vel = m / (depth + 1.e-30)
    1071                     bearing = calc_bearing(uh, vh)
     1066                        vel = m / (depth + 1.e-6/depth)
     1067                    #bearing = calc_bearing(uh, vh)
    10721068                    model_time[i,k,j] = t/60.0
    10731069                    stages[i,k,j] = w
     
    10771073                    momenta[i,k,j] = m
    10781074                    speed[i,k,j] = vel
    1079                     bearings[i,k,j] = bearing
     1075                    #bearings[i,k,j] = bearing
    10801076                    depths[i,k,j] = depth
    10811077                    thisgauge = gauges[k]
     
    11341130        savefig('profilefig')
    11351131
    1136     depth_axis = axis([time_min/60.0, time_max/60.0, -0.1, max(max_depths)*1.1])
    1137     stage_axis = axis([time_min/60.0, time_max/60.0, min(min_stages), max(max_stages)*1.1])
    1138     vel_axis = axis([time_min/60.0, time_max/60.0, min(max_speeds), max(max_speeds)*1.1])
    1139     mom_axis = axis([time_min/60.0, time_max/60.0, min(max_momentums), max(max_momentums)*1.1]) 
    1140 
     1132    elev_output = []
    11411133    if generate_fig is True:
     1134        depth_axis = axis([time_min/60.0, time_max/60.0, -0.1, max(max_depths)*1.1])
     1135        stage_axis = axis([time_min/60.0, time_max/60.0, min(min_stages), max(max_stages)*1.1])
     1136        vel_axis = axis([time_min/60.0, time_max/60.0, min(max_speeds), max(max_speeds)*1.1])
     1137        mom_axis = axis([time_min/60.0, time_max/60.0, min(max_momentums), max(max_momentums)*1.1])
    11421138        cstr = ['g', 'r', 'b', 'c', 'm', 'y', 'k']
    11431139        nn = len(plot_quantity)
    11441140        no_cols = 2
    1145         elev_output = []
     1141       
    11461142        if len(label_id) > 1: graphname_report = []
    11471143        pp = 1
  • anuga_work/production/newcastle_2006/export_results.py

    r4186 r4248  
    55from os import sep
    66
     7# first run
    78#time_dir = '20061207_035946' #bulli
    89#time_dir = '20061212_012802' #shovel
    9 time_dir = '20061212_064757' #yacaaba
     10#time_dir = '20061212_064757' #yacaaba
     11# second run
     12#time_dir = '20070119_055707' # yacaaba
     13time_dir = '20070121_213838' # shovel
     14#time_dir = '20070119_055809' # bulli
    1015
    1116directory = project_slide.outputdir
     
    2631
    2732if which_var == 2:  # Depth
    28     outname = name + '_depth'
     33    outname = name + '_depth-shovel'
    2934    quantityname = 'stage-elevation' 
    3035
     
    5863    sww2dem(name, basename_out = outname,
    5964                quantity = quantityname,
    60                 cellsize = 100,     
     65                cellsize = 25,     
    6166                easting_min = project_slide.eastingmin,
    6267                easting_max = project_slide.eastingmax,
  • anuga_work/production/newcastle_2006/run_newcastle_slide.py

    r4186 r4248  
    143143from smf import slide_tsunami
    144144
    145 tsunami_source = slide_tsunami(length=project_slide.yacaaba_length,
    146                                width=project_slide.yacaaba_width,
    147                                depth=project_slide.yacaaba_depth,
    148                                slope=project_slide.yacaaba_slope,
    149                                thickness=project_slide.yacaaba_thickness,
    150                                x0=project_slide.slide_origin_yacaaba_a[0],
    151                                y0=project_slide.slide_origin_yacaaba_a[1],
    152                                alpha=project_slide.yacaaba_alpha,
     145tsunami_source = slide_tsunami(length=project_slide.shovel_length,
     146                               width=project_slide.shovel_width,
     147                               depth=project_slide.shovel_depth,
     148                               slope=project_slide.shovel_slope,
     149                               thickness=project_slide.shovel_thickness,
     150                               x0=project_slide.slide_origin_shovel_c[0],
     151                               y0=project_slide.slide_origin_shovel_c[1],
     152                               alpha=project_slide.shovel_alpha,
    153153                               domain=domain)
    154154
  • anuga_work/production/onslow_2006/MOST_timeseries.py

    r3514 r4248  
    4949                              reportname = 'latexoutput_MOST_ANUGA_comparison',
    5050                              plot_quantity = ['stage', 'speed'],
     51                              generate_fig = True,
    5152                              surface = False,
    5253                              time_min = None,
  • anuga_work/production/onslow_2006/compare_parameter_change.py

    r3965 r4248  
    6565                              reportname = 'latexoutputparameterchange',
    6666                              plot_quantity = ['stage', 'speed'],
     67                              generate_fig = True,
    6768                              surface = False,
    6869                              time_min = None,
  • anuga_work/production/onslow_2006/compare_timeseries_data.py

    r3514 r4248  
    4545                              surface = False,
    4646                              plot_quantity = plot_quantity,
     47                              generate_fig = True,
    4748                              time_min = None,
    4849                              time_max = None,
  • anuga_work/production/onslow_2006/make_report.py

    r4151 r4248  
    133133                                                      reportname = reportname,
    134134                                                      plot_quantity = ['stage', 'momentum'],
     135                                                      generate_fig = True,
    135136                                                      surface = False,
    136137                                                      time_min = None,
     
    161162                                              reportname = reportname,
    162163                                              plot_quantity = ['stage', 'speed'],
     164                                              generate_fig = True,
    163165                                              surface = False,
    164166                                              time_min = None,
  • anuga_work/production/sydney_2006/export_results.py

    r4186 r4248  
    77#time_dir = '20061211_071516' #bulli
    88#time_dir = '20061212_012705' #shovel
    9 time_dir = '20061212_064807' #yacaaba
     9#time_dir = '20061212_064807' #yacaaba
     10
     11#time_dir = '20070121_213509' #shovel
     12#time_dir = '20070119_055222' #yacaaba
     13time_dir = '20070121_213444' #bulli
     14
    1015
    1116directory = project_slide.outputdir
     
    2631
    2732if which_var == 2:  # Depth
    28     outname = name + '_depth'
     33    outname = name + '_depth-bulli'
    2934    quantityname = 'stage-elevation' 
    3035
  • anuga_work/production/sydney_2006/run_sydney_slide.py

    r4186 r4248  
    163163from smf import slide_tsunami
    164164
    165 tsunami_source = slide_tsunami(length=project_slide.yacaaba_length,
    166                                width=project_slide.yacaaba_width,
    167                                depth=project_slide.yacaaba_depth,
    168                                slope=project_slide.yacaaba_slope,
    169                                thickness=project_slide.yacaaba_thickness,
    170                                x0=project_slide.slide_origin_yacaaba_a[0],
    171                                y0=project_slide.slide_origin_yacaaba_a[1],
    172                                alpha=project_slide.yacaaba_alpha,
     165tsunami_source = slide_tsunami(length=project_slide.shovel_length,
     166                               width=project_slide.shovel_width,
     167                               depth=project_slide.shovel_depth,
     168                               slope=project_slide.shovel_slope,
     169                               thickness=project_slide.shovel_thickness,
     170                               x0=project_slide.slide_origin_shovel_b[0],
     171                               y0=project_slide.slide_origin_shovel_b[1],
     172                               alpha=project_slide.shovel_alpha,
    173173                               domain=domain)
    174174
  • anuga_work/production/wollongong_2006/export_results.py

    r4186 r4248  
    55from os import sep
    66
     7# first run
    78#time_dir = '20061211_060105' #bulli
    89#time_dir = '20061212_012715' #shovel
    9 time_dir = '20061212_064735' #yacaaba
     10#time_dir = '20061212_064735' #yacaaba
     11
     12# second run
     13#time_dir = '20070121_213616' #yacaaba
     14#time_dir = '20070121_213550' #bulli
     15#time_dir = '20070119_055620' #shovel
     16
     17# timing run - flux limiter in place
     18time_dir = '20070208_045514' # bulli
     19#time_dir = '20070208_044802' # for version without new flux limiter
    1020
    1121directory = project_slide.outputdir
     
    2636
    2737if which_var == 2:  # Depth
    28     outname = name + '_depth'
     38    outname = name + '_depth-bulli-fluxlimiter'
    2939    quantityname = 'stage-elevation' 
    3040
  • anuga_work/production/wollongong_2006/run_gong_slide.py

    r4186 r4248  
    147147from smf import slide_tsunami
    148148
    149 tsunami_source = slide_tsunami(length=project_slide.yacaaba_length,
    150                                width=project_slide.yacaaba_width,
    151                                depth=project_slide.yacaaba_depth,
    152                                slope=project_slide.yacaaba_slope,
    153                                thickness=project_slide.yacaaba_thickness,
    154                                x0=project_slide.slide_origin_yacaaba_a[0],
    155                                y0=project_slide.slide_origin_yacaaba_a[1],
    156                                alpha=project_slide.yacaaba_alpha,
     149tsunami_source = slide_tsunami(length=project_slide.bulli_length,
     150                               width=project_slide.bulli_width,
     151                               depth=project_slide.bulli_depth,
     152                               slope=project_slide.bulli_slope,
     153                               thickness=project_slide.bulli_thickness,
     154                               x0=project_slide.slide_origin_bulli[0],
     155                               y0=project_slide.slide_origin_bulli[1],
     156                               alpha=project_slide.bulli_alpha,
    157157                               domain=domain)
    158158
Note: See TracChangeset for help on using the changeset viewer.