Changeset 3679


Ignore:
Timestamp:
Oct 3, 2006, 1:38:11 PM (18 years ago)
Author:
sexton
Message:

updates to Hobart scripts

Location:
anuga_work/production/hobart_2006
Files:
2 edited

Legend:

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

    r3672 r3679  
    5757coast_name = 'coastline_points'
    5858
    59 boundary_basename = 'SU-AU_clip'
     59boundary_basename = 'puysegur'
    6060
    6161#swollen/ all data output
     
    126126
    127127# bounding box
    128 south = degminsec2decimal_degrees(-43,45,0)
    129 north = degminsec2decimal_degrees(-42,30,0)
     128south = degminsec2decimal_degrees(-44,45,0)
     129north = degminsec2decimal_degrees(-42,0,0)
    130130west = degminsec2decimal_degrees(146,45,0)
    131 east = degminsec2decimal_degrees(148,0,0)#degminsec2decimal_degrees(148,15,0)
     131east = degminsec2decimal_degrees(148,25,0) #degminsec2decimal_degrees(148,15,0)
    132132
    133133#Main Domain of Hobart: first run JS 18/9/06
     
    136136d2 = [north, east]
    137137d3 = [north, west]
    138 polyAll, zone = convert_points_from_latlon_to_utm([d0, d1, d2, d3])
     138polyAll2, zone = convert_points_from_latlon_to_utm([d0, d1, d2, d3])
     139print "polyAll2", polyAll2
    139140refzone = zone
    140141
    141142# Second run - bottom bright, topr, top, left
    142 polyAll = [[520000, 5170000],[580000, 5170000],[580000, 5200000],[590000,5240000],[520000,5260000]]
     143#polyAll = [[520000, 5170000],[580000, 5170000],[580000, 5200000],[590000,5240000],[520000,5260000]]
    143144
    144145# Third run - afternoon Wed 27 Sep; surrounds -100m and 20mish elevation
     146#polyAll = read_polygon(polygondir+'new_extent.csv')
     147#plot_polygons([polyAll],'boundingpoly',verbose=False)
     148
     149# Mark run - morning Fri 29 Sep; surrounds -100m and 20mish elevation
    145150polyAll = read_polygon(polygondir+'new_extent.csv')
    146 plot_polygons([polyAll],'boundingpoly',verbose=False)
     151plot_polygons([polyAll, polyAll2],'boundingpoly',verbose=False)
     152
    147153
    148154###################################################################
     
    171177###############################
    172178
    173 #Interior region - Hobart city area + Glenorchy, Kingston
    174 i0 = [517000, 5267000]
    175 i1 = [517000, 5255000]
    176 i2 = [520000, 5250000]
    177 i3 = [522000, 5239000]
    178 i4 = [524000, 5238000]
    179 i5 = [526000, 5236000]
    180 i6 = [530000, 5244000]
    181 i7 = [530000, 5250000]
    182 i8 = [534000, 5254000]
    183 i9 = [520000, 5270000]
    184 
    185 poly_hobart = [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9]
    186 
    187 # Tasman Peninsula
    188 l0 = [550000, 5247000]
    189 l1 = [550000, 5211000]
    190 l2 = [583000, 5211000]
    191 l3 = [583000, 5247000]
    192 
    193 poly_tasman_peninsula = [l0, l1, l2, l3]
    194 
    195 # Bruny Island
    196 poly_bruny = read_polygon(polygondir+'bruny.csv')
     179###Interior region - Hobart city area + Glenorchy, Kingston
     180##i0 = [517000, 5267000]
     181##i1 = [517000, 5255000]
     182##i2 = [520000, 5250000]
     183##i3 = [522000, 5239000]
     184##i4 = [524000, 5238000]
     185##i5 = [526000, 5236000]
     186##i6 = [530000, 5244000]
     187##i7 = [530000, 5250000]
     188##i8 = [534000, 5254000]
     189##i9 = [520000, 5270000]
     190##
     191##poly_hobart = [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9]
     192##
     193### Tasman Peninsula
     194##l0 = [550000, 5247000]
     195##l1 = [550000, 5211000]
     196##l2 = [583000, 5211000]
     197##l3 = [583000, 5247000]
     198##
     199##poly_tasman_peninsula = [l0, l1, l2, l3]
     200##
     201### Bruny Island
     202##poly_bruny = read_polygon(polygondir+'bruny.csv')
     203
     204
     205# Hobart digitized polygons
     206poly_hobart1 = read_polygon(polygondir+'Hob_poly1.csv')
     207poly_hobart2 = read_polygon(polygondir+'Hob_poly2.csv')
     208poly_hobart3 = read_polygon(polygondir+'Hob_poly3.csv')
     209
     210plot_polygons([polyAll, poly_hobart1,poly_hobart2,poly_hobart3],'boundingpoly2',verbose=False)
  • anuga_work/production/hobart_2006/run_hobart.py

    r3673 r3679  
    8989hobart_res = 35000
    9090peninsula_res = 35000
    91 interior_regions = [[project.poly_hobart, hobart_res],
    92                     [project.poly_tasman_peninsula, peninsula_res],
    93                     [project.poly_bruny, island_res]]
     91interior_regions = [[project.poly_hobart1, hobart_res],
     92                    [project.poly_hobart2, hobart_res],
     93                    [project.poly_hobart3, hobart_res]]
    9494
    9595print 'number of interior regions', len(interior_regions)
     
    9898_ = cache(create_mesh_from_regions,
    9999          project.polyAll,
    100 #          {'boundary_tags': {'bottom': [0], 'bright': [1],
    101 #                             'topr': [2], 'top': [3], 'left': [4]},
    102100           {'boundary_tags': {'e0': [0], 'e1': [1], 'e2': [2],
    103                                 'e3': [3], 'e4':[4], 'e5': [5],
    104                                 'e6': [6], 'e7': [7], 'e8': [8],
    105                                 'e9': [9], 'e10': [10], 'e11': [11],
    106                                 'e12': [12], 'e13': [13], 'e14': [14],
    107                                 'e15': [15], 'e16': [16], 'e17': [17]},
     101                              'e3': [3], 'e4':[4], 'e5': [5],
     102                              'e6': [6], 'e7': [7], 'e8': [8],
     103                              'e9': [9], 'e10': [10], 'e11': [11],
     104                              'e12': [12], 'e13': [13], 'e14': [14],
     105                              'e15': [15]},
    108106           'maximum_triangle_area': 250000,
    109            'filename': meshname},           
    110            #'interior_regions': interior_regions},
    111           verbose = True, evaluate=True)
     107           'filename': meshname,           
     108           'interior_regions': interior_regions},
     109          verbose = True, evaluate=False)
    112110
    113111
     
    115113# Setup computational domain
    116114#-------------------------------------------------------------------------------                                 
    117 domain = Domain(meshname, use_cache = False, verbose = True)
     115domain = Domain(meshname, use_cache = True, verbose = True)
    118116
    119117print 'Number of triangles = ', len(domain)
     
    150148print 'start ferret2sww'
    151149from anuga.shallow_water.data_manager import ferret2sww
    152 '''
     150
    153151south = project.south
    154152north = project.north
     
    160158      (source_dir + project.boundary_basename,
    161159       source_dir + project.boundary_basename),
    162 #      (project.MOST_dir + project.boundary_basename,
    163 #       source_dir + project.boundary_basename),
    164160      {'verbose': True,
    165 # note didn't work with the below
    166 #       'minlat': south - 1,
    167 #       'maxlat': north + 1,
    168 #       'minlon': west - 1,
    169 #       'maxlon': east + 1,
    170161       'minlat': south,
    171162       'maxlat': north,
     
    182173       dependencies = source_dir + project.boundary_basename + '.sww')
    183174
    184 '''
     175
    185176print 'Available boundary tags', domain.get_boundary_tags()
    186177
    187 #Bf = File_boundary(source_dir + project.boundary_basename + '.sww',
    188 #                    domain, verbose = True)
     178Bf = File_boundary(source_dir + project.boundary_basename + '.sww',
     179                    domain, verbose = True)
    189180Br = Reflective_boundary(domain)
    190181Bd = Dirichlet_boundary([tide,0,0])
     
    204195domain.set_boundary( {'e0': Bd, 'e1': Bd, 'e2': Bd, 'e3': Bd, 'e4': Bd,
    205196                        'e5': Bd, 'e6': Bd, 'e7': Bd, 'e8': Bd, 'e9': Bd,
    206                         'e10': Bd, 'e11': Bd, 'e12': Bd, 'e13': Bd, 'e14': Bd,
    207                         'e15': Bd, 'e16': Bw, 'e17': Bd} )
     197                        'e10': Bd, 'e11': Bd, 'e12': Bd, 'e13': Bd, 'e14': Bf,
     198                        'e15': Bd} )
    208199
    209200#-------------------------------------------------------------------------------                                 
     
    213204t0 = time.time()
    214205
    215 for t in domain.evolve(yieldstep = 60, finaltime = 12000):
     206for t in domain.evolve(yieldstep = 240, finaltime = 6800):
    216207    domain.write_time()
    217208    domain.write_boundary_statistics(tags = 'bottom')     
    218209
    219 #for t in domain.evolve(yieldstep = 120, finaltime = 12600
    220 #                       ,skip_initial_step = True):
    221 #    domain.write_time()
    222 #    domain.write_boundary_statistics(tags = 'bottom')     
     210for t in domain.evolve(yieldstep = 30, finaltime = 9000
     211                       ,skip_initial_step = True):
     212    domain.write_time()
     213    domain.write_boundary_statistics(tags = 'bottom')     
     214
     215for t in domain.evolve(yieldstep = 240, finaltime = 15000
     216                       ,skip_initial_step = True):
     217    domain.write_time()
     218    domain.write_boundary_statistics(tags = 'bottom')
    223219   
    224220print 'That took %.2f seconds' %(time.time()-t0)
Note: See TracChangeset for help on using the changeset viewer.