Changeset 4373


Ignore:
Timestamp:
Apr 13, 2007, 5:00:58 PM (18 years ago)
Author:
nick
Message:

update dampier

Location:
anuga_work/production/dampier_2006
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/dampier_2006/get_timeseries.py

    r4311 r4373  
    2323   
    2424# sww file created from URS boundary
    25 production_dirs = {'boundaries': '10000 yr wave height'
    26                    #'20070307_224017_run': 'URS boundary normal'
     25production_dirs = {#'boundaries': '10000 yr wave height'
     26                   '20070413_033455_run': 'URS boundary normal'
    2727                   }
    28 >>>>>>> .r4304
    2928
    3029   
    31 is_parallel = False
     30is_parallel = True
    3231if is_parallel == True:
    33     nodes = 2
     32    nodes = 8
    3433   
    3534# Generate figures
     
    4039#boundary_dir_filename= os.path.join(home,data,state,'onslow_tsunami_scenario_2006',an,bo,'SU-AU_high_res1.sww')
    4140#gauges_dir_name_simple =
    42 if is_parallel == True:
    43     print 'buggur'
     41if is_parallel is True:
     42    print 'bugger'
     43   
     44    for i in range(nodes):
     45        print 'Sending node %d of %d' %(i,nodes)
     46        swwfiles = {}
     47        #reportname = report_name + '_%s' %(i)
     48        for label_id in production_dirs.keys():
     49            if label_id == 'boundaries':
     50#                file_loc = project.boundaries_in_dir
     51                swwfile = best_boundary_sww
     52                print 'hi'
     53            else:
     54                file_loc = project.output_dir + label_id + sep
     55                sww_extra = '_P%s_%s' %(i,nodes)
     56                swwfile = file_loc + project.scenario_name + sww_extra + '.sww'
     57                print 'swwfile',swwfile
     58            swwfiles[swwfile] = label_id
     59
     60        texname, elev_output = sww2timeseries(swwfiles,
     61                                              project.gauges_dir_name_simple,
     62                                              production_dirs,
     63                                              report = False,
     64                                              #reportname = reportname,
     65                                              plot_quantity = ['stage', 'momentum'],
     66                                              generate_fig = False,
     67                                              surface = False,
     68                                              time_min = None,
     69                                              time_max = None,
     70                                              title_on = False,
     71                                              verbose = True)
     72           
     73            #latex_output.append(texname)
    4474   
    4575
     
    6090    texname, elev_output = sww2timeseries(swwfiles,
    6191                                          project.gauges_dir_name_simple,
    62 >>>>>>> .r4304
    6392                                          production_dirs,
    6493                                          report = False,
  • anuga_work/production/dampier_2006/project.py

    r4357 r4373  
    2828print 'gtime: ', gtime
    2929
     30#tide = -2.5
     31#tide = 0.0
    3032tide = 2.4
    3133
     
    150152print 'Area of bounding polygon', polygon_area(poly_all)/1000000.0
    151153
    152 res_poly_all = 400000
    153 #res_poly_all = 500000
     154#res_poly_all = 400000
     155res_poly_all = 150000
    154156
    155157###############################
     
    161163
    162164poly_dampier = read_polygon(polygons_dir+'dampier_town.csv')
    163 res_dampier = 1000
    164 #res_dampier = 500
    165 #res_dampier = 5000
     165#res_dampier = 1000
     166res_dampier = 500
    166167
    167168poly_karratha = read_polygon(polygons_dir+'karrathav2.csv')
     
    169170
    170171poly_karratha_town = read_polygon(polygons_dir+'karratha_townv2.csv')
    171 res_karratha_town = 1000
    172 #res_karratha_town = 500
    173 #res_karratha_town = 5000
     172#res_karratha_town = 1000
     173res_karratha_town = 500
    174174
    175175poly_facility = read_polygon(polygons_dir+'facility.csv')
     
    180180
    181181poly_coast = read_polygon(polygons_dir+'coastpoly.csv')
    182 #res_coast = 1000
    183 res_coast = 10000
     182res_coast = 2500
     183#res_coast = 10000
    184184
    185185poly_NWislands = read_polygon(polygons_dir+'nw_islands_area.csv')
     
    254254                    [poly_karratha,res_karratha],[poly_karratha_town,res_karratha_town]]
    255255
    256 trigs_min = number_mesh_triangles(interior_regions_test, poly_all, res_poly_all)
     256#trigs_min = number_mesh_triangles(interior_regions_test, poly_all, res_poly_all)
     257trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all)
    257258
    258259print 'min number triangles', trigs_min
  • anuga_work/production/dampier_2006/run_dampier.py

    r4357 r4373  
    2828from anuga.shallow_water import File_boundary
    2929from anuga.shallow_water import Reflective_boundary
     30from anuga.shallow_water import Field_boundary
    3031from Numeric import allclose
    3132
     
    4344#------------------------------------------------------------------------------
    4445
     46#copy script must be before screen_catcher
     47if myid == 0:
     48    copy_code_files(project.output_run_time_dir,__file__,
     49                 dirname(project.__file__)+sep+ project.__name__+'.py' )
     50barrier()
     51
    4552start_screen_catcher(project.output_run_time_dir, myid, numprocs)
    4653
     
    5663
    5764# creates copy of code in output dir
    58 if myid == 0:
    59     copy_code_files(project.output_run_time_dir,__file__,
    60                  dirname(project.__file__)+sep+ project.__name__+'.py' )
    61 barrier()
     65
    6266
    6367print 'USER: ', project.user
     
    199203domain.set_maximum_allowed_speed(0.1) # Allow a little runoff (0.1 is OK)
    200204print 'domain id', id(domain)
    201 domain.beta_h = 0
    202 domain.limit2007 = 1
     205#domain.beta_h = 0
     206#domain.limit2007 = 1
    203207
    204208#-------------------------------------------------------------------------
     
    212216#                  domain, time_thinning=24, use_cache=True, verbose=True)
    213217Bf = Field_boundary(project.boundaries_dir_namea + '.sww',
    214                   domain, time_thinning=12,mean_stage=tide, use_cache=True, verbose=True)
     218                  domain, time_thinning=12, mean_stage=tide, use_cache=True, verbose=True)
    215219
    216220print 'finished reading boundary file'
     
    237241    domain.write_time()
    238242    domain.write_boundary_statistics(tags = 'ocean')
     243   
     244    domain.write_time(track_speeds=True)
    239245
    240246#for t in domain.evolve(yieldstep = 120, finaltime = 9000):
Note: See TracChangeset for help on using the changeset viewer.