Changeset 5987 for anuga_work/production/geraldton/export_results_max.py
- Timestamp:
- Nov 20, 2008, 1:46:04 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/geraldton/export_results_max.py
r5941 r5987 20 20 directory = project.output_dir 21 21 22 time_dir1 = '20081102_104418_run_final_0_27283_alpha0.1_kvanputt' 23 time_dir2 = '20081002_110950_run_final_0_27283_250m_all_kvanputt' 22 time_dir1 = '20081117_141443_run_final_0.6_27283_alpha0.1_kvanputt' 23 ##time_dir2 = '20081114_155508_run_final_0.6_27283_alpha0.1_kvanputt' Perth 24 ##time_dir3 = '20081114_155610_run_final_0.6_27255_alpha0.1_kvanputt' 25 ##time_dir4 = '20081114_155642_run_final_0_27255_alpha0.1_kvanputt' 26 ##time_dir5 = '20081114_155725_run_final_0_68693_alpha0.1_kvanputt' 27 ##time_dir6 = '20081114_155802_run_final_0.6_68693_alpha0.1_kvanputt' 24 28 25 time_dirs = [time_dir1 , time_dir2]#, time_dir3]29 time_dirs = [time_dir1] #, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6] 26 30 27 #cellsize = 20 28 cellsize = 250 31 32 33 cellsize = 20 34 #cellsize = 250 29 35 30 36 timestep = None # None means no timestep! … … 35 41 ###### 36 42 37 #area = ['Geordie', 'Sorrento', 'Fremantle', 'Rockingham'] # strings must match keys in var_equations below38 area = ['All'] # 'All' means no special areas - the whole thing43 area = ['CBD'] # strings must match keys in var_equations below 44 #area = ['All'] # 'All' means no special areas - the whole thing 39 45 40 46 ###### … … 49 55 50 56 # one or more key strings from var_equations above 51 var = [' stage', 'elevation']57 var = ['depth', 'speed'] 52 58 53 59 ###### 54 60 # Start running the various conversions we require. 55 61 ###### 62 56 63 for which_var in var: 57 64 if which_var not in var_equations: … … 59 66 break 60 67 61 asc_name = [] 68 for which_area in area: 69 if which_area == 'All': 70 easting_min = None 71 easting_max = None 72 northing_min = None 73 northing_max = None 74 else: 75 try: 76 easting_min = eval('project.xmin%s' % which_area) 77 easting_max = eval('project.xmax%s' % which_area) 78 northing_min = eval('project.ymin%s' % which_area) 79 northing_max = eval('project.ymax%s' % which_area) 80 except AttributeError: 81 print 'Unrecognized area name: %s' % which_area 82 break 62 83 63 for time_dir in time_dirs: 64 name1 = directory+time_dir+sep+project.scenario_name 65 name2 = directory+time_dir+sep+project.scenario_name+'_time_41700_0' 66 names = [name1, name2] 67 68 for name in names: 69 for which_area in area: 70 if which_area == 'All': 71 easting_min = None 72 easting_max = None 73 northing_min = None 74 northing_max = None 75 else: 76 try: 77 easting_min = eval('project.xmin%s' % which_area) 78 easting_max = eval('project.xmax%s' % which_area) 79 northing_min = eval('project.ymin%s' % which_area) 80 northing_max = eval('project.ymax%s' % which_area) 81 except AttributeError: 82 print 'Unrecognized area name: %s' % which_area 83 break 84 84 for time_dir in time_dirs: 85 86 name1 = directory+time_dir+sep+project.scenario_name 87 ## name2 = directory+time_dir+sep+project.scenario_name+'_time_39900_0' 88 ## name3 = directory+time_dir+sep+project.scenario_name+'_time_79800_0' 89 90 names = [name1] #, name2, name3] 91 92 ## asc_name = [] 93 94 for name in names: 95 85 96 outname = name + '_' + which_area + '_' + which_var 86 97 quantityname = var_equations[which_var] … … 99 110 verbose = True, 100 111 format = 'asc') 101 102 asc_name.append(outname + '.asc') 103 104 maxasc_outname = directory+time_dir+sep+project.scenario_name+'_'+which_area+'_'+which_var+'_max.asc' 105 106 maxasc.MaxAsc(maxasc_outname, asc_name) 112 ## 113 ## asc_name.append(outname + '.asc') 114 ## 115 ## maxasc_outname = directory+time_dir+sep+project.scenario_name+'_'+which_area+'_'+which_var+'_max.asc' 116 ## 117 ## print 'max asc outname ', maxasc_outname 118 ## print 'asc_name ', str(asc_name) 119 ## 120 ## maxasc.MaxAsc(maxasc_outname, asc_name)
Note: See TracChangeset
for help on using the changeset viewer.