Changeset 4072 for anuga_work/production


Ignore:
Timestamp:
Dec 11, 2006, 6:45:38 PM (18 years ago)
Author:
sexton
Message:

slide modelling updates (based on inundation extents found)

Location:
anuga_work/production
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/newcastle_2006/project_slide.py

    r4069 r4072  
    7878
    7979# bounding polygon for study area
    80 polyAll = read_polygon(polygondir+'extentC2.csv')
     80polyAll = read_polygon(polygondir+'extentC3.csv')
    8181
    8282print 'Area of bounding polygon', polygon_area(polyAll)/1000000.0
     
    107107
    108108# exporting asc grid
    109 #eastingmin =
    110 #eastingmax =
    111 #northingmin =
    112 #northingmax =
     109eastingmin = 366890
     110eastingmax = 404270
     111northingmin = 6335450
     112northingmax = 6375630
    113113
    114114###################################################################
  • anuga_work/production/newcastle_2006/run_newcastle_slide.py

    r4069 r4072  
    103103          project_slide.polyAll,
    104104           {'boundary_tags': {'e0': [0], 'e1': [1], 'e2': [2],
    105                               'e3': [3], 'e4':[4]},
     105                              'e3': [3], 'e4':[4], 'e5': [5]},
    106106           'maximum_triangle_area': remainder_res,
    107107           'filename': meshname,
     
    161161Bd = Dirichlet_boundary([tide,0,0])
    162162
    163 domain.set_boundary( {'e0': Bd,  'e1': Bd, 'e2': Bd, 'e3': Bd, 'e4': Bd} )
     163domain.set_boundary( {'e0': Bd,  'e1': Bd, 'e2': Bd, 'e3': Bd,
     164                      'e4': Bd, 'e5': Bd} )
    164165
    165166
  • anuga_work/production/sydney_2006/export_results.py

    r3514 r4072  
    1 import project, os
     1import project_slide, os
     2import sys
    23
    3 from anuga.pyvolution.data_manager import sww2dem
    4 from anuga.pyvolution.ermapper_grids import read_ermapper_grid
     4from anuga.shallow_water.data_manager import sww2dem
     5from os import sep
    56
    6 name = project.outputname
     7time_dir = '20061206_061014'
     8directory = project_slide.outputdir
     9name = directory + time_dir + sep + project_slide.basename
    710
    8 #print 'Which variable do you want to export?'
    9 #which_var = int(raw_input('Stage = 0, Absolute Momentum = 1, Depth = 2, Speed = 3  '  ))
     11is_parallel = False
     12if is_parallel == True: nodes = 4
     13print 'output dir:', name
     14
    1015which_var = 2
    11 
    1216if which_var == 0:  # Stage
    1317    outname = name + '_stage'
     
    1519
    1620if which_var == 1:  # Absolute Momentum
    17     outname = name + '_momentum'
    18     quantityname = '(xmomentum**2 + ymomentum**2)**0.5'  #Absolute momentum
     21    outname = name + '_momentum_i1'
     22    quantityname = '(xmomentum**2 + ymomentum**2)**0.5' 
    1923
    2024if which_var == 2:  # Depth
    2125    outname = name + '_depth'
    22     quantityname = 'stage-elevation'  #Depth
     26    quantityname = 'stage-elevation' 
    2327
    2428if which_var == 3:  # Speed
    25     outname = name + '_speed'
     29    outname = name + '_speed_i0'
    2630    #quantityname = '((xmomentum/(stage-elevation))**2 + (ymomentum/(stage-elevation))**2)**0.5'  #Speed
    27     #quantityname = 'xmomentum/(stage-elevation)'  #Speed
    2831    quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-30)'  #Speed
    2932
    30    
    31 sww2dem(name, basename_out = outname,
    32             quantity = quantityname,
    33             cellsize = 25,       # Trevor would like this at 25
    34             # define region for viz purposes
    35             easting_min = project.eminviz,
    36             easting_max = project.emaxviz,
    37             northing_min = project.nminviz,
    38             northing_max = project.nmaxviz,       
    39             reduction = max, #this is because we want max quantityname
    40             verbose = True,
    41             format = 'asc')
     33if which_var == 4:  # Elevation
     34    outname = name + '_elevation'
     35    quantityname = 'elevation'  #Elevation
    4236
    43 #Check
    44 
    45 #data = read_ermapper_grid(name)
    46 #print 'Values from %s are in [%f, %f]' %(name, min(data.flat), max(data.flat))
     37if is_parallel == True:
     38    for i in range(0,nodes):
     39        namei = name + '_P%d_%d' %(i,nodes)
     40        outnamei = outname + '_P%d_%d' %(i,nodes)
     41        print 'start sww2dem for sww file %d' %(i)
     42        sww2dem(namei, basename_out = outnamei,
     43                    quantity = quantityname,
     44                    timestep = 1,
     45                    cellsize = 100,     
     46                    #easting_min = project.e_min_area,
     47                    #easting_max = project.e_max_area,
     48                    #northing_min = project.n_min_area,
     49                    #northing_max = project.n_max_area,       
     50                    reduction = max,
     51                    verbose = True,
     52                    format = 'asc')
     53else:
     54    print 'start sww2dem'
     55    sww2dem(name, basename_out = outname,
     56                quantity = quantityname,
     57                cellsize = 100,     
     58                easting_min = project_slide.eastingmin,
     59                easting_max = project_slide.eastingmax,
     60                northing_min = project_slide.northingmin,
     61                northing_max = project_slide.northingmax,       
     62                reduction = max,
     63                verbose = True,
     64                format = 'asc')
  • anuga_work/production/sydney_2006/project_slide.py

    r4058 r4072  
    9393
    9494# sydney digitized polygons
    95 poly_coast = read_polygon(polygondir+'coast.csv')
     95poly_coast = read_polygon(polygondir+'coast2.csv')
    9696poly_syd1 = read_polygon(polygondir+'local.csv')
    9797
     
    129129
    130130# exporting asc grid
    131 #eastingmin =
    132 #eastingmax =
    133 #northingmin =
    134 #northingmax =
     131eastingmin = 337500
     132eastingmax = 344060
     133northingmin = 6248890
     134northingmax = 6274550
    135135
    136136###################################################################
  • anuga_work/production/sydney_2006/run_sydney_slide.py

    r4063 r4072  
    113113
    114114from anuga.pmesh.mesh_interface import create_mesh_from_regions
    115 remainder_res = 150000.
     115remainder_res = 250000.
    116116local_res = 50000.
    117117coast_res = 500.
  • anuga_work/production/wollongong_2006/project_slide.py

    r4063 r4072  
    8787
    8888# areaA digitized polygons
    89 poly_local = read_polygon(polygondir+'local.csv')
    90 poly_gong = read_polygon(polygondir+'gong2.csv')
     89poly_local = read_polygon(polygondir+'local2.csv')
     90poly_gong = read_polygon(polygondir+'gong3.csv')
     91poly_southgong = read_polygon(polygondir+'south_gong.csv')
    9192
    9293print 'Area of local polygon', polygon_area(poly_local)/1000000.0
     
    106107
    107108# exporting asc grid
    108 #eastingmin =
    109 #eastingmax =
    110 #northingmin =
    111 #northingmax =
     109##eastingmin = 300000
     110##eastingmax = 314000
     111##northingmin = 6167680
     112##northingmax = 6202130
     113
     114eastingmin = 300000
     115eastingmax = 314000
     116northingmin = 6167680
     117northingmax = 6202130
    112118
    113119###################################################################
  • anuga_work/production/wollongong_2006/run_gong_slide.py

    r4069 r4072  
    100100gong_res = 500
    101101interior_regions = [[project_slide.poly_local, local_res],
    102                     [project_slide.poly_gong, gong_res]]
     102                    [project_slide.poly_gong, gong_res],
     103                    [project_slide.poly_southgong, gong_res]]
    103104
    104105from caching import cache
Note: See TracChangeset for help on using the changeset viewer.