Changeset 3885


Ignore:
Timestamp:
Oct 30, 2006, 1:56:46 PM (17 years ago)
Author:
nick
Message:

update to dampier

Location:
anuga_work/production/dampier_2006
Files:
2 edited

Legend:

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

    r3877 r3885  
    1010     convert_from_latlon_to_utm
    1111
    12 from time import localtime, strftime
     12from time import localtime, strftime, gmtime
    1313from anuga.geospatial_data.geospatial_data import *
    1414
     
    7575
    7676time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
     77gtime = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir
    7778build_time = time+'_build'
    7879run_time = time+'_run'
     80
     81print 'gtime: ', gtime
    7982
    8083output_build_time_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'outputs'+sep+build_time+sep
  • anuga_work/production/dampier_2006/run_dampier.py

    r3877 r3885  
    4848# filenames
    4949
    50 build_time = '20061025_113524_build'
     50build_time = '20061029_231935_build_tide_24'
    5151boundaries_name = project.boundaries_name
    5252meshes_dir_name = project.meshes_dir_name+'.msh'
     
    5454boundaries_time_dir_name = project.boundaries_dir + build_time + sep + boundaries_name
    5555
     56# # creates copy of code in output dir if dir doesn't exist
     57if myid == 0:
     58    if access(project.output_run_time_dir,F_OK) == 0:
     59        print 'project.output_run_time_dir',dirname(project.output_run_time_dir)
     60        mkdir (project.output_run_time_dir,0777)
     61    copy (dirname(project.__file__) +sep+ project.__name__+'.py',
     62             project.output_run_time_dir + project.__name__+'.py')
     63    copy (__file__, project.output_run_time_dir + basename(__file__))
     64    print 'project.output_run_time_dir',project.output_run_time_dir
     65
     66#normal screen output is stored in
     67screen_output_name = project.output_run_time_dir + "screen_output_%d_%d.txt" %(myid,numprocs)
     68screen_error_name = project.output_run_time_dir + "screen_error_%d_%d.txt" %(myid,numprocs)
     69
     70#used to catch screen output to file
     71sys.stdout = Screen_Catcher(screen_output_name)
     72sys.stderr = Screen_Catcher(screen_error_name)
     73
     74print 'USER: ', project.user
     75
     76
     77#--------------------------------------------------------------------------
     78# Create the triangular mesh based on overall clipping polygon with a
     79# tagged
     80# boundary and interior regions defined in project.py along with
     81# resolutions (maximal area of per triangle) for each polygon
     82#--------------------------------------------------------------------------
     83
     84interior_regions = [#[project.karratha_polygon, 25000],
     85                    [project.cipma_polygon, 50000]]   
     86
     87print 'start create mesh from regions'
     88meshes_dir_name = project.meshes_dir_name + '.msh'
     89create_mesh_from_regions(project.bounding_polygon,
     90                         boundary_tags={'back': [7, 8], 'side': [0, 6],
     91                                        'ocean': [1, 2, 3, 4, 5]},
     92                         maximum_triangle_area=300000,
     93                         interior_regions=interior_regions,
     94                         filename=meshes_dir_name,
     95                         use_cache=True,
     96                         verbose=True)
    5697
    5798#-------------------------------------------------------------------------
     
    61102domain = Domain(meshes_dir_name, use_cache=True, verbose=True)
    62103print domain.statistics()
    63 
    64104
    65105#-------------------------------------------------------------------------
     
    76116                    alpha = 0.1)
    77117
    78 
    79118#------------------------------------------------------
    80119# Distribute domain to implement parallelism !!!
     
    83122if numprocs > 1:
    84123    domain=distribute(domain)
    85 
    86124
    87125#------------------------------------------------------
     
    93131domain.set_default_order(2) #associate to the spatial order of the triangle
    94132domain.set_minimum_storable_height(0.01) # Don't store anything less than 1cm
    95 
    96133
    97134#-------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.