Changeset 5952
- Timestamp:
- Nov 12, 2008, 3:35:44 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/perth/export_results_max.py
r5926 r5952 20 20 directory = project.output_dir 21 21 22 time_dir1 = '20081031_133841_run_final_0_27283_alpha0.1_kvanputt'22 #time_dir1 = '20081031_133841_run_final_0_27283_alpha0.1_kvanputt' 23 23 #time_dir1 = '20080924_123626_run_final_0_27283_250m_all_kvanputt' # This uses the 250m bathymetry with all interior polygons 24 24 #time_dir2 = '20080912_154716_run_final_0_27283_alpha0.1_kvanputt' # This uses original bathyemetry data 25 25 #time_dir3 = '20080924_123601_run_final_0_27283_250m_none_kvanputt' # This uses the 250m bathymetry without any interior polygons 26 time_dirs = [time_dir1] #, time_dir2]#, time_dir3]26 #time_dirs = [time_dir1] #, time_dir2]#, time_dir3] 27 27 28 #cellsize = 20 29 cellsize = 250 28 time_dir1 = '20081031_133353_run_final_0.6_68693_alpha0.1_kvanputt' 29 time_dir2 = '20081031_133511_run_final_0_68693_alpha0.1_kvanputt' 30 time_dir3 = '20081031_133624_run_final_0_27255_alpha0.1_kvanputt' 31 time_dir4 = '20081031_133735_run_final_0.6_27255_alpha0.1_kvanputt' 32 time_dir5 = '20081031_133841_run_final_0_27283_alpha0.1_kvanputt' 33 time_dir6 = '20081031_133925_run_final_0.6_27283_alpha0.1_kvanputt' 34 35 time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6] 36 37 38 39 cellsize = 20 40 #cellsize = 250 30 41 31 42 timestep = None # None means no timestep! … … 36 47 ###### 37 48 38 #area = ['Geordie', 'Sorrento', 'Fremantle', 'Rockingham'] # strings must match keys in var_equations below39 area = ['All'] # 'All' means no special areas - the whole thing49 area = ['Rockingham', 'Sorrento', 'Fremantle','Geordie' ] # strings must match keys in var_equations below 50 #area = ['All'] # 'All' means no special areas - the whole thing 40 51 41 52 ###### … … 50 61 51 62 # one or more key strings from var_equations above 52 var = [' stage', 'elevation']63 var = ['depth', 'speed'] 53 64 54 65 ###### 55 66 # Start running the various conversions we require. 56 67 ###### 68 57 69 for which_var in var: 58 70 if which_var not in var_equations: … … 60 72 break 61 73 62 asc_name = [] 74 for which_area in area: 75 if which_area == 'All': 76 easting_min = None 77 easting_max = None 78 northing_min = None 79 northing_max = None 80 else: 81 try: 82 easting_min = eval('project.xmin%s' % which_area) 83 easting_max = eval('project.xmax%s' % which_area) 84 northing_min = eval('project.ymin%s' % which_area) 85 northing_max = eval('project.ymax%s' % which_area) 86 except AttributeError: 87 print 'Unrecognized area name: %s' % which_area 88 break 63 89 64 for time_dir in time_dirs: 65 name1 = directory+time_dir+sep+project.scenario_name 66 name2 = directory+time_dir+sep+project.scenario_name+'_time_39900_0' 67 name3 = directory+time_dir+sep+project.scenario_name+'_time_79800_0' 68 names = [name1, name2, name3] 69 70 for name in names: 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 86 90 for time_dir in time_dirs: 91 92 name1 = directory+time_dir+sep+project.scenario_name 93 name2 = directory+time_dir+sep+project.scenario_name+'_time_39900_0' 94 name3 = directory+time_dir+sep+project.scenario_name+'_time_79800_0' 95 96 names = [name1, name2, name3] 97 98 asc_name = [] 99 100 for name in names: 101 87 102 outname = name + '_' + which_area + '_' + which_var 88 103 quantityname = var_equations[which_var] … … 104 119 asc_name.append(outname + '.asc') 105 120 106 maxasc_outname = directory+time_dir+sep+project.scenario_name+'_'+which_area+'_'+which_var+'_max.asc'121 maxasc_outname = directory+time_dir+sep+project.scenario_name+'_'+which_area+'_'+which_var+'_max.asc' 107 122 108 maxasc.MaxAsc(maxasc_outname, asc_name) 123 print 'max asc outname ', maxasc_outname 124 print 'asc_name ', str(asc_name) 125 126 maxasc.MaxAsc(maxasc_outname, asc_name)
Note: See TracChangeset
for help on using the changeset viewer.