Changeset 4049


Ignore:
Timestamp:
Dec 4, 2006, 11:16:58 AM (18 years ago)
Author:
nick
Message:

updates to dampier

Location:
anuga_work/production/dampier_2006
Files:
3 edited

Legend:

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

    r3940 r4049  
    113113G_off13 = Geospatial_data(file_name = project.offshore_dir_name13 + '.xya')
    114114G_off14 = Geospatial_data(file_name = project.offshore_dir_name14 + '.xya')
    115 '''
     115
    116116
    117117
     
    125125G_offshore_old = Geospatial_data(file_name = project.offshore_dir_name_old + '.pts')
    126126
    127 '''
     127
    128128print 'G_offshore_data_old_nw',
    129129G_nw_name = project.topographies_dir + 'nw_old_data'
     
    145145print' max and min of array 0',max(G_e[:,0]),min(G_e[:,0])
    146146print' max and min of array 1',max(G_e[:,1]),min(G_e[:,1])
    147 '''
     147
    148148
    149149print 'G_offshore_data_mid_e'#, G_offshore_old_nw.get_data_points()
     
    188188G_clipped.export_points_file(project.combined_time_dir_final_name + '.pts')
    189189G_clipped.export_points_file(project.combined_time_dir_final_name + '.xya')
     190
     191
    190192'''
    191193#-------------------------------------------------------------------------
     
    199201print 'minlat=project.north_boundary, maxlat=project.south_boundary',project.north_boundary, project.south_boundary
    200202print 'minlon= project.west_boundary, maxlon=project.east_boundary',project.west_boundary, project.east_boundary
    201 print ' maxlon=project.east',project.east
    202203
    203204#import sys; sys.exit()
    204205
    205 if access(project.boundaries_time_dir,F_OK) == 0:
    206     mkdir (project.boundaries_time_dir)
     206#if access(project.boundaries_dir,F_OK) == 0:
     207#    mkdir (project.boundaries_dir)
    207208
    208209from caching import cache
    209210cache(urs2sww,
    210211      (boundaries_in_dir_name,
    211        project.boundaries_time_dir_name),
     212       project.boundaries_dir_name1),
    212213      {'verbose': True,
    213 #       'minlat': project.south_boundary,
    214 #       'maxlat': project.north_boundary,
    215 #       'minlon': project.west_boundary,
    216 #       'maxlon': project.east_boundary,
     214       'minlat': project.south_boundary,
     215       'maxlat': project.north_boundary,
     216       'minlon': project.west_boundary,
     217       'maxlon': project.east_boundary,
    217218#       'minlat': project.south,
    218219#       'maxlat': project.north,
    219220#       'minlon': project.west,
    220221#       'maxlon': project.east,
    221        'mint': 0, 'maxt': 35000,
     222       'mint': 0, 'maxt': 40000,
    222223#       'origin': domain.geo_reference.get_origin(),
    223224       'mean_stage': project.tide,
     
    227228       )
    228229#       dependencies = source_dir + project.boundary_basename + '.sww')
    229 '''   
    230 
    231 
    232 
    233 
    234 
    235 
    236 
    237 
     230
     231
     232
     233
     234
     235
     236
     237
     238
  • anuga_work/production/dampier_2006/project.py

    r4045 r4049  
    6565combined_final_name ='dampier_combined_elevation_final'
    6666
    67 #gauge_name = 'dampier_gauges.csv'
    68 gauge_name = 'dampier_gauges_up2.csv'
     67gauge_name = 'dampier_gauges_up2.csv'
    6968
    7069#Derive subdirectories and filenames
     
    9897
    9998gauge_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'gauges'+sep
    100 gauge_filename = gauge_dir + gauge_name
     99gauge_filename = gauge_dir + 'dampier_gauges_up2.csv'
    101100
    102101gauges_dir_name = gauges_dir + gauge_name
  • anuga_work/production/dampier_2006/run_dampier.py

    r3998 r4049  
    2929from anuga.shallow_water import File_boundary
    3030from anuga.shallow_water import Reflective_boundary
     31from Numeric import allclose
    3132
    3233from anuga.pmesh.mesh_interface import create_mesh_from_regions
     
    8485    print 'start create mesh from regions'
    8586    interior_regions = [#[project.karratha_polygon, 25000],
    86 #                    [project.poly_coast, 10000],
    87 #                    [project.poly_pipeline, 2000],
    88 #                    [project.poly_facility, 500]]   
    89                     [project.poly_interior, 1000]]       
     87                    [project.poly_coast, 10000],
     88                    [project.poly_pipeline, 2000],
     89                    [project.poly_facility, 500]]   
     90#                    [project.poly_interior, 1000]]       
    9091   
    91     from anuga.utilities.polygon import plot_polygons
    92     figname = project.output_run_time_dir + 'poly_pic'
    93     plot_polygons([interior_regions,
    94                project.bounding_polygon],
    95                figname,
    96                verbose = True)
    97 #    if access(project.meshes_time_dir,F_OK) == 0:
    98 #        mkdir(project.meshes_time_dir)
    99     if access(project.meshes_dir,F_OK) == 0:
    100         mkdir(project.meshes_dir)
    101     print 'start create mesh from regions'
    102     interior_regions = [#[project.karratha_polygon, 25000],
    103 #                    [project.cipma_polygon, 1000],
    104 #                    [project.poly_pipeline, 5000],
    105 #                    [project.poly_facility, 500]]   
    106                     [project.poly_interior, 1000]]   
    107 #    meshes_dir_name = project.meshes_dir_name + '.msh'
    10892
    10993    create_mesh_from_regions(project.bounding_polygon,
     
    147131from caching import cache
    148132if myid == 0:
    149     cache(urs2sww,
     133    cache(ferret2sww,
    150134          (boundaries_in_dir_name,
    151135    #       boundaries_time_dir_name),
     
    160144#           'minlon': project.west,
    161145#           'maxlon': project.east,
    162            'mint': 0, 'maxt': 35000,
     146           'mint': 0, 'maxt': 35100,
    163147           'origin': domain.geo_reference.get_origin(),
    164148           'mean_stage': project.tide,
     
    173157# Setup initial conditions
    174158#-------------------------------------------------------------------------
    175 print 'Setup initial conditions'
    176 
    177 domain.set_quantity('stage', tide)
    178 domain.set_quantity('friction', 0.0)
    179 #combined_time_dir_name = project.topographies_dir+build_time+project.combined_name
    180 print 'Start Set quantity'
    181 
    182 domain.set_quantity('elevation',
     159if myid == 0:
     160
     161    print 'Setup initial conditions'
     162
     163    domain.set_quantity('stage', tide)
     164    domain.set_quantity('friction', 0.0)
     165    #combined_time_dir_name = project.topographies_dir+build_time+project.combined_name
     166    print 'Start Set quantity'
     167
     168
     169    domain.set_quantity('elevation',
    183170                    filename = project.topographies_dir + build_time + sep + project.combined_final_name + '.pts',
    184171                    use_cache = True,
    185172                    verbose = True,
    186173                    alpha = 0.1)
    187 #domain.set_quantity('elevation', -50)
    188 print 'Finished Set quantity'
    189 
     174    #domain.set_quantity('elevation', -50)
     175    print 'Finished Set quantity'
     176barrier()
    190177
    191178
     
    247234
    248235for t in domain.evolve(yieldstep = 120, finaltime = 9000):
    249 #for t in domain.evolve(yieldstep = 120, finaltime = 130):
    250236    domain.write_time()
    251237    domain.write_boundary_statistics(tags = 'ocean')
    252     print 'time: ',time.time()
     238#    print 'time: ',time.time()
    253239 
    254240    if allclose(t, 6000):
    255241        domain.set_quantity('xmomentum', 0)
    256242        domain.set_quantity('ymomentum', 0)
    257 import sys; sys.exit()
     243#import sys; sys.exit()
    258244     
    259245for t in domain.evolve(yieldstep = 60, finaltime = 28800
Note: See TracChangeset for help on using the changeset viewer.