Changeset 2773


Ignore:
Timestamp:
Apr 27, 2006, 11:11:05 AM (19 years ago)
Author:
nick
Message:

changes to onslow

Location:
production/onslow_2006
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • production/onslow_2006/export_results.py

    r2706 r2773  
    77from os import sep
    88
    9 time_dir = "20060327_095435"
     9time_dir = "20060419_071046"
    1010directory = project.outputdir
    1111name = directory + time_dir +sep + "source"
     
    1313#normal screen output is stored in 'outname'
    1414screen_output_name = directory + time_dir + sep + "export_output.txt"
     15screen_error_name = directory + time_dir + sep + "export_error.txt"
    1516
    1617#used to catch screen output to file
    1718sys.stdout = Screen_Catcher(screen_output_name)
    18 sys.stderr = Screen_Catcher(screen_output_name)
     19sys.stderr = Screen_Catcher(screen_error_name)
    1920
    2021print 'output dir:', name
    2122#print 'Which variable do you want to export?'
    2223#which_var = int(raw_input('Stage = 0, Absolute Momentum = 1, Depth = 2, Speed = 3  '  ))
    23 which_var = 4
     24which_var = 2
    2425sys.stderr.write(sys.stdout.data)
    2526if which_var == 0:  # Stage
     
    4950sww2dem(name, basename_out = outname,
    5051            quantity = quantityname,
    51             cellsize = 1000,       # Trevor would like this at 25
     52            cellsize = 20,       # Trevor would like this at 25
    5253            # define region for viz purposes
    5354            easting_min = project.e_min_area,
  • production/onslow_2006/get_timeseries.py

    r2700 r2773  
    1212 
    1313
    14 time_dir = "20060410_054158_elevation_6_side_15000"
     14time_dir = "20060419_071046"
    1515directory = project.outputdir
    1616swwfile = directory + time_dir +sep + "source.sww"
    1717'''
    1818directory = project.boundarydir
    19 swwfile = directory + "SU-AU_high_res.sww"
     19swwfile = directory + "SU-AU_clip.sww"
    2020'''
    2121#swwfile = project.outputname + '.sww'
     
    207207    # raw_input('Next')
    208208
    209     whichone = '_%s' %myloc
     209    whichone = 'Onslow_%s' %myloc
    210210#    thisfile = project.gaugetimeseries+whichone+'.csv'
    211     thisfile = directory + time_dir +sep +whichone+'.csv'
     211#    thisfile = directory + time_dir + sep +whichone+'.csv'
     212    thisfile = directory  +whichone+'.csv'
     213   
    212214    fid = open(thisfile, 'w')
    213215    s = 'Time, Depth, Momentum, Velocity \n'
  • production/onslow_2006/project.py

    r2721 r2773  
    5353print'bound', boundarydir
    5454
    55 gauge_filename = gaugedir + 'onslow_gauges.xya'
     55#gauge_filename = gaugedir + 'onslow_gauges.xya'
     56#for MOST
     57gauge_filename = gaugedir + 'onslow_gauges1.xya'
     58
    5659
    5760gaugetimeseries = gaugedir + 'onslow'
     
    8891northingmax = 7700000
    8992
    90 south = degminsec2decimal_degrees(-21,55,0)
     93south = degminsec2decimal_degrees(-22,15,0)
    9194north = degminsec2decimal_degrees(-20,30,0)
    92 west = degminsec2decimal_degrees(114,25,0)
     95west = degminsec2decimal_degrees(114,15,0)
    9396east = degminsec2decimal_degrees(115,50,0)
    9497'''
     
    101104# region to export
    102105
    103 e_min_area = 280000
     106e_min_area = 300000
    104107e_max_area = 310000
    105 n_min_area = 7590000
    106 n_max_area = 7630000
     108n_min_area = 7600000
     109n_max_area = 7610000
    107110
    108111#Georeferencing
     
    112115
    113116#Updated Main Domain of Onslow: first run NB 6/4/06
    114 '''
    115117d0 = [310000, 7690000]
    116118d1 = [280000, 7690000]
     
    122124
    123125polyAll = [d0, d1, d2, d3, d4, d5, d6]
    124 '''
    125 d0 = [310000, 7630000]
    126 d1 = [280000, 7630000]
    127 d2 = [280000, 7590000]
    128 d3 = [310000, 7590000]
    129126
    130 polyAll = [d0, d1, d2, d3]
    131 '''
    132127#Interior region - Onslow town
    133128
    134 i0 = [304000, 7608000]
     129#i0 = [304000, 7608000]
     130i0 = [304000, 7607000]
    135131i1 = [302000, 7605000]
    136 i2 = [303000, 7602000]
    137 i3 = [305000, 7601000]
     132#i2 = [303000, 7602000]
     133i2 = [304000, 7603000]
     134#i3 = [305000, 7601000]
     135i3 = [307000, 7602000]
    138136i4 = [309000, 7603000]
    139 i5 = [307000, 7606500]
     137#i5 = [307000, 7606500]
     138i5 = [307000, 7606000]
    140139
    141140poly_onslow = [i0, i1, i2, i3, i4, i5]
     
    149148poly_thevenard = [j0, j1, j2, j3]
    150149
     150'''
    151151# Direction Is
    152152k0 = [309000, 7619000]
     
    157157poly_direction = [k0, k1, k2, k3]
    158158'''
     159
     160#med res around onslow
     161l0 = [300000, 7610000]
     162l1 = [285000, 7600000]
     163l2 = [300000, 7597500]
     164l3 = [310000, 7600000]
     165l4 = [315000, 7610000]
     166#l5 = [310000, 7612500]
     167
     168#poly_coast = [l0, l1, l2, l3, l4, l5]
     169poly_coast = [l0, l1, l2, l3, l4]
     170
     171#general coast and local area to onslow region
     172m0 = [270000, 7581000]
     173m1 = [300000, 7591000]
     174m2 = [339000, 7610000]
     175m3 = [330000, 7630000]
     176m4 = [290000, 7640000]
     177m5 = [260000, 7600000]
     178
     179poly_region = [m0, m1, m2, m3, m4, m5]
  • production/onslow_2006/run_onslow.py

    r2707 r2773  
    6666#normal screen output is stored in
    6767screen_output_name = project.outputtimedir + "screen_output.txt"
     68screen_error_name = project.outputtimedir + "screen_error.txt"
    6869
    6970#used to catch screen output to file
    7071sys.stdout = Screen_Catcher(screen_output_name)
    71 sys.stderr = Screen_Catcher(screen_output_name)
     72#sys.stderr = Screen_Catcher(screen_output_name)
     73sys.stderr = Screen_Catcher(screen_error_name)
    7274
    7375'''
     
    8688#    print' most file', project.MOST_dir + project.boundary_basename
    8789
    88 
     90'''
    8991# fine data (clipping the points file to smaller area)
    9092# creates DEM from asc data
     
    111113print'export G'
    112114G.export_points_file(project.combined_dem_name + '.pts')
    113 
     115'''
    114116
    115117#-------------------------------------------------------------------------------                                 
     
    120122
    121123from pmesh.mesh_interface import create_mesh_from_regions
    122 
     124'''
    123125# original
    124 #interior_res = 1000
    125 #interior_regions = [[project.poly_onslow, interior_res],
    126 #                    [project.poly_thevenard, interior_res]]
    127 
    128 print 'number of interior regions'#, len(interior_regions)
     126interior_res = 5000
     127high_res = 1500
     128interior_regions = [[project.poly_onslow, high_res],
     129                    [project.poly_thevenard, interior_res],
     130                    [project.poly_coast, interior_res]]
     131'''
     132#new
     133region_res = 25000
     134coast_res = 2500
     135onslow_res = 500
     136interior_regions = [[project.poly_onslow, onslow_res],
     137                    [project.poly_coast, coast_res],
     138                    [project.poly_region, region_res]]
     139
     140print 'number of interior regions', len(interior_regions)
    129141
    130142from caching import cache
     
    135147                             'bottom': [4], 'bottomright': [5],
    136148                             'topright':[6]},
    137            'maximum_triangle_area': 500,
    138            'filename': meshname},           
    139 #           'interior_regions': interior_regions},
    140            verbose = True)
     149           'maximum_triangle_area': 100000,
     150           'filename': meshname,           
     151           'interior_regions': interior_regions},
     152          verbose = True)
    141153
    142154
     
    155167domain.set_name(project.basename)
    156168domain.set_datadir(project.outputtimedir)
    157 domain.set_quantities_to_be_stored(['stage'])
    158 
     169domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum'])
    159170
    160171#-------------------------------------------------------------------------------
     
    191202                    use_cache = True,
    192203                    verbose = True,
    193                     alpha = 0.0
     204                    alpha = 0.1
    194205                    )
    195206
     
    255266t0 = time.time()
    256267
    257 for t in domain.evolve(yieldstep = 10, finaltime = 10):
    258     domain.write_time()
    259     domain.write_boundary_statistics(tags = 'top')     
    260 '''
    261 for t in domain.evolve(yieldstep = 120, finaltime = 31000):
    262                        ,skip_initial_step = True):
    263     domain.write_time()
    264     domain.write_boundary_statistics(tags = 'top')     
    265 ''' 
     268for t in domain.evolve(yieldstep = 240, finaltime = 7201):
     269    domain.write_time()
     270    domain.write_boundary_statistics(tags = 'top')     
     271
     272for t in domain.evolve(yieldstep = 120, finaltime = 12601
     273                       ,skip_initial_step = True):
     274    domain.write_time()
     275    domain.write_boundary_statistics(tags = 'top')     
     276
     277for t in domain.evolve(yieldstep = 60, finaltime = 19801
     278                       ,skip_initial_step = True):
     279    domain.write_time()
     280    domain.write_boundary_statistics(tags = 'top')     
     281   
     282for t in domain.evolve(yieldstep = 120, finaltime = 25201
     283                       ,skip_initial_step = True):
     284    domain.write_time()
     285    domain.write_boundary_statistics(tags = 'top')     
     286
     287for t in domain.evolve(yieldstep = 240, finaltime = 36001
     288                       ,skip_initial_step = True):
     289    domain.write_time()
     290    domain.write_boundary_statistics(tags = 'top')     
     291 
    266292print 'That took %.2f seconds' %(time.time()-t0)
    267293
Note: See TracChangeset for help on using the changeset viewer.