Changeset 3136


Ignore:
Timestamp:
Jun 13, 2006, 10:52:04 AM (18 years ago)
Author:
sexton
Message:

updates

Files:
5 added
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • documentation/user_manual/examples/project.py

    r2481 r3136  
    1313home = '.'
    1414
    15 
    1615if sys.platform == 'win32':
    1716    home = environ['INUNDATIONHOME']     #Sandpit's parent dir
     
    1918    home = expanduser('~')
    2019   
    21 
    2220basename = 'Sydney'
    2321
     
    2826# revised 25m data
    2927finename = 'bathy_dem25' # get from Neil/Ingo (DEM or topo data) Wed 25 Jan
    30 
    3128
    3229#Derive subdirectories and filenames
     
    8380qp11 = [343487.0, 6269928.0]
    8481qp12 = [343991.0, 6270269.0]
     82
     83# demo poly which isn't rectangular
     84j0 = [385000, 6280000]
     85j1 = [350000, 6270000]
     86j2 = [325000, 6263000]
     87j3 = [325000, 6260000]
     88j4 = [316000, 6260000]
     89j5 = [316000, 6247000]
     90j6 = [350000, 6247000]
     91j7 = [385000, 6238000]
     92
     93demopoly = [j0, j2, j3, j4, j5, j6, j7]
     94
     95polygonptsfile1 = polygondir + 'poly3'
     96polygonptsfile2 = polygondir + 'poly4'
     97polygonptsfile3 = polygondir + 'poly5'
     98northern_polygon = read_polygon(polygonptsfile1 + '.csv')
     99harbour_polygon = read_polygon(polygonptsfile2 + '.csv')
     100southern_polygon = read_polygon(polygonptsfile3 + '.csv')
    85101
    86102#Interior regions - the Harbour
     
    171187botanybay_polygon_2, zone = convert_points_from_latlon_to_utm([j92, j12, j22, j62, j82, j72, j42])
    172188
    173 
    174 
    175189slump_origin = [385000.0, 6255000.0] #Absolute UTM
  • documentation/user_manual/examples/runsydney.py

    r3092 r3136  
    2020
    2121# Related major packages
    22 from pyvolution.shallow_water import Domain, Reflective_boundary
     22from pyvolution.shallow_water import Domain, Dirichlet_boundary
    2323from pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts
    2424from pyvolution.combine_pts import combine_rectangular_points_files
     
    5555# Interior regions and mesh resolutions
    5656interior_res = 5000
    57 interior_regions = [[project.harbour_polygon_2, interior_res],
    58                     [project.botanybay_polygon_2, interior_res]]
     57interior_regions = [[project.northern_polygon, interior_res],
     58                    [project.harbour_polygon, interior_res],
     59                    [project.southern_polygon, interior_res]]
    5960
    6061
    61 create_mesh_from_regions(project.diffpolygonall,
    62                          boundary_tags= {'bottom': [0],
    63                                          'right1': [1],
    64                                          'right0': [2],
    65                                          'right2': [3],
    66                                          'top': [4],
    67                                          'left1': [5],
    68                                          'left2': [6],
    69                                          'left3': [7]},
     62create_mesh_from_regions(project.demopoly,
     63                         boundary_tags= {'oceannorth': [0],
     64                                         'onshorewest': [1],
     65                                         'harbournorth': [2],
     66                                         'harbourwest': [3],
     67                                         'harboursouth': [4],
     68                                         'oceansouth': [5],
     69                                         'oceaneast': [6]},
    7070                         maximum_triangle_area=100000,
    7171                         filename=meshname,           
     
    117117
    118118#------------------------------------------------------------------------------
    119 # Setup boundary conditions (all reflective)
     119# Setup boundary conditions (all Dirichlet)
    120120#------------------------------------------------------------------------------
    121121
    122122print 'Available boundary tags', domain.get_boundary_tags()
    123123
    124 Br = Reflective_boundary(domain)
    125 domain.set_boundary( {'bottom': Br, 'right1': Br, 'right0': Br,
    126                       'right2': Br, 'top': Br, 'left1': Br,
    127                       'left2': Br, 'left3': Br} )
     124Bd = Dirichlet_boundary([0.0,0.0,0.0])
     125domain.set_boundary( {'oceannorth': Bd, 'onshorewest': Bd,
     126                      'harbournorth': Bd, 'harbourwest': Bd,
     127                      'harboursouth': Bd, 'oceansouth': Bd,
     128                      'oceaneast': Bd})
    128129
    129130
     
    137138for t in domain.evolve(yieldstep = 120, duration = 18000):
    138139    print domain.timestepping_statistics()
    139     print domain.boundary_statistics(tags = 'bottom')   
     140    print domain.boundary_statistics(tags = 'oceaneast')   
    140141   
    141142print 'That took %.2f seconds' %(time.time()-t0)
  • inundation/pyvolution/smf.py

    r2965 r3136  
    346346        kappa = self.kappa
    347347        kappad = self.kappad
    348         amin = self.find_min(x0,wa,kappad,kappa,dx,am)
     348        #amin = self.find_min(x0,wa,kappad,kappa,dx,am)
     349        amin = 1.0
    349350
    350351        #double Gaussian calculation assumes water displacement is oriented
     
    361362        maxz = 0.0
    362363        minz = 0.0
    363         print 'here i am about to calculate z with dx = ', dx
    364364        for i in range(N):
    365365            try:
     
    372372                pass
    373373       
    374         print 'maximum of Double Gaussian function', maxz
    375         print 'minimum of Double Gaussian function', minz
    376374        return z
    377375
  • production/onslow_2006/make_report.py

    r3094 r3136  
    7676            '0 AHD': 'MSL_map'}
    7777
    78 damage_maps = {'1.5 AHD': 'HAT_damage',
    79                '-1.5 AHD': 'LAT_damage',
    80                '0 AHD': 'MSL_damage'}
     78#damage_maps = {'1.5 AHD': 'HAT_damage',
     79#               '-1.5 AHD': 'LAT_damage',
     80#               '0 AHD': 'MSL_damage'}
    8181
    8282gauge_map = 'onslow_gauge_map.jpg'
     
    170170    \input{tsunami_scenario}
    171171
    172    \section{Inundation Model}
     172   \section{Inundation model}
    173173    \label{sec:anuga}
    174174    \input{anuga}
     
    234234
    235235s = """
    236    \section{Damage modelling}
    237     \label{sec:damage}
     236   \section{Impact modelling}
     237    \label{sec:impact}
    238238     \input{damage}
    239239"""
    240240fid.write(s)
    241241
    242 for i, name in enumerate(production_dirs.keys()):
    243 
    244     s = '\input{%s} \n \clearpage \n \n' %damage_maps[production_dirs[name]]
    245     fid.write(s)
     242#for i, name in enumerate(production_dirs.keys()):
     243
     244#    s = '\input{%s} \n \clearpage \n \n' %damage_maps[production_dirs[name]]
     245#    fid.write(s)
    246246
    247247s = """
  • production/onslow_2006/plot_data_extent.py

    r3024 r3136  
    125125    figure(5)
    126126    figname = 'onslow_new_boundary_test'
     127    gaugex, gaugey = read_file(project.gauges50)
    127128    x50, y50 = poly_xy(project.bounding_poly50)
     129    x_onslow, y_onslow = poly_xy(project.poly_onslow)
     130    x_coast, y_coast = poly_xy(project.poly_coast)
    128131    #x25, y25 = poly_xy(project.bounding_poly25)
    129132    #plot(x50,y50,'r-',x25,y25,'r-',x1,y1,'g-')
    130     plot(x50,y50,'r-',x1,y1,'g-')
     133    plot(x50,y50,'r-',x1,y1,'g-', gaugex, gaugey, 'b+', x_onslow, y_onslow,'r-', x_coast, y_coast,'r-')
    131134    savefig(figname)
    132135close('all')
  • production/onslow_2006/project.py

    r2958 r3136  
    33"""
    44
    5 from os import sep, environ, getenv, getcwd
     5from os import sep, environ
    66from os.path import expanduser
    77from utilities.polygon import read_polygon
     
    1414from time import localtime, strftime
    1515
     16from os import getcwd
    1617               
    1718#Making assumptions about the location of scenario data
     
    3536if sys.platform == 'win32':
    3637    home = environ['INUNDATIONHOME']     #Sandpit's parent dir
    37 #    home = environ['INUNDATIONHOME']     #Sandpit's parent dir
     38    comparehome = environ['ANUGAHOME']
    3839else:   
    39     home = getenv('INUNDATIONHOME', sep+'d'+sep+'cit'+sep+'1'+sep+'cit'+sep+'risk_assessment_methods_project'+sep+'inundation')     
     40    home = environ['INUNDATIONHOME']     #Sandpit's parent dir
     41#    home = expanduser('~')
    4042
    4143#Derive subdirectories and filenames
     
    5052outputdir = home+sep+scenario_dir_name+sep+'output'+sep
    5153tidedir = home+sep+scenario_dir_name+sep+'tide_data'+sep
    52 
     54comparereportdir = comparehome+sep+'documentation'+sep+'experimentation'+'boundary_ANUGA_MOST'
    5355print'bound', boundarydir
    5456
    5557#gauge_filename = gaugedir + 'onslow_gauges.xya'
    5658#for MOST
    57 #gauge_filename = gaugedir + 'onslow_gauges1.xya'
    5859gauge_filename = gaugedir + 'gauge_location_onslow.csv'
     60gauges50 = gaugedir + '50_gauges.xya'
     61community_filename = gaugedir + 'CHINS_v2.csv'
     62community_scenario = gaugedir + 'community_onslow.csv'
    5963buildings_filename = gaugedir + 'onslow_res.csv'
    6064community_filename = gaugedir + 'CHINS_v2.csv'
    6165community_scenario = gaugedir + 'community_onslow.csv'
     66
     67
    6268gaugetimeseries = gaugedir + 'onslow'
    6369
     
    180186
    181187poly_region = [m0, m1, m2, m3, m4, m5]
     188
     189from coordinate_transforms.redfearn import redfearn
     190# boundary up to 50 m contour
     191lat1_50 = degminsec2decimal_degrees(-21,30,0)
     192lat2_50 = degminsec2decimal_degrees(-21,25,0)
     193lat3_50 = degminsec2decimal_degrees(-21,12,0)
     194lat4_50 = degminsec2decimal_degrees(-21,0,0)
     195lon1_50 = degminsec2decimal_degrees(114,40,0)
     196lon2_50 = degminsec2decimal_degrees(114,49,0)
     197lon3_50 = degminsec2decimal_degrees(115,1,0)
     198lon4_50 = degminsec2decimal_degrees(115,9,0)
     199z, easting, northing = redfearn(lat1_50, lon1_50)
     200p0_50 = [easting, northing]
     201z, easting, northing = redfearn(lat2_50, lon2_50)
     202p1_50 = [easting, northing]
     203z, easting, northing= redfearn(lat3_50, lon3_50)
     204p2_50 = [easting, northing]
     205z, easting, northing = redfearn(lat4_50, lon4_50)
     206p3_50 = [easting, northing]
     207
     208d4_50 = [285000, 7585000]
     209d6_50 = [330000, 7605000]
     210bounding_poly50 = [p0_50, p1_50, p2_50, p3_50, d6_50, d5, d4_50]
     211
     212# boundary up to 25 m contour
     213lat1_25 = degminsec2decimal_degrees(-21,30,0)
     214lat2_25 = degminsec2decimal_degrees(-21,24,0)
     215lat3_25 = degminsec2decimal_degrees(-21,3,0)
     216lon1_25 = degminsec2decimal_degrees(114,46,0)
     217lon2_25 = degminsec2decimal_degrees(114,53,0)
     218lon3_25 = degminsec2decimal_degrees(115,9,0)
     219z, easting, northing = redfearn(lat1_25, lon1_25)
     220p0_25 = [easting, northing]
     221z, easting, northing = redfearn(lat2_25, lon2_25)
     222p1_25 = [easting, northing]
     223z, easting, northing = redfearn(lat3_25, lon3_25)
     224p2_25 = [easting, northing]
     225bounding_poly25 = [p0_25, p1_25, p2_25, d6, d5, d4]
  • production/onslow_2006/report/anuga.tex

    r3098 r3136  
    3030event. Throughout the modelling process, a number of issues became
    3131evident. A standard assumption is that zero AHD is approximately
    32 the same as Mean Sea Level (MSL). Implementing values for
     32the same as Mean Sea Level (MSL). Implementing the values provided for
    3333Highest Astronomical Tide (HAT) and Lowest Astronomical Tide (LAT)
    3434would inundate some regions of Onslow before the simulation is even begun.
     
    3737is enough evidence suggesting different high tide marks (with respect
    3838to a set datum) within
    39 a localised region. As an aside, a current GA contract underway is
     39a localised region. As an aside, a current GA contract is
    4040extracting information from LANDSAT imagery to reconstruct the
    4141tidal variations for various WA locations. Future modelling of
  • production/onslow_2006/report/onslow_2006_report.tex

    r3094 r3136  
    5555    \input{tsunami_scenario}
    5656
    57    \section{Inundation Model}
     57   \section{Inundation model}
    5858    \label{sec:anuga}
    5959    \input{anuga}
     
    106106 
    107107
    108    \section{Damage modelling}
    109     \label{sec:damage}
     108   \section{Impact modelling}
     109    \label{sec:impact}
    110110     \input{damage}
    111 \input{MSL_damage}
    112  \clearpage
    113  
    114 \input{LAT_damage}
    115  \clearpage
    116  
    117 \input{HAT_damage}
    118  \clearpage
    119  
    120111
    121112   \section{Summary}
  • production/onslow_2006/report/summary.tex

    r3064 r3136  
    44bathymetry and tsunami source uncertainties.
    55Further investigation of the point at which
    6 ANUGA can use the deep water model output is also required.
     6ANUGA can use the deep water model output is also required as well
     7as incorporating appropriate friction coefficients.s
Note: See TracChangeset for help on using the changeset viewer.