Changeset 6255


Ignore:
Timestamp:
Jan 31, 2009, 5:16:00 AM (10 years ago)
Author:
ole
Message:

Started some cleaning up of standardised demo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/busselton/standardised_version/run_busselton.py

    r6254 r6255  
    7878
    7979    # Read in boundary from ordered sts file
    80     urs_bounding_polygon=create_sts_boundary(os.path.join(project.boundaries_dir_event,project.scenario_name))
     80    urs_bounding_polygon=create_sts_boundary(os.path.join(project.boundaries_dir_event, project.scenario_name))
    8181
    8282    # Reading the landward defined points, this incorporates the original clipping
     
    125125    print 'triangles',len(domain)
    126126   
    127     kwargs['act_num_trigs']=len(domain)
    128127
    129128
     
    134133
    135134    # sets the initial stage in the offcoast region only
    136     IC = Polygon_function( [(project.poly_mainland, 0),(project.poly_marina, 0)], default = kwargs['tide'],
    137                              geo_reference = domain.geo_reference)
     135    IC = Polygon_function( [(project.poly_mainland, 0),
     136                            (project.poly_marina, 0)],
     137                           default = project.tide,
     138                           geo_reference = domain.geo_reference)
    138139    domain.set_quantity('stage', IC)
    139     #domain.set_quantity('stage',kwargs['tide'] )
    140     domain.set_quantity('friction', kwargs['friction'])
     140
     141    domain.set_quantity('friction', project.friction)
    141142   
    142143    print 'Start Set quantity',kwargs['elevation_file']
     
    146147                        use_cache = False,
    147148                        verbose = True,
    148                         alpha = kwargs['alpha'])
     149                        alpha = project.alpha)
    149150    print 'Finished Set quantity'
    150151
     
    160161    #------------------------------------------------------
    161162    print 'domain id', id(domain)
    162     domain.set_name(kwargs['scenario_name'])
     163    domain.set_name(project.scenario_name)
    163164    domain.set_datadir(kwargs['output_dir'])
    164165    domain.set_default_order(2)                 # Apply second order scheme
     
    178179
    179180    Br = Reflective_boundary(domain)
    180     Bd = Dirichlet_boundary([kwargs['tide'],0,0])
     181    Bd = Dirichlet_boundary(project.tide,0,0])
    181182   
    182183    print 'Available boundary tags', domain.get_boundary_tags()
     
    193194                         'ocean': Bf})
    194195
    195     kwargs['input_start_time']=domain.starttime
    196196
    197197    print'finish set boundary'
     
    202202    t0 = time.time()
    203203
    204     for t in domain.evolve(yieldstep = project.yieldstep, finaltime = kwargs['finaltime']
    205                        ,skip_initial_step = False):
     204    for t in domain.evolve(yieldstep=project.yieldstep,
     205                           finaltime=project.finaltime,
     206                           skip_initial_step=False):
    206207        domain.write_time()
    207208        domain.write_boundary_statistics(tags = 'ocean')
     
    214215    print 'Simulation took %.2f seconds' %(time.time()-t0)
    215216
    216     #kwargs 'completed' must be added to write the final parameters to file
     217
    217218    kwargs['completed']=str(time.time()-t0)
    218219     
    219220    store_parameters(**kwargs)
    220      
    221     print 'memory usage before del domain1',mem_usage()
     221
    222222   
    223223   
     
    227227    kwargs={}
    228228    kwargs['file_name']=project.dir_comment
    229     kwargs['finaltime']=project.finaltime
    230229    kwargs['output_dir']=project.output_run_time_dir
    231230    kwargs['elevation_file']=project.combined_dir_name+'.pts'
    232     kwargs['scenario_name']=project.scenario_name
    233     kwargs['tide']=project.tide
    234     kwargs['alpha'] = project.alpha
    235     kwargs['friction']=project.friction
    236     #kwargs['num_cpu']=numprocs
    237     #kwargs['host']=project.host
    238     #kwargs['starttime']=project.starttime
    239     #kwargs['yieldstep']=project.yieldstep
    240     #kwargs['user']=project.user
    241     #kwargs['time_thinning'] = project.time_thinning
    242231     
    243232    run_model(**kwargs)
Note: See TracChangeset for help on using the changeset viewer.