Changeset 4290


Ignore:
Timestamp:
Mar 2, 2007, 2:06:16 PM (18 years ago)
Author:
nick
Message:

update to broome

Location:
anuga_work/production/broome_2006
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/broome_2006/build_broome.py

    r4153 r4290  
    5151# Fine pts file to be clipped to area of interest
    5252#-------------------------------------------------------------------------------
    53 print"project.bounding_polygon",project.bounding_polygon
    5453print"project.combined_dir_name",project.combined_dir_name
    5554
     
    5756onshore_in_dir_name = project.onshore_in_dir_name
    5857coast_in_dir_name = project.coast_in_dir_name
    59 island_in_dir_name = project.island_in_dir_name
    60 island_in_dir_name1 = project.island_in_dir_name1
    61 island_in_dir_name2 = project.island_in_dir_name2
    62 island_in_dir_name3 = project.island_in_dir_name3
     58#island_in_dir_name = project.island_in_dir_name
    6359offshore_in_dir_name = project.offshore_in_dir_name
    64 offshore1_in_dir_name = project.offshore1_in_dir_name
     60offshore_in_dir_name1 = project.offshore_in_dir_name1
     61offshore_in_dir_name2 = project.offshore_in_dir_name2
    6562
    6663onshore_dir_name = project.onshore_dir_name
    6764coast_dir_name = project.coast_dir_name
    68 island_dir_name = project.island_dir_name
    69 island_dir_name1 = project.island_dir_name1
    70 island_dir_name2 = project.island_dir_name2
    71 island_dir_name3 = project.island_dir_name3
     65#island_dir_name = project.island_dir_name
    7266offshore_dir_name = project.offshore_dir_name
     67offshore_dir_name1 = project.offshore_dir_name1
     68offshore_dir_name2 = project.offshore_dir_name2
    7369
    7470# creates DEM from asc data
    7571print "creates DEMs from asc data"
    7672convert_dem_from_ascii2netcdf(onshore_in_dir_name, basename_out=onshore_dir_name, use_cache=True, verbose=True)
    77 convert_dem_from_ascii2netcdf(island_in_dir_name, basename_out=island_dir_name, use_cache=True, verbose=True)
    78 convert_dem_from_ascii2netcdf(island_in_dir_name1, basename_out=island_dir_name1, use_cache=True, verbose=True)
    79 convert_dem_from_ascii2netcdf(island_in_dir_name2, basename_out=island_dir_name2, use_cache=True, verbose=True)
    80 convert_dem_from_ascii2netcdf(island_in_dir_name3, basename_out=island_dir_name3, use_cache=True, verbose=True)
     73convert_dem_from_ascii2netcdf(offshore_in_dir_name1, basename_out=offshore_dir_name1, use_cache=True, verbose=True)
     74convert_dem_from_ascii2netcdf(offshore_in_dir_name2, basename_out=offshore_dir_name2, use_cache=True, verbose=True)
    8175
    8276#creates pts file for onshore DEM
     
    8781
    8882#creates pts file for island DEM
    89 dem2pts(island_dir_name, use_cache=True, verbose=True)
    90 dem2pts(island_dir_name1, use_cache=True, verbose=True)
    91 dem2pts(island_dir_name2, use_cache=True, verbose=True)
    92 dem2pts(island_dir_name3, use_cache=True, verbose=True)
     83dem2pts(offshore_in_dir_name1, use_cache=True, verbose=True)
     84dem2pts(offshore_in_dir_name2, use_cache=True, verbose=True)
    9385
    9486print'create Geospatial data1 objects from topographies'
    9587G1 = Geospatial_data(file_name = onshore_dir_name + '.pts')
    96 print'create Geospatial data2 objects from topographies'
    97 G2 = Geospatial_data(file_name = coast_in_dir_name + '.xya')
    98 print'create Geospatial data3 objects from topographies'
    99 G3 = Geospatial_data(file_name = island_dir_name + '.pts')
    100 print'create Geospatial data4 objects from topographies'
    101 G4 = Geospatial_data(file_name = island_dir_name1 + '.pts')
    102 print'create Geospatial data5 objects from topographies'
    103 G5 = Geospatial_data(file_name = island_dir_name2 + '.pts')
    104 print'create Geospatial data6 objects from topographies'
    105 G6 = Geospatial_data(file_name = island_dir_name3 + '.pts')
    106 print'create Geospatial data7 objects from topographies'
    107 G_off = Geospatial_data(file_name = offshore_in_dir_name + '.xya')
    108 print'create Geospatial data8 objects from topographies'
    109 G_off1 = Geospatial_data(file_name = offshore1_in_dir_name + '.xya')
     88print'create Geospatial data2 objects from coast'
     89G2 = Geospatial_data(file_name = coast_in_dir_name + '.txt')
     90#print'create Geospatial data3 objects from island'
     91#G3 = Geospatial_data(file_name = island_dir_name + '.pts')
     92print'create Geospatial data3 objects from offshore'
     93G_off = Geospatial_data(file_name = offshore_in_dir_name + '.txt')
     94print'create Geospatial data4 objects from offshore1'
     95G_off1 = Geospatial_data(file_name = offshore_in_dir_name1 + '.pts')
     96print'create Geospatial data4 objects from offshore2'
     97G_off2 = Geospatial_data(file_name = offshore_in_dir_name2 + '.pts')
    11098
    11199print'add all geospatial objects'
    112 G = G1 + G2 + G3 + G4 + G5 + G6 + G_off + G_off1
     100G = G1 + G2 + G_off + G_off1 + G_off2
    113101
    114102print'clip combined geospatial object by bounding polygon'
     
    117105#print'shape of clipped data', G_clipped.get_data_points().shape
    118106
     107print'split'
     108G_main, G_small = G_clipped.split(.10)
     109
    119110print'export combined DEM file'
    120111if access(project.topographies_dir,F_OK) == 0:
    121112    mkdir (project.topographies_dir)
    122113G_clipped.export_points_file(project.combined_dir_name + '.txt')
     114G_small.export_points_file(project.combined_small_dir_name + '.txt')
    123115#G_clipped.export_points_file(project.combined_dir_name + '.xya')
     116
    124117
    125118'''
  • anuga_work/production/broome_2006/project.py

    r4228 r4290  
    3636
    3737# onshore data provided by WA DLI
    38 onshore_name = 'dted2_z51' # original
     38onshore_name = 'Broome_topography_DLI' # original
    3939
    4040#island
     
    4242
    4343# offshore
    44 coast_name = 'coastline'
    45 offshore_name1 = 'XY100011610'
    46 offshore_name2 = 'XY100011611'
    47 offshore_name3 = 'XY100011613'
    48 offshore_name4 = 'XY100011614'
    49 offshore_name5 = 'XY100011616'
    50 offshore_name6 = 'XY100011617'
    51 offshore_name7 = 'XY100011618'
    52 offshore_name8 = 'XY100011621'
    53 offshore_name9 = 'XY100011623'
    54 offshore_name10 = 'XY100011745'
    55 offshore_name11 = 'XY100011746'
    56 offshore_name12 = 'XY100017530'
    57 offshore_name13 = 'XY100017532'
    58 offshore_name14 = 'XY100017538'
    59 offshore_name15 = 'XY100017540'
    60 offshore_name16 = 'XYBR66'
    61 offshore_name17 = 'XYBR70'
    62 offshore_name18 = 'XYBR80'
    63 offshore_name19 = 'XYBR88'
    64 offshore_name20 = 'XYBR93'
    65 offshore_name21 = 'XYBR0110'
    66 offshore_name22 = 'XYWADPI'
     44coast_name = 'Broome_coastline'
     45
     46offshore_name = 'Broome_Bathymetry'
     47offshore_name1 = 'inferred_north'
     48offshore_name2 = 'inferred_south'
    6749
    6850#final topo name
    69 combined_name ='perth_combined_elevation'
    70 combined_smaller_name = 'perth_combined_elevation_smaller'
     51combined_name ='broome_combined_elevation'
     52combined_small_name = 'broome_combined_elevation_small'
    7153
    72 
    73 topographies_in_dir = home+sep+state+sep+scenario+sep+'elevation_final'+sep+'points'+sep
     54topographies_in_dir = home+sep+state+sep+scenario+sep+'elevation_final'+sep+'points'+sep+'Feb07'+sep
    7455topographies_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'topographies'+sep
    7556topographies_time_dir = topographies_dir+build_time+sep
     
    7758#input topo file location
    7859onshore_in_dir_name = topographies_in_dir + onshore_name
    79 island_in_dir_name = topographies_in_dir + island_name
    80 island_in_dir_name1 = topographies_in_dir + island_name1
    81 island_in_dir_name2 = topographies_in_dir + island_name2
    82 island_in_dir_name3 = topographies_in_dir + island_name3
     60#island_in_dir_name = topographies_in_dir + island_name
    8361
    8462coast_in_dir_name = topographies_in_dir + coast_name
     63
    8564offshore_in_dir_name = topographies_in_dir + offshore_name
    86 offshore1_in_dir_name = topographies_in_dir + offshore1_name
     65offshore_in_dir_name1 = topographies_in_dir + offshore_name1
     66offshore_in_dir_name2 = topographies_in_dir + offshore_name2
    8767
    8868onshore_dir_name = topographies_dir + onshore_name
    89 island_dir_name = topographies_dir + island_name
    90 island_dir_name1 = topographies_dir + island_name1
    91 island_dir_name2 = topographies_dir + island_name2
    92 island_dir_name3 = topographies_dir + island_name3
     69
     70#island_dir_name = topographies_dir + island_name
    9371
    9472coast_dir_name = topographies_dir + coast_name
     73
    9574offshore_dir_name = topographies_dir + offshore_name
     75offshore_dir_name1 = topographies_dir + offshore_name1
     76offshore_dir_name2 = topographies_dir + offshore_name2
    9677
    9778#final topo files
    9879combined_dir_name = topographies_dir + combined_name
    99 combined_time_dir_name = topographies_time_dir + combined_name
    100 combined_smaller_name_dir = topographies_dir + combined_smaller_name
    101 #combined_time_dir_final_name = topographies_time_dir + combined_final_name
     80combined_small_name_dir = topographies_dir + combined_small_name
    10281
    10382meshes_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'meshes'+sep
     
    140119
    141120poly_all = read_polygon(polygons_dir+'extent.csv')
    142 res_poly_all = 100000
     121res_poly_all = 500000
    143122
    144123###############################
     
    146125###############################
    147126
    148 poly_1 = read_polygon(polygons_dir+'Broome_Local_Polygon_update.csv')
    149 res_1 = 20000
     127poly_1 = read_polygon(polygons_dir+'broome_north_coast.csv')
     128res_1 = 50000
    150129
    151 poly_2 = read_polygon(polygons_dir+'Broome_Close2_update.csv')
    152 res_2 = 1000
     130poly_2 = read_polygon(polygons_dir+'broome_south_coast.csv')
     131res_2 = 50000
    153132
    154 poly_3 = read_polygon(polygons_dir+'Broome_Coast_update2.csv')
    155 res_3 = 1000
     133poly_3 = read_polygon(polygons_dir+'Broome_town_pts.csv')
     134res_3 = 10000
     135
     136poly_4 = read_polygon(polygons_dir+'Broome_inner_town_pts.csv')
     137res_4 = 1000
    156138#assert zone == refzone
    157139
    158140interior_regions = [[poly_1,res_1],[poly_2,res_2]
    159                      ,[poly_3,res_3]]
     141                     ,[poly_3,res_3],[poly_4,res_4]]
    160142
    161143trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all)
Note: See TracChangeset for help on using the changeset viewer.