Changeset 6064
- Timestamp:
- Dec 11, 2008, 4:10:54 PM (16 years ago)
- Location:
- anuga_work/production/carnarvon
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/carnarvon/build_carnarvon.py
r6024 r6064 103 103 G_off = G_off1 + G_off2 104 104 105 print 'clipping data to coast' 106 G_ocean = G_off.clip(project.poly_ocean, verbose=True) #mainland 107 G_ocean_b = G_ocean.clip_outside(project.poly_island1, verbose=True) #bernier 108 G_ocean_bd = G_ocean_b.clip_outside(project.poly_island2, verbose=True) #dorne 109 110 G1_clip_m = G1.clip(project.poly_mainland, verbose=True) 111 G1_clip_b = G1.clip(project.poly_island1, verbose=True) 112 G1_clip_d = G1.clip(project.poly_island2, verbose=True) 105 ##print 'clipping data to coast' 106 ##G_ocean = G_off.clip(project.poly_ocean, verbose=True) #mainland 107 ##G_ocean_b = G_ocean.clip_outside(project.poly_island1, verbose=True) #bernier 108 ##G_ocean_bd = G_ocean_b.clip_outside(project.poly_island2, verbose=True) #dorne 109 ## 110 ##G1_clip_m = G1.clip(project.poly_mainland, verbose=True) 111 ##G1_clip_b = G1.clip(project.poly_island1, verbose=True) 112 ##G1_clip_d = G1.clip(project.poly_island2, verbose=True) 113 ##G1_clip = G1_clip_m + G1_clip_b + G1_clip_d 113 114 114 115 print'add all geospatial objects' 115 G_aos = G1 _clip_m+ G1_clip_b+G1_clip_d+ G_coast + G_ocean_bd116 G_aos = G1 + G_off 116 117 G_aosclip = G_aos.clip_outside(project.poly_aos_extract, verbose=True) 117 118 G_aoi = G_aosclip.clip_outside(project.poly_aoi1, verbose=True) 118 G = G_aoi +G offaoi+Goffaos119 G = G_aoi +G_offaoi+G_offaos 119 120 120 121 print'export combined DEM file' -
anuga_work/production/carnarvon/export_results_max.py
r5996 r6064 13 13 import project, os 14 14 import sys 15 from anuga.lib.maxasc.maxasc import MaxAsc 15 16 from anuga.shallow_water.data_manager import convert_dem_from_ascii2netcdf, dem2pts 16 17 from anuga.shallow_water.data_manager import sww2dem 17 18 from os import sep 18 import maxasc19 19 20 20 directory = project.output_dir 21 21 22 time_dir1 = '20081110_105300_run_final_0_27283_alpha0.1_kvanputt'23 time_dir2 = '20081002_111207_run_final_0_27283_250m_all_kvanputt'24 time_dir3 = '20081002_111053_run_final_0_27283_250m_none_kvanputt' 22 ##time_dir1 = '20081209_155247_run_final_0_27255_250m_none_lfountai' 23 ##time_dir2 = '20081209_161626_run_final_0_68693_250m_none_lfountai' 24 ##time_dirs = [time_dir1, time_dir2] 25 25 26 time_dirs = [time_dir1, time_dir2, time_dir3] 26 ##time_dir1 = '20081202_084220_run_final_1_27283_alpha0.1_kvanputt' 27 ##time_dir2 = '20081202_084202_run_final_1_27255_alpha0.1_kvanputt' 28 ##time_dir3 = '20081202_084132_run_final_1_68693_alpha0.1_kvanputt' 29 time_dir4 = '20081202_084025_run_final_0_68693_alpha0.1_kvanputt' 30 time_dir5 = '20081202_083932_run_final_0_27255_alpha0.1_kvanputt' 31 ##time_dir6 = '20081201_103449_run_final_0_27283_alpha0.1_kvanputt' 32 33 time_dirs = [time_dir4, time_dir5] #, time_dir3, time_dir4, time_dir5, time_dir6] 34 27 35 28 36 #cellsize = 20 … … 36 44 ###### 37 45 38 #area = [' Geordie', 'Sorrento', 'Fremantle', 'Rockingham'] # strings must match keys in var_equations below46 #area = ['CBD'] # strings must match keys in var_equations below 39 47 area = ['All'] # 'All' means no special areas - the whole thing 40 48 … … 50 58 51 59 # one or more key strings from var_equations above 52 var = ['stage' , 'elevation']60 var = ['stage'] 53 61 54 62 ###### 55 63 # Start running the various conversions we require. 56 64 ###### 65 57 66 for which_var in var: 58 67 if which_var not in var_equations: … … 60 69 break 61 70 62 asc_name = [] 71 for which_area in area: 72 if which_area == 'All': 73 easting_min = None 74 easting_max = None 75 northing_min = None 76 northing_max = None 77 else: 78 try: 79 easting_min = eval('project.xmin%s' % which_area) 80 easting_max = eval('project.xmax%s' % which_area) 81 northing_min = eval('project.ymin%s' % which_area) 82 northing_max = eval('project.ymax%s' % which_area) 83 except AttributeError: 84 print 'Unrecognized area name: %s' % which_area 85 break 63 86 64 for time_dir in time_dirs:65 if time_dir == '20081002_111053_run_final_0_27283_250m_none_kvanputt': 87 for time_dir in time_dirs: 88 66 89 name1 = directory+time_dir+sep+project.scenario_name 67 name2 = directory+time_dir+sep+project.scenario_name+'_time_77160_0' 68 names = [name1, name2] 69 else: 70 name1 = directory+time_dir+sep+project.scenario_name 71 name2 = directory+time_dir+sep+project.scenario_name+'_time_39540_0' 72 name3 = directory+time_dir+sep+project.scenario_name+'_time_79080_0' 73 names = [name1, name2, name3] 74 75 for name in names: 76 for which_area in area: 77 if which_area == 'All': 78 easting_min = None 79 easting_max = None 80 northing_min = None 81 northing_max = None 82 else: 83 try: 84 easting_min = eval('project.xmin%s' % which_area) 85 easting_max = eval('project.xmax%s' % which_area) 86 northing_min = eval('project.ymin%s' % which_area) 87 northing_max = eval('project.ymax%s' % which_area) 88 except AttributeError: 89 print 'Unrecognized area name: %s' % which_area 90 break 91 90 ## name2 = directory+time_dir+sep+project.scenario_name+'_time_77160_0' 91 92 name2 = directory+time_dir+sep+project.scenario_name+'_time_39300_0' 93 name3 = directory+time_dir+sep+project.scenario_name+'_time_78600_0' 94 95 names = [name1, name2, name3] 96 97 asc_name = [] 98 99 for name in names: 100 92 101 outname = name + '_' + which_area + '_' + which_var 93 102 quantityname = var_equations[which_var] … … 109 118 asc_name.append(outname + '.asc') 110 119 111 maxasc_outname = directory+time_dir+sep+project.scenario_name+'_'+which_area+'_'+which_var+'_max.asc'120 maxasc_outname = directory+time_dir+sep+project.scenario_name+'_'+which_area+'_'+which_var+'_max.asc' 112 121 113 maxasc.MaxAsc(maxasc_outname, asc_name) 114 115 122 print 'max asc outname ', maxasc_outname 123 print 'asc_name ', str(asc_name) 124 125 MaxAsc(maxasc_outname, asc_name) -
anuga_work/production/carnarvon/project.py
r6021 r6064 43 43 # Model specific parameters. One or all can be changed each time the 44 44 # run_scenario script is executed 45 tide = 0 #0.645 tide = 1 #1.0 46 46 #event_number = 27255 # Java 9.3 worst case for Perth 47 47 #event_number = 68693 # Sumatra 9.2 … … 96 96 gauge_name = 'carnarvon.csv' 97 97 gauge_name2 = 'thinned_MGA50.csv' 98 #buildings - used in run_building_inundation.py 99 building = 'carnarvon_res' 98 100 99 101 # BOUNDING POLYGON - used in build_boundary.py and run_carnarvon.py respectively … … 110 112 # Output filename for elevation 111 113 # this is a combination of all the data (utilisied in build_boundary) 112 combined_name ='carnarvon_combined_elevation '114 combined_name ='carnarvon_combined_elevation_quick' 113 115 combined_smaller_name = 'carnarvon_combined_elevation_smaller' 114 116 … … 168 170 gauges_dir_name = gauges_dir + gauge_name #used for get_timeseries.py 169 171 gauges_dir_name2 = gauges_dir + gauge_name2 #used for get_timeseries.py 170 172 building_in_dir_name = gauges_dir + building + '.csv' 171 173 #------------------------------------------------------------------------------ 172 174 # Interior region definitions … … 215 217 216 218 # carnarvon CBD extract ascii grid 217 ##xminCBD = 218 ##xmaxCBD = 219 ##yminCBD = 220 ##ymaxCBD = 219 xminCBD = 763000 220 xmaxCBD = 775000 221 yminCBD = 7239000 222 ymaxCBD = 7251000
Note: See TracChangeset
for help on using the changeset viewer.