Changeset 3261


Ignore:
Timestamp:
Jun 30, 2006, 12:34:20 PM (18 years ago)
Author:
sexton
Message:

updates to Onslow script to include WA DLI data and to use coastline points

Location:
production/onslow_2006
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • production/onslow_2006/export_results.py

    r2956 r3261  
    77from os import sep
    88
    9 time_dir = "20060426_004129"
     9time_dir = "20060629_085137"
    1010directory = project.outputdir
    1111name = directory + time_dir +sep + "source"
     
    2222#print 'Which variable do you want to export?'
    2323#which_var = int(raw_input('Stage = 0, Absolute Momentum = 1, Depth = 2, Speed = 3  '  ))
    24 which_var = 2
     24which_var = 4
    2525#sys.stderr.write(sys.stdout.data)
    2626if which_var == 0:  # Stage
  • production/onslow_2006/project.py

    r3249 r3261  
    2121
    2222# 30m data to be provided
    23 onshore_name = 'onslow_onshore_30m_dted' # get from Neil/Ingo (DEM or topo data)
    24 
     23onshore_name_dted = 'onslow_onshore_30m_dted2' # get from Neil/Ingo (DEM or topo data)
     24
     25# 20m data to be provided
     26onshore_name_dli = 'onslow_onshore_20m_dli' # get from Neil/Ingo (DEM or topo data)
     27
     28coast_name = 'onslow_coast'
     29islands_name = 'onslow_islands_dted2'
    2530offshore_name = 'onslow_offshore_points'
    2631
     
    9297coarsedemname = datadir + coarsename
    9398
    94 onshore_dem_name = datadir + onshore_name
     99onshore_dem_name = datadir + onshore_name_dli
    95100
    96101offshore_dem_name = datadir + offshore_name
    97 
     102coast_dem_name = datadir + coast_name
     103islands_dem_name = datadir + islands_name
    98104combined_dem_name = datadir + 'onslow_combined_elevation'
    99105
  • production/onslow_2006/run_onslow.py

    r3249 r3261  
    5050
    5151onshore_dem_name = project.onshore_dem_name
    52 
     52islands_dem_name = project.islands_dem_name
     53coast_points = project.coast_dem_name
    5354offshore_points = project.offshore_dem_name
    5455
     
    7374sys.stderr = Screen_Catcher(screen_error_name)
    7475
    75 '''
     76
    7677copied_files = False
    7778
    7879# files to be used
    79 files_used = [onshore_dem_name, offshore_points,]
     80files_used = [onshore_dem_name, offshore_points, coast_points,]
    8081
    8182if sys.platform != 'win32':   
     
    9394convert_dem_from_ascii2netcdf(onshore_dem_name, use_cache=True, verbose=True)
    9495
    95 #creates pts file from DEM
     96#creates pts file for onshore DEM
    9697dem2pts(onshore_dem_name,
    9798        easting_min=project.eastingmin,
     
    102103        verbose=True)
    103104
     105convert_dem_from_ascii2netcdf(islands_dem_name, use_cache=True, verbose=True)
     106
     107#creates pts file for islands DEM
     108dem2pts(islands_dem_name, use_cache=True, verbose=True)
     109
    104110print'create G1'
    105111G1 = Geospatial_data(file_name = project.offshore_dem_name + '.xya')
     
    108114G2 = Geospatial_data(file_name = project.onshore_dem_name + '.pts')
    109115
    110 print'add G1+G2'
    111 G = G1 + G2
     116print'create G3'
     117G3 = Geospatial_data(file_name = project.coast_dem_name + '.xya')
     118
     119print'create G4'
     120G4 = Geospatial_data(file_name = project.islands_dem_name + '.pts')
     121
     122print'add G1+G2+G3+G4'
     123G = G1 + G2 + G3 + G4
    112124
    113125print'export G'
    114126G.export_points_file(project.combined_dem_name + '.pts')
    115 '''
     127
    116128
    117129#-------------------------------------------------------------------------------                                 
     
    131143'''
    132144#new
    133 region_res = 25000
     145region_res = 50000
    134146coast_res = 25000
    135147onslow_res = 500
    136148interior_regions = [[project.poly_onslow, onslow_res],
    137                     [project.poly_coast, coast_res]]#,
    138 #                    [project.poly_region, region_res]]
     149                    [project.poly_coast, coast_res],
     150                    [project.poly_region, region_res]]
    139151
    140152print 'number of interior regions', len(interior_regions)
     
    147159                             'bottom': [4], 'bottomright': [5],
    148160                             'topright':[6]},
    149            'maximum_triangle_area': 100000,
     161           'maximum_triangle_area': 250000,
    150162           'filename': meshname,           
    151163           'interior_regions': interior_regions},
     
    270282    domain.write_boundary_statistics(tags = 'top')     
    271283
    272 for t in domain.evolve(yieldstep = 60, finaltime = 17760
     284for t in domain.evolve(yieldstep = 1, finaltime = 17760
    273285                       ,skip_initial_step = True):
    274286    domain.write_time()
Note: See TracChangeset for help on using the changeset viewer.