Changeset 3661


Ignore:
Timestamp:
Sep 25, 2006, 2:26:13 PM (18 years ago)
Author:
sexton
Message:

clean up

Location:
anuga_work/production/hobart_2006
Files:
3 edited

Legend:

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

    r3650 r3661  
    33
    44from anuga.shallow_water.data_manager import sww2dem
     5#from anuga.pyvolution.ermapper_grids import read_ermapper_grid
     6from anuga.abstract_2d_finite_volumes.util import Screen_Catcher
    57from os import sep
    68
    7 time_dir = '20060921_083846' #MSL
     9time_dir = '20060922_024842' #MSL
    810directory = project.outputdir
    9 name = directory + time_dir + sep + 'source'
     11name = directory + time_dir +sep + 'source'
    1012
     13print 'output dir:', name
    1114#print 'Which variable do you want to export?'
    1215#which_var = int(raw_input('Stage = 0, Absolute Momentum = 1, Depth = 2, Speed = 3  '  ))
    13 which_var = 4 # for Hamish/Alex to compare
    14 #which_var = 2 # for Ingo/Neil to make maps
    15 
     16which_var = 4
     17#sys.stderr.write(sys.stdout.data)
    1618if which_var == 0:  # Stage
    1719    outname = name + '_stage'
     
    3335
    3436if which_var == 4:  # Elevation
    35     outname = name + '_elevation'
     37    outname = name + '_elevation_node3'
    3638    quantityname = 'elevation'  #Elevation
    3739
     40print 'start sww2dem'
     41#sys.stderr.write(sys.stdout.data)
    3842sww2dem(name, basename_out = outname,
    3943            quantity = quantityname,
    40             cellsize = 25,       
     44            cellsize = 25,      # Trevor would like this at 25
    4145            # define region for viz purposes
    4246            easting_min = project.e_min_area,
     
    4751            verbose = True,
    4852            format = 'asc')
     53
     54#sys.stderr.write(sys.stdout.data)
     55
     56#Check
     57
     58#data = read_ermapper_grid(name)
     59#print 'Values from %s are in [%f, %f]' %(name, min(data.flat), max(data.flat))
  • anuga_work/production/hobart_2006/project.py

    r3660 r3661  
    1515#onshore_name = 'hob3_topo' # original
    1616onshore_name = 'hob5_topo' # 12.5m grid and clipped to 100m elevation or 3000m from coast
    17 onshore_name_25 = 'hob5_topo_25m' # 25m grid and clipped to 100m elevation or 3000m from coast
     17#onshore_name_25 = 'hob5_topo_25m' # 25m grid and clipped to 100m elevation or 3000m from coast
     18onshore_name_25 = 'hob6_topo_25m' # 25m grid NOT clipped
    1819offshore_name_tas1 = 'derwent_2m'
    1920offshore_name_tas2 = 'derwent_5m'
     
    121122
    122123# region to export for inundation map
    123 e_min_area = 500000
     124e_min_area = 490000
    124125e_max_area = 580000
    125 n_min_area = 5200000
     126n_min_area = 5160000
    126127n_max_area = 5275000
    127128
     
    142143polyAll, zone = convert_points_from_latlon_to_utm([d0, d1, d2, d3])
    143144refzone = zone
    144 NWcorner = polyAll[0]
    145 SEcorner = polyAll[2]
     145polyAll = [[500000, 5200000],[520000, 5200000],[520000, 5400000],[500000,5400000]]
    146146
    147147# region to export for Alex to make bathymetry map
    148 e_min_area = 480000#NWcorner[0]
    149 e_max_area = 600000#SEcorner[0]
    150 n_min_area = 5156000#NWcorner[1]
    151 n_max_area = 5285000#SEcorner[1]
     148e_min_area = 500000 #490000
     149e_max_area = 560000 #580000
     150n_min_area = 5240000#5160000
     151n_max_area = 5260000#5270000
    152152
    153153#Interior region - Hobart city area + Glenorchy, Kingston
  • anuga_work/production/hobart_2006/run_hobart.py

    r3660 r3661  
    8888                                 project.onshore_dem_name_25 + '.pts',
    8989                                 project.all_onshore_dem_name + '.pts')
    90 #print 'local offshore data sets'
    91 #G1 = Geospatial_data(file_name = project.offshore_dem_name_local1 + '.xya')
    92 #G2 = Geospatial_data(file_name = project.offshore_dem_name_local2 + '.xya')
    93 #G3 = Geospatial_data(file_name = project.offshore_dem_name_local3 + '.xya')
    94 #G4 = Geospatial_data(file_name = project.offshore_dem_name_local4 + '.xya')
    95 #G11 = G1 + G2 + G3 + G4
    96 #print 'aho offshore data sets'
    97 #G5 = Geospatial_data(file_name = project.offshore_dem_name_aho1 + '.xya')
    98 #G6 = Geospatial_data(file_name = project.offshore_dem_name_aho2 + '.xya')
    99 #G7 = Geospatial_data(file_name = project.offshore_dem_name_aho3 + '.xya')
    100 #G8 = Geospatial_data(file_name = project.offshore_dem_name_aho4 + '.xya')
    101 #G9 = Geospatial_data(file_name = project.offshore_dem_name_aho5 + '.xya')
    102 #G10 = Geospatial_data(file_name = project.offshore_dem_name_aho6 + '.xya')
    103 #G11 = Geospatial_data(file_name = project.offshore_dem_name_aho7 + '.xya')
    104 #G12 = Geospatial_data(file_name = project.offshore_dem_name_aho8 + '.xya')
    105 #G13 = Geospatial_data(file_name = project.offshore_dem_name_aho9 + '.xya')
    106 #G14 = Geospatial_data(file_name = project.offshore_dem_name_aho10 + '.xya')
    107 #G15 = Geospatial_data(file_name = project.offshore_dem_name_aho11 + '.xya')
    108 #G16 = Geospatial_data(file_name = project.offshore_dem_name_aho12 + '.xya')
    109 #G17 = Geospatial_data(file_name = project.offshore_dem_name_aho13 + '.xya')
    110 #G18 = Geospatial_data(file_name = project.offshore_dem_name_aho14 + '.xya')
    111 #G19 = Geospatial_data(file_name = project.offshore_dem_name_aho15 + '.xya')
    112 #G20 = Geospatial_data(file_name = project.offshore_dem_name_aho16 + '.xya')
    113 #G12 = G5+G6+G7+G8+G9+G10+G11+G12+G13+G14+G15+G16+G17+G18+G19+G20
    114 #print 'local onshore dem'
    115 #G21 = Geospatial_data(file_name = project.onshore_dem_name + '.pts')
    116 print 'coast'
    117 #G22 = Geospatial_data(file_name = project.coast_dem_name + '.xya')
    118 #print 'adding data sets'
    119 #G = G11 + G12 + G21 + G22
    120 #G = G1+G2+G3+G4+G5+G6+G7+G8+G9+G10+G11+G12+G13+G14+G15+G16+G17+G18+G19+G20+G21+G22
    121 #G = G5+G6+G7+G8+G9+G10+G11+G12+G13+G14+G15+G16+G17+G18+G19+G20+G21+G22
    122 #G = G21+G22+G5+G6+G7+G8+G9+G10+G11+G12+G13+G14+G15+G16+G17+G18+G19+G20
    123 #G = G21+G22+G5
    124 #G = Geospatial_data(file_name = project.onshore_dem_name + '.pts') #+ \
    125 #    Geospatial_data(file_name = project.coast_dem_name + '.xya') #+ \
    126 #    Geospatial_data(file_name = project.offshore_dem_name_aho1 + '.xya')
     90
     91print 'adding data sets'
    12792G = Geospatial_data(file_name = project.offshore_dem_name_local1 + '.xya')+\
    12893    Geospatial_data(file_name = project.offshore_dem_name_local2 + '.xya')+\
     
    148113G.export_points_file(project.combined_dem_name + '.pts')
    149114
    150 #-------------------------------------------------------------------------------                                 
     115#----------------------------------------------------------------------------
    151116# Create the triangular mesh based on overall clipping polygon with a tagged
    152117# boundary and interior regions defined in project.py along with
     
    171136          {'boundary_tags': {'bottom': [0], 'right': [1],
    172137                             'top': [2], 'left': [3]},
    173            'maximum_triangle_area': 250000,
    174            'filename': meshname,           
    175            'interior_regions': interior_regions},
     138           'maximum_triangle_area': 100000,
     139           'filename': meshname},           
     140           #'interior_regions': interior_regions},
    176141          verbose = True, evaluate=True)
    177142
     
    211176
    212177#-------------------------------------------------------------------------------                                 
    213 # Setup boundary conditions (all reflective)
     178# Setup boundary conditions
    214179#-------------------------------------------------------------------------------
    215180print 'start ferret2sww'
     
    274239t0 = time.time()
    275240
    276 for t in domain.evolve(yieldstep = 240, finaltime = 7200):
     241for t in domain.evolve(yieldstep = 60, finaltime = 120):
    277242    domain.write_time()
    278243    domain.write_boundary_statistics(tags = 'bottom')     
    279244
    280 for t in domain.evolve(yieldstep = 120, finaltime = 12600
    281                        ,skip_initial_step = True):
    282     domain.write_time()
    283     domain.write_boundary_statistics(tags = 'bottom')     
     245#for t in domain.evolve(yieldstep = 120, finaltime = 12600
     246#                       ,skip_initial_step = True):
     247#    domain.write_time()
     248#    domain.write_boundary_statistics(tags = 'bottom')     
    284249   
    285250print 'That took %.2f seconds' %(time.time()-t0)
Note: See TracChangeset for help on using the changeset viewer.