Changeset 4196


Ignore:
Timestamp:
Jan 29, 2007, 5:51:03 PM (17 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

    r4186 r4196  
    5555# Fine pts file to be clipped to area of interest
    5656#-------------------------------------------------------------------------------
    57 print"project.poly_all",project.poly_all
    5857print"project.combined_dir_name",project.combined_dir_name
    5958
     
    6261coast_in_dir_name = project.coast_in_dir_name
    6362offshore_in_dir_name = project.offshore_in_dir_name
    64 offshore1_in_dir_name = project.offshore1_in_dir_name
    65 offshore2_in_dir_name = project.offshore2_in_dir_name
     63#offshore1_in_dir_name = project.offshore1_in_dir_name
     64#offshore2_in_dir_name = project.offshore2_in_dir_name
    6665
    6766onshore_dir_name = project.onshore_dir_name
    6867coast_dir_name = project.coast_dir_name
    6968offshore_dir_name = project.offshore_dir_name
    70 offshore1_dir_name = project.offshore1_dir_name
    71 offshore2_dir_name = project.offshore2_dir_name
     69#offshore1_dir_name = project.offshore1_dir_name
     70#offshore2_dir_name = project.offshore2_dir_name
    7271
    7372# creates DEM from asc data
     
    7675                              basename_out=onshore_dir_name,
    7776                              use_cache=True, verbose=True)
     77'''
    7878convert_dem_from_ascii2netcdf(offshore1_in_dir_name,
    7979                              basename_out=offshore1_dir_name,
     
    8282                              basename_out=offshore2_dir_name,
    8383                              use_cache=True, verbose=True)
    84 
     84'''
    8585#creates pts file for onshore DEM
    8686print "creates pts file for onshore DEM"
    8787dem2pts(onshore_dir_name, use_cache=True, verbose=True)
    88 
     88'''
    8989#creates pts file for clipped DEMs
    9090dem2pts(offshore1_dir_name,
     
    9494        basename_out=offshore2_dir_name,
    9595        use_cache=True, verbose=True)
    96 
     96'''
    9797print'create Geospatial onshore objects from topographies'
    9898#print'create Geospatial coastal objects from topographies'
     
    101101#print'create Geospatial offshore objects from topographies'
    102102G = Geospatial_data(file_name = onshore_dir_name + '.pts') +\
    103      Geospatial_data(file_name = coast_in_dir_name + '.xya') +\
    104      Geospatial_data(file_name = offshore1_dir_name + '.pts') +\
    105      Geospatial_data(file_name = offshore2_dir_name + '.pts') +\
    106      Geospatial_data(file_name = offshore_in_dir_name + '.xya')
     103     Geospatial_data(file_name = coast_in_dir_name + '.txt') +\
     104     Geospatial_data(file_name = offshore_in_dir_name + '.txt')
    107105
    108106print'add all geospatial objects'
     
    119117G_clipped.export_points_file(project.combined_dir_name + '.pts')
    120118#G_clipped.export_points_file(project.combined_dir_name + '.txt')
     119
     120print'split combined data set'
     121G_small, G_other = G_clipped.split(0.1, True)
     122
     123print'export split DEM file'
     124G_small.export_points_file(project.combined_dir_name + '_small' + '.pts')
     125G_other.export_points_file(project.combined_dir_name + '_other' + '.pts')
     126
     127
  • anuga_work/production/dampier_2006/project.py

    r4193 r4196  
    3535
    3636# onshore data provided by WA DLI
    37 onshore_name = 'dli' # original
     37onshore_name = 'DLI_DTED_raster_clipped' # original
    3838
    3939# AHO + DPI data + colin French coastline
    40 coast_name = 'coastline'
    41 offshore_name = 'bathymetry'
    42 offshore1_name = 'elev_501'
    43 offshore2_name = 'inferrec_e'
     40coast_name = 'coastline_edited_w_DEM'
     41offshore_name = 'clipped_bathy'
     42#offshore1_name = 'elev_501'
     43#offshore2_name = 'inferrec_e'
    4444
    4545#final topo name
     
    5555coast_in_dir_name = topographies_in_dir + coast_name
    5656offshore_in_dir_name = topographies_in_dir + offshore_name
    57 offshore1_in_dir_name = topographies_in_dir + offshore1_name
    58 offshore2_in_dir_name = topographies_in_dir + offshore2_name
     57#offshore1_in_dir_name = topographies_in_dir + offshore1_name
     58#offshore2_in_dir_name = topographies_in_dir + offshore2_name
    5959
    6060onshore_dir_name = topographies_dir + onshore_name
    6161coast_dir_name = topographies_dir + coast_name
    6262offshore_dir_name = topographies_dir + offshore_name
    63 offshore1_dir_name = topographies_dir + offshore1_name
    64 offshore2_dir_name = topographies_dir + offshore2_name
     63#offshore1_dir_name = topographies_dir + offshore1_name
     64#offshore2_dir_name = topographies_dir + offshore2_name
    6565
    6666#final topo files
     
    7777
    7878boundaries_source = ''
    79 boundaries_name = 'o_velocity'
     79boundaries_name = 'o'
    8080#boundaries locations
    81 boundaries_in_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep+'urs'+sep+boundaries_source+sep
     81boundaries_in_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep+'urs'+sep+'1_10000'+sep
    8282boundaries_in_dir_name = boundaries_in_dir + boundaries_name
    8383boundaries_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep
     
    230230###################################################################
    231231
    232 poly_bathy = read_polygon(polygons_dir+'poly_bathy.csv')
     232poly_bathy = read_polygon(polygons_dir+'mainland_only.csv')
    233233
    234234# exporting asc grid - Dampier
  • anuga_work/production/dampier_2006/run_dampier.py

    r4193 r4196  
    6767# resolutions (maximal area of per triangle) for each polygon
    6868#--------------------------------------------------------------------------
    69 
     69'''
    7070poly = [[0,0],[0,100],[100,100],[100,0]]
    7171
     
    8080
    8181sys.exit()
    82 
     82'''
    8383if myid == 0:
    8484   
     
    102102domain = Domain(meshes_dir_name, use_cache=True, verbose=True)
    103103print domain.statistics()
    104 
     104boundaries_dir_name=project.boundaries_dir_name
    105105
    106106print 'starting to create boundary conditions'
    107 boundaries_in_dir_name = project.boundaries_in_dir_name
    108 
    109 from anuga.shallow_water.data_manager import urs2sw
     107
     108from anuga.shallow_water.data_manager import urs2sww
    110109
    111110# put above distribute
    112 print 'boundary file is: ',boundaries_dir_name
     111print 'boundary file is: ',project.boundaries_dir_name
    113112from caching import cache
    114113if myid == 0:
    115114    cache(urs2sww,
    116           (boundaries_in_dir_name,
    117            boundaries_dir_name),
     115          (project.boundaries_in_dir_name,
     116           project.boundaries_dir_name),
    118117          {'verbose': True,
    119118           'minlat': project.south_boundary,
     
    140139    from polygon import *
    141140    #following sets the stage/water to be offcoast only
    142     IC = Polygon_function( [(project.poly_bathy, tide)], default = 0.)
     141    IC = Polygon_function( [(project.poly_bathy, 0.)], default = tide)
    143142    domain.set_quantity('stage', IC)
    144143    domain.set_quantity('friction', 0.01)
     
    202201t0 = time.time()
    203202
    204 for t in domain.evolve(yieldstep = 60, finaltime = 34000):
     203for t in domain.evolve(yieldstep = 120, finaltime = 34000):
    205204    domain.write_time()
    206205    domain.write_boundary_statistics(tags = 'ocean')
Note: See TracChangeset for help on using the changeset viewer.