Changeset 4045


Ignore:
Timestamp:
Nov 30, 2006, 7:03:43 PM (17 years ago)
Author:
sexton
Message:

updates to pt hedland script (new data provided) and sydney slide scenario

Location:
anuga_work/production
Files:
6 edited

Legend:

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

    r4029 r4045  
    55from os import sep
    66
    7 time_dir = '20061116_055135_run' #
     7time_dir = '20061127_055714_run' #
    88directory = project.output_dir
    9 name = directory + time_dir + sep + project.scenario_name
     9#name = directory + time_dir + sep + project.scenario_name
     10name = directory+sep+project.scenario_name
    1011
    1112is_parallel = True
    12 if is_parallel == True: nodes = 8
     13if is_parallel == True: nodes = 4
    1314print 'output dir:', name
    1415
     
    1920
    2021if which_var == 1:  # Absolute Momentum
    21     outname = name + '_momentum_i0'
     22    outname = name + '_momentum_i50'
    2223    quantityname = '(xmomentum**2 + ymomentum**2)**0.5' 
    2324
    2425if which_var == 2:  # Depth
    25     outname = name + '_depth_test100'
     26    outname = name + '_depth'
    2627    quantityname = 'stage-elevation' 
    2728
     
    3637
    3738if is_parallel == True:
    38     for i in range(3,nodes):
     39    for i in range(2,nodes):
    3940        namei = name + '_P%d_%d' %(i,nodes)
    4041        outnamei = outname + '_P%d_%d' %(i,nodes)
     
    4243        sww2dem(namei, basename_out = outnamei,
    4344                    quantity = quantityname,
    44                     timestep = 0,
     45                    timestep = 50,
    4546                    cellsize = 100,     
    4647                    #easting_min = project.e_min_area,
  • anuga_work/production/dampier_2006/project.py

    r4009 r4045  
    219219clip_poly_mid_e = read_polygon(polygons_dir+'gap_mid_e.cvs')
    220220
     221plot_polygons([bounding_polygon,poly_facility,poly_pipeline,poly_interior,poly_coast],'polys',verbose=True)
    221222#Interior regions
    222223karratha_south = degminsec2decimal_degrees(-20,44,0)
  • anuga_work/production/pt_hedland_2006/project.py

    r3788 r4045  
    77#from anuga.utilities.polygon import read_polygon
    88import sys
    9 from anuga.coordinate_transforms.redfearn import convert_points_from_latlon_to_utm
    109from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees
    1110from time import localtime, strftime
     
    2524# offshore data from AHO fairsheets
    2625offshore_name2 = 'pt_hedland_offshore_points_fairsheet_orig'
     26
     27# reissued offshore data from PMD and NM&I Nov 2006
     28offshore_name0 = 'hydrographic_charts'
     29offshore_name1 = 'xy100003817'
     30offshore_name2 = 'xy100003819'
     31offshore_name3 = 'xy100003822'
     32offshore_name4 = 'xy100003824'
     33offshore_name5 = 'xy100003825'
     34offshore_name6 = 'xy100003826'
     35offshore_name7 = 'xy100003827'
     36offshore_name8 = 'xy100003828'
     37offshore_name9 = 'xy100003829'
     38offshore_name10 = 'xy100003830'
     39offshore_name11 = 'xy100003831'
     40offshore_name12 = 'xy100003832'
     41offshore_name13 = 'xy100003837'
     42offshore_name14 = 'xy100003838'
     43offshore_name15 = 'xy100003840'
     44offshore_name16 = 'xy100003841'
     45offshore_name17 = 'xy100003843'
     46offshore_name18 = 'xy100003845'
     47offshore_name19 = 'xy100003846'
     48offshore_name20 = 'xy100003847'
     49offshore_name21 = 'xy100003945'
     50offshore_name22 = 'xy100003946'
     51offshore_name23 = 'xy100003947'
     52offshore_name24 = 'xy100003948'
     53offshore_name25 = 'xy100004071'
     54offshore_name26 = 'xy100004072'
     55offshore_name27 = 'xy100004074'
     56offshore_name28 = 'xy100004078'
     57offshore_name29 = 'xy100004079'
     58offshore_name30 = 'xy100004080'
     59offshore_name31 = 'xy100004081'
     60offshore_name32 = 'xy100004082'
     61offshore_name33 = 'xy100004083'
     62offshore_name34 = 'xy100004084'
     63offshore_name35 = 'xy100004085'
     64offshore_name36 = 'xy100004086'
     65offshore_name37 = 'xy100004087'
     66offshore_name38 = 'xy100004088'
     67offshore_name39 = 'xy100004089'
     68offshore_name40 = 'xy100004090'
     69offshore_name41 = 'xy100011753'
     70offshore_name42 = 'xy100014967'
     71offshore_name43 = 'xy100014968'
     72offshore_name44 = 'xy100014969'
     73offshore_name45 = 'xy100021030'
     74offshore_name46 = 'xy100021031'
     75offshore_name47 = 'xy100021032'
     76offshore_name48 = 'xy100021033'
     77offshore_name49 = 'xy100021035'
     78offshore_name50 = 'xy100022767'
    2779
    2880# coastline developed from aerial photography and 1.5m DLI contour
     
    86138#onshore_dem_name = datadir + onshore_name_dted
    87139onshore_dem_name = datadir + onshore_name_dli
     140offshore_dem_name0 = datadir + offshore_name0
    88141offshore_dem_name1 = datadir + offshore_name1
    89142offshore_dem_name2 = datadir + offshore_name2
     143offshore_dem_name3 = datadir + offshore_name3
     144offshore_dem_name4 = datadir + offshore_name4
     145offshore_dem_name5 = datadir + offshore_name5
     146offshore_dem_name6 = datadir + offshore_name6
     147offshore_dem_name7 = datadir + offshore_name7
     148offshore_dem_name8 = datadir + offshore_name8
     149offshore_dem_name9 = datadir + offshore_name9
     150offshore_dem_name10 = datadir + offshore_name10
     151offshore_dem_name11 = datadir + offshore_name11
     152offshore_dem_name12 = datadir + offshore_name12
     153offshore_dem_name13 = datadir + offshore_name13
     154offshore_dem_name14 = datadir + offshore_name14
     155offshore_dem_name15 = datadir + offshore_name15
     156offshore_dem_name16 = datadir + offshore_name16
     157offshore_dem_name17 = datadir + offshore_name17
     158offshore_dem_name18 = datadir + offshore_name18
     159offshore_dem_name19 = datadir + offshore_name19
     160offshore_dem_name20 = datadir + offshore_name20
     161offshore_dem_name21 = datadir + offshore_name21
     162offshore_dem_name22 = datadir + offshore_name22
     163offshore_dem_name23 = datadir + offshore_name23
     164offshore_dem_name24 = datadir + offshore_name24
     165offshore_dem_name25 = datadir + offshore_name25
     166offshore_dem_name26 = datadir + offshore_name26
     167offshore_dem_name27 = datadir + offshore_name27
     168offshore_dem_name28 = datadir + offshore_name28
     169offshore_dem_name29 = datadir + offshore_name29
     170offshore_dem_name30 = datadir + offshore_name30
     171offshore_dem_name31 = datadir + offshore_name31
     172offshore_dem_name32 = datadir + offshore_name32
     173offshore_dem_name33 = datadir + offshore_name33
     174offshore_dem_name34 = datadir + offshore_name34
     175offshore_dem_name35 = datadir + offshore_name35
     176offshore_dem_name36 = datadir + offshore_name36
     177offshore_dem_name37 = datadir + offshore_name37
     178offshore_dem_name38 = datadir + offshore_name38
     179offshore_dem_name39 = datadir + offshore_name39
     180offshore_dem_name40 = datadir + offshore_name40
     181offshore_dem_name41 = datadir + offshore_name41
     182offshore_dem_name42 = datadir + offshore_name42
     183offshore_dem_name43 = datadir + offshore_name43
     184offshore_dem_name44 = datadir + offshore_name44
     185offshore_dem_name45 = datadir + offshore_name45
     186offshore_dem_name46 = datadir + offshore_name46
     187offshore_dem_name47 = datadir + offshore_name47
     188offshore_dem_name48 = datadir + offshore_name48
     189offshore_dem_name49 = datadir + offshore_name49
     190offshore_dem_name50 = datadir + offshore_name50
     191
    90192coast_dem_name = datadir + coast_name
    91193combined_dem_name = datadir + 'pt_hedland_combined_elevation'
  • anuga_work/production/pt_hedland_2006/run_pt_hedland.py

    r3788 r4045  
    66
    77The scenario is defined by a triangular mesh created from project.polygon,
    8 the elevation data and a simulated submarine landslide.
     8the elevation data and a tsunami generated by a subduction zone earthquake.
    99
    1010Ole Nielsen and Duncan Gray, GA - 2005 and Nick Bartzis, GA - 2006
     
    2828from anuga.geospatial_data.geospatial_data import *
    2929import sys
    30 from anuga.abstract_2d_finite_volumes.util import Screen_Catcher
     30from anuga.abstract_2d_finite_volumes.util import start_screen_catcher, copy_code_files
    3131
    3232# Application specific imports
     
    3838#-------------------------------------------------------------------------------
    3939
    40 # creates copy of code in output dir if dir doesn't exist
    41 if access(project.outputtimedir,F_OK) == 0 :
    42     mkdir (project.outputtimedir)
    43 copy (dirname(project.__file__) +sep+ project.__name__+'.py', project.outputtimedir + project.__name__+'.py')
    44 copy (__file__, project.outputtimedir + basename(__file__))
    45 print 'project.outputtimedir',project.outputtimedir
    46 
    47 # normal screen output is stored in
    48 screen_output_name = project.outputtimedir + "screen_output.txt"
    49 screen_error_name = project.outputtimedir + "screen_error.txt"
    50 
    51 # used to catch screen output to file
    52 sys.stdout = Screen_Catcher(screen_output_name)
    53 sys.stderr = Screen_Catcher(screen_error_name)
     40copy_code_files(project.outputtimedir,__file__,dirname(project.__file__)+sep+ project.__name__+'.py' )
     41myid = 0
     42numprocs = 1
     43start_screen_catcher(project.outputtimedir, myid, numprocs)
     44
    5445print 'USER:    ', project.user
    5546
     
    7970        verbose=True)
    8071
    81 print 'create G1'
    82 G1 = Geospatial_data(file_name = project.offshore_dem_name1 + '.xya')
    83 print 'create G2'
    84 G2 = Geospatial_data(file_name = project.offshore_dem_name2 + '.xya')
    85 print 'create G3'
    86 G3 = Geospatial_data(file_name = project.onshore_dem_name + '.pts')
    87 print 'create G4'
    88 G4 = Geospatial_data(file_name = project.coast_dem_name + '.xya')
    89 print 'add G1+G2+G3+G4'
    90 G = G1 + G2 + G3 + G4
     72print 'create offshore'
     73G11= Geospatial_data(file_name = project.offshore_dem_name0 + '.xya')+\
     74     Geospatial_data(file_name = project.offshore_dem_name1 + '.xya')+\
     75     Geospatial_data(file_name = project.offshore_dem_name2 + '.xya')+\
     76     Geospatial_data(file_name = project.offshore_dem_name3 + '.xya')+\
     77     Geospatial_data(file_name = project.offshore_dem_name4 + '.xya')+\
     78     Geospatial_data(file_name = project.offshore_dem_name5 + '.xya')+\
     79     Geospatial_data(file_name = project.offshore_dem_name6 + '.xya')+\
     80     Geospatial_data(file_name = project.offshore_dem_name7 + '.xya')+\
     81     Geospatial_data(file_name = project.offshore_dem_name8 + '.xya')+\
     82     Geospatial_data(file_name = project.offshore_dem_name9 + '.xya')+\
     83     Geospatial_data(file_name = project.offshore_dem_name10 + '.xya')
     84G12= Geospatial_data(file_name = project.offshore_dem_name11 + '.xya')+\
     85     Geospatial_data(file_name = project.offshore_dem_name12 + '.xya')+\
     86     Geospatial_data(file_name = project.offshore_dem_name13 + '.xya')+\
     87     Geospatial_data(file_name = project.offshore_dem_name14 + '.xya')+\
     88     Geospatial_data(file_name = project.offshore_dem_name15 + '.xya')+\
     89     Geospatial_data(file_name = project.offshore_dem_name16 + '.xya')+\
     90     Geospatial_data(file_name = project.offshore_dem_name17 + '.xya')+\
     91     Geospatial_data(file_name = project.offshore_dem_name18 + '.xya')+\
     92     Geospatial_data(file_name = project.offshore_dem_name19 + '.xya')+\
     93     Geospatial_data(file_name = project.offshore_dem_name20 + '.xya')
     94G13= Geospatial_data(file_name = project.offshore_dem_name21 + '.xya')+\
     95     Geospatial_data(file_name = project.offshore_dem_name22 + '.xya')+\
     96     Geospatial_data(file_name = project.offshore_dem_name23 + '.xya')+\
     97     Geospatial_data(file_name = project.offshore_dem_name24 + '.xya')+\
     98     Geospatial_data(file_name = project.offshore_dem_name25 + '.xya')+\
     99     Geospatial_data(file_name = project.offshore_dem_name26 + '.xya')+\
     100     Geospatial_data(file_name = project.offshore_dem_name27 + '.xya')+\
     101     Geospatial_data(file_name = project.offshore_dem_name28 + '.xya')+\
     102     Geospatial_data(file_name = project.offshore_dem_name29 + '.xya')
     103G14= Geospatial_data(file_name = project.offshore_dem_name30 + '.xya')+\
     104     Geospatial_data(file_name = project.offshore_dem_name31 + '.xya')+\
     105     Geospatial_data(file_name = project.offshore_dem_name32 + '.xya')+\
     106     Geospatial_data(file_name = project.offshore_dem_name33 + '.xya')+\
     107     Geospatial_data(file_name = project.offshore_dem_name34 + '.xya')+\
     108     Geospatial_data(file_name = project.offshore_dem_name35 + '.xya')+\
     109     Geospatial_data(file_name = project.offshore_dem_name36 + '.xya')+\
     110     Geospatial_data(file_name = project.offshore_dem_name37 + '.xya')+\
     111     Geospatial_data(file_name = project.offshore_dem_name38 + '.xya')+\
     112     Geospatial_data(file_name = project.offshore_dem_name39 + '.xya')
     113G15= Geospatial_data(file_name = project.offshore_dem_name40 + '.xya')+\
     114     Geospatial_data(file_name = project.offshore_dem_name41 + '.xya')+\
     115     Geospatial_data(file_name = project.offshore_dem_name42 + '.xya')+\
     116     Geospatial_data(file_name = project.offshore_dem_name43 + '.xya')+\
     117     Geospatial_data(file_name = project.offshore_dem_name44 + '.xya')+\
     118     Geospatial_data(file_name = project.offshore_dem_name45 + '.xya')+\
     119     Geospatial_data(file_name = project.offshore_dem_name46 + '.xya')+\
     120     Geospatial_data(file_name = project.offshore_dem_name47 + '.xya')+\
     121     Geospatial_data(file_name = project.offshore_dem_name48 + '.xya')+\
     122     Geospatial_data(file_name = project.offshore_dem_name49 + '.xya')+\
     123     Geospatial_data(file_name = project.offshore_dem_name50 + '.xya')
     124   
     125print 'create onshore'
     126G2 = Geospatial_data(file_name = project.onshore_dem_name + '.pts')
     127print 'create coast'
     128G3 = Geospatial_data(file_name = project.coast_dem_name + '.xya')
     129print 'add'
     130G = G11 + G12 + G13 + G14 + G15 + G2 + G3
    91131print 'export G'
    92132G.export_points_file(project.combined_dem_name + '.pts')
  • anuga_work/production/sydney_2006/project_slide.py

    r4036 r4045  
    2727# onshore data provided by NSW LPI, Krishna merged with existing
    2828# PMD data to make 100m DEM
    29 on_offshore_name = ''
     29on_offshore_name25 = 'bathy_dem25'
     30on_offshore_name100 = 'bathyland100'
     31nsw100 = 'dem_utm'
    3032
    3133# AHO
     
    5355
    5456# Necessary if using point datasets, rather than grid
    55 on_offshore_dem_name = datadir + on_offshore_name
     57on_offshore25_dem_name = datadir + on_offshore_name25
     58on_offshore100_dem_name = datadir + on_offshore_name100
     59nsw_dem_name = datadir + nsw100
    5660offshore_dem_name1 = datadir + offshore_name1
    5761combined_dem_name   = datadir + 'sydney_combined_elevation'
     
    7276###############################
    7377
    74 # broome digitized polygons
    75 poly_syd1 = read_polygon(polygondir+'.csv')
    76 poly_syd2 = read_polygon(polygondir+'.csv')
    77 poly_syd3 = read_polygon(polygondir+'.csv')
     78# sydney digitized polygons
     79interior_regions = []
     80area = 0.
     81coast_res = 500.
     82for i in range(1,10):
     83    poly = read_polygon(polygondir+'poly'+str(i)+'.csv')
     84    area += polygon_area(poly)
     85    #interior_regions.append([poly,coast_res])
     86
     87poly_syd1 = read_polygon(polygondir+'local.csv')
     88local_res = 50000.
     89interior_regions.append([poly_syd1,local_res])
    7890
    7991print 'Area of local polygon', polygon_area(poly_syd1)/1000000.0
    80 print 'Area of close polygon', polygon_area(poly_syd2)/1000000.0
    81 print 'Area of coastal polygon', polygon_area(poly_syd3)/1000000.0
     92print 'Area of local polygon', area/1000000.0
    8293
    8394###################################################################
     
    8596###################################################################
    8697
     98# clipping for 25m grid for conversion
     99eastingmin25 = 324825
     100eastingmax25 = 347650
     101northingmin25 = 6231960
     102northingmax25 = 6272543
     103
     104poly_25mclip = read_polygon(polygondir+'25mclip.csv')
     105
     106# clipping for 100m grid for conversion
     107eastingmin100 = 315870
     108eastingmax100 = 361607
     109northingmin100 = 6227588
     110northingmax100 = 6285975
     111
     112# clipping for nsw grid for conversion
     113eastingmin_nsw = 315870
     114eastingmax_nsw = 390480
     115northingmin_nsw = 6161100
     116northingmax_nsw = 6330000
     117
     118poly_origsyd = [[eastingmin100,northingmin100],[eastingmax100,northingmin100],\
     119                [eastingmax100,northingmax100],[eastingmin100,northingmax100]]
     120
    87121# exporting asc grid
    88 eastingmin =
    89 eastingmax =
    90 northingmin =
    91 northingmax =
     122#eastingmin =
     123#eastingmax =
     124#northingmin =
     125#northingmax =
    92126
    93 #slump_origin = [,]
     127###################################################################
     128# Slide characteristics
     129###################################################################
     130
     131#slide_origin = [,]
     132bulli_depth = 2087.0
     133bulli_length = 16840.0
     134bulli_thickness = 424.0
     135bulli_width = 8860.0
     136bulli_density = 1.46
     137bulli_alpha = 126.0 + 90.0
     138
     139shovel_depth = 968.0
     140shovel_length = 13500.0
     141shovel_thickness = 165.0
     142shovel_width = 4350.0
     143shovel_density = 1.49
     144shovel_alpha = 118.0 + 90.0
     145
     146yacaaba_depth = 1119.0
     147yacaaba_length = 7050.0
     148yacaaba_thickness = 144.0
     149yacaaba_width = 3080.0
     150yacaaba_density = 1.48
     151yacaaba_alpha = 133.0 + 90.0
  • anuga_work/production/sydney_2006/run_sydney_slide.py

    r4036 r4045  
    22
    33Source data such as elevation and boundary data is assumed to be available in
    4 directories specified by project.py
    5 The output sww file is stored in project.outputtimedir
    6 
    7 The scenario is defined by a triangular mesh created from project.polygon,
     4directories specified by project_slide.py
     5The output sww file is stored in project_slide.outputtimedir
     6
     7The scenario is defined by a triangular mesh created from project_slide.polygon,
    88the elevation data and a tsunami wave generated by s submarine mass failure.
    99
     
    3838
    3939# creates copy of code in output dir
    40 copy_code_files(project.outputtimedir,__file__,dirname(project.__file__)+sep+ project.__name__+'.py' )
     40copy_code_files(project_slide.outputtimedir,__file__,dirname(project_slide.__file__)+sep+ project_slide.__name__+'.py' )
    4141myid = 0
    4242numprocs = 1
    43 start_screen_catcher(project.outputtimedir, myid, numprocs)
    44 
    45 print 'USER:    ', project.user
     43start_screen_catcher(project_slide.outputtimedir, myid, numprocs)
     44
     45print 'USER:    ', project_slide.user
    4646
    4747#-------------------------------------------------------------------------------
     
    5252
    5353# filenames
    54 on_offshore_dem_name = project.on_offshore_dem_name
    55 meshname = project.meshname+'.msh'
     54on_offshore25_dem_name = project_slide.on_offshore25_dem_name
     55on_offshore100_dem_name = project_slide.on_offshore100_dem_name
     56nsw_dem_name = project_slide.nsw_dem_name
     57meshname = project_slide.meshname+'.msh'
    5658
    5759# creates DEM from asc data
    58 convert_dem_from_ascii2netcdf(on_offshore_dem_name, use_cache=True, verbose=True)
     60convert_dem_from_ascii2netcdf(on_offshore25_dem_name, use_cache=True, verbose=True)
     61convert_dem_from_ascii2netcdf(on_offshore100_dem_name, use_cache=True, verbose=True)
     62convert_dem_from_ascii2netcdf(nsw_dem_name, use_cache=True, verbose=True)
    5963
    6064#creates pts file for onshore DEM
    61 dem2pts(on_offshore_dem_name, use_cache=True, verbose=True)
    62 
     65dem2pts(on_offshore25_dem_name,
     66        easting_min=project_slide.eastingmin25,
     67        easting_max=project_slide.eastingmax25,
     68        northing_min=project_slide.northingmin25,
     69        northing_max= project_slide.northingmax25,
     70        use_cache=True, verbose=True)
     71dem2pts(on_offshore100_dem_name,
     72        easting_min=project_slide.eastingmin100,
     73        easting_max=project_slide.eastingmax100,
     74        northing_min=project_slide.northingmin100,
     75        northing_max= project_slide.northingmax100,
     76        use_cache=True, verbose=True)
     77dem2pts(nsw_dem_name,
     78        easting_min=project_slide.eastingmin_nsw,
     79        easting_max=project_slide.eastingmax_nsw,
     80        northing_min=project_slide.northingmin_nsw,
     81        northing_max= project_slide.northingmax_nsw,
     82        use_cache=True, verbose=True)
     83
     84'''
    6385print 'create offshore'
    64 G1 = Geospatial_data(file_name = project.offshore_dem_name1 + '.xya')+\
    65      Geospatial_data(file_name = project.offshore_dem_name2 + '.xya')+\
    66      Geospatial_data(file_name = project.offshore_dem_name3 + '.xya')+\
    67      Geospatial_data(file_name = project.offshore_dem_name4 + '.xya')+\
    68      Geospatial_data(file_name = project.offshore_dem_name5 + '.xya')+\
    69      Geospatial_data(file_name = project.offshore_dem_name6 + '.xya')+\
    70      Geospatial_data(file_name = project.offshore_dem_name7 + '.xya')+\
    71      Geospatial_data(file_name = project.offshore_dem_name8 + '.xya')+\
    72      Geospatial_data(file_name = project.offshore_dem_name9 + '.xya')+\
    73      Geospatial_data(file_name = project.offshore_dem_name10 + '.xya')+\
    74      Geospatial_data(file_name = project.offshore_dem_name11 + '.xya')+\
    75      Geospatial_data(file_name = project.offshore_dem_name12 + '.xya')+\
    76      Geospatial_data(file_name = project.offshore_dem_name13 + '.xya')+\
    77      Geospatial_data(file_name = project.offshore_dem_name14 + '.xya')+\
    78      Geospatial_data(file_name = project.offshore_dem_name15 + '.xya')+\
    79      Geospatial_data(file_name = project.offshore_dem_name16 + '.xya')+\
    80      Geospatial_data(file_name = project.offshore_dem_name17 + '.xya')+\
    81      Geospatial_data(file_name = project.offshore_dem_name18 + '.xya')+\
    82      Geospatial_data(file_name = project.offshore_dem_name19 + '.xya')+\
    83      Geospatial_data(file_name = project.offshore_dem_name20 + '.xya')+\
    84      Geospatial_data(file_name = project.offshore_dem_name21 + '.xya')+\
    85      Geospatial_data(file_name = project.offshore_dem_name22 + '.xya')+\
    86      Geospatial_data(file_name = project.offshore_interp_dem_name + '.pts')
     86G1 = Geospatial_data(file_name = project_slide.offshore_dem_name1 + '.xya')+\
     87     Geospatial_data(file_name = project_slide.offshore_dem_name2 + '.xya')+\
     88     Geospatial_data(file_name = project_slide.offshore_dem_name3 + '.xya')+\
     89     Geospatial_data(file_name = project_slide.offshore_dem_name4 + '.xya')+\
     90     Geospatial_data(file_name = project_slide.offshore_dem_name5 + '.xya')+\
     91     Geospatial_data(file_name = project_slide.offshore_dem_name6 + '.xya')+\
     92     Geospatial_data(file_name = project_slide.offshore_dem_name7 + '.xya')+\
     93     Geospatial_data(file_name = project_slide.offshore_dem_name8 + '.xya')+\
     94     Geospatial_data(file_name = project_slide.offshore_dem_name9 + '.xya')+\
     95     Geospatial_data(file_name = project_slide.offshore_dem_name10 + '.xya')+\
     96     Geospatial_data(file_name = project_slide.offshore_dem_name11 + '.xya')+\
     97     Geospatial_data(file_name = project_slide.offshore_dem_name12 + '.xya')+\
     98     Geospatial_data(file_name = project_slide.offshore_dem_name13 + '.xya')+\
     99     Geospatial_data(file_name = project_slide.offshore_dem_name14 + '.xya')+\
     100     Geospatial_data(file_name = project_slide.offshore_dem_name15 + '.xya')+\
     101     Geospatial_data(file_name = project_slide.offshore_dem_name16 + '.xya')+\
     102     Geospatial_data(file_name = project_slide.offshore_dem_name17 + '.xya')+\
     103     Geospatial_data(file_name = project_slide.offshore_dem_name18 + '.xya')+\
     104     Geospatial_data(file_name = project_slide.offshore_dem_name19 + '.xya')+\
     105     Geospatial_data(file_name = project_slide.offshore_dem_name20 + '.xya')+\
     106     Geospatial_data(file_name = project_slide.offshore_dem_name21 + '.xya')+\
     107     Geospatial_data(file_name = project_slide.offshore_dem_name22 + '.xya')+\
     108     Geospatial_data(file_name = project_slide.offshore_interp_dem_name + '.pts')
     109'''
    87110print 'create onshore'
    88 G2 = Geospatial_data(file_name = project.on_offshore_dem_name + '.pts')
     111G2 = Geospatial_data(file_name = project_slide.on_offshore25_dem_name + '.pts')
     112G3 = Geospatial_data(file_name = project_slide.on_offshore100_dem_name + '.pts')
     113G4 = Geospatial_data(file_name = project_slide.nsw_dem_name + '.pts')
    89114print 'add'
    90 G = G1 + G2 + G3
     115#G5
     116G = G2.clip(Geospatial_data(project_slide.poly_25mclip)) +\
     117    G3.clip(Geospatial_data(project_slide.poly_origsyd)) +\
     118    (G4.clip(Geospatial_data(project_slide.polyAll))).clip_outside(Geospatial_data(project_slide.poly_origsyd))
    91119print 'export points'
    92 G.export_points_file(project.combined_dem_name + '.pts')
    93 G.export_points_file(project.combined_dem_name + '.xya')
     120G.export_points_file(project_slide.combined_dem_name + '.pts')
     121G.export_points_file(project_slide.combined_dem_name + '.xya')
    94122
    95123#----------------------------------------------------------------------------
    96124# Create the triangular mesh based on overall clipping polygon with a tagged
    97 # boundary and interior regions defined in project.py along with
     125# boundary and interior regions defined in project_slide.py along with
    98126# resolutions (maximal area of per triangle) for each polygon
    99127#-------------------------------------------------------------------------------
     
    102130remainder_res = 500000
    103131local_res = 25000
    104 syd_res = 5000
    105 coast_res = 500
    106 interior_regions = [[project.poly_syd1, local_res],
    107                     [project.poly_syd2, syd_res],
    108                     [project.poly_syd3, coast_res]]
     132#interior_regions = [[project_slide.poly_syd1, local_res]]
     133#interior_regions.append(project_slide.poly_sydcoast)
    109134
    110135from caching import cache
    111136_ = cache(create_mesh_from_regions,
    112           project.polyAll,
     137          project_slide.polyAll,
    113138           {'boundary_tags': {'e0': [0], 'e1': [1], 'e2': [2],
    114                               'e3': [3], 'e4':[4], 'e5': [5],
    115                               'e6': [6]},
     139                              'e3': [3], 'e4':[4]},
    116140           'maximum_triangle_area': remainder_res,
    117141           'filename': meshname,
    118            'interior_regions': interior_regions},
     142           'interior_regions': project_slide.interior_regions},
    119143          verbose = True, evaluate=False)
    120144print 'created mesh'
     
    129153print domain.statistics()
    130154
    131 domain.set_name(project.basename)
    132 domain.set_datadir(project.outputtimedir)
     155domain.set_name(project_slide.basename)
     156domain.set_datadir(project_slide.outputtimedir)
    133157domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum'])
    134158domain.set_minimum_storable_height(0.01)
     
    142166domain.set_quantity('friction', 0.0)
    143167domain.set_quantity('elevation',
    144                     filename = project.combined_dem_name + '.pts',
     168                    filename = project_slide.combined_dem_name + '.pts',
    145169                    use_cache = True,
    146170                    verbose = True,
     
    153177from smf import slide_tsunami
    154178
    155 tsunami_source = slide_tsunami(length=30000.0,
    156                                depth=400.0,
    157                                slope=6.0,
    158                                thickness=176.0,
    159                                radius=3330,
    160                                dphi=0.23,
    161                                x0=project.slump_origin[0],
    162                                y0=project.slump_origin[1],
    163                                alpha=0.0,
     179tsunami_source = slide_tsunami(length=project_slide.bulli_length,
     180                               width=project_slide.bulli_width,
     181                               depth=project_slide.bulli_depth,
     182                               slope=project_slide.bulli_slope,
     183                               thickness=project_slide.bulli_thickness,
     184                               x0=project_slide.slide_origin[0],
     185                               y0=project_slide.slide_origin[1],
     186                               alpha=project_slide.bulli_alpha,
    164187                               domain=domain)
    165188
     
    172195Bd = Dirichlet_boundary([tide,0,0])
    173196
    174 domain.set_boundary( {'e0': Bd,  'e1': Bd, 'e2': Bd, 'e3': Bd, 'e4': Bd,
    175                       'e5': Bd,  'e6': Bd} )
     197domain.set_boundary( {'e0': Bd,  'e1': Bd, 'e2': Bd, 'e3': Bd, 'e4': Bd} )
    176198
    177199
     
    184206for t in domain.evolve(yieldstep = 30, finaltime = 480):
    185207    domain.write_time()
    186     domain.write_boundary_statistics(tags = 'e14')
     208    domain.write_boundary_statistics(tags = 'e2')
    187209    stagestep = domain.get_quantity('stage')
    188210
Note: See TracChangeset for help on using the changeset viewer.