Changeset 7351
- Timestamp:
- Aug 11, 2009, 9:03:37 AM (15 years ago)
- Location:
- anuga_work/production/new_south_wales
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/new_south_wales/batemans_bay/export_results_max.py
r7327 r7351 24 24 #Specify output directories 25 25 time_dir1 = '20090529_143527_run_final_0.0_51424_jgriffin' 26 #time_dir2 = '20090529_143458_run_final_0.0_58346_jgriffin'26 time_dir2 = '20090529_143458_run_final_0.0_58346_jgriffin' 27 27 28 time_dirs = [time_dir1 ]#, time_dir2]28 time_dirs = [time_dir1, time_dir2] 29 29 30 # sww filename extensions ie. batemans_bay_time_37860_0.sww, input into list 17640 31 # make sure numbers are in sequential order 32 times = [37860] 33 34 #Modify the cellsize value to set the size of the raster you require 35 #Take into account mesh size when aplying this paramater 30 36 cellsize = 20 #dependent on data resolution in area of interest. 31 37 38 #Now set the timestep at which you want the raster generated. 39 #Either set the actual timestep required or use 'None' to indicate that 40 #you want the maximum values in the raster over all timesteps 32 41 timestep = None # None means no timestep! 33 42 ##timestep = 0 … … 54 63 var = ['elevation'] 55 64 ###### 56 # Start running the various conversions we require. 65 # Start script, running through variables, area, folder, sww file (determine by times) 66 # Then creates a maximum asci if there is more than one sww file 57 67 ###### 58 68 … … 79 89 80 90 for time_dir in time_dirs: 81 82 name1 = join(directory, time_dir, project.scenario_name) 83 name2 = join(directory, time_dir, project.scenario_name)+'_time_37860_0' 84 85 86 87 names = [name1, name2] 91 names = [join(directory, time_dir, project.scenario_name)] 92 for time in times: 93 names.append(join(directory, time_dir, project.scenario_name)+ '_time_' + str(time) + '_0') 88 94 89 95 asc_name = [] … … 110 116 asc_name.append(outname + '.asc') 111 117 112 maxasc_outname = join(directory, time_dir, project.scenario_name)+'_'+which_area+'_'+which_var+'_max.asc' 118 if len(names) >1: 119 maxasc_outname = join(directory, time_dir, project.scenario_name)+'_'+which_area+'_'+which_var+'_max.asc' 113 120 114 print 'max asc outname ', maxasc_outname115 print 'asc_name ', str(asc_name)121 print 'max asc outname ', maxasc_outname 122 print 'asc_name ', str(asc_name) 116 123 117 MaxAsc(maxasc_outname, asc_name) 124 MaxAsc(maxasc_outname, asc_name) 125 else: 126 print 'only one sww input' -
anuga_work/production/new_south_wales/gosford/export_results_max.py
r7327 r7351 23 23 24 24 #Specify output directories 25 time_dir1 = '20090 615_161420_run_final_0.0_58025_jgriffin'26 #time_dir2 = '20090615_161318_run_final_0.0_58187_jgriffin'25 time_dir1 = '20090529_143527_run_final_0.0_51424_jgriffin' 26 time_dir2 = '20090529_143458_run_final_0.0_58346_jgriffin' 27 27 28 time_dirs = [time_dir1]#, time_dir2] 29 28 time_dirs = [time_dir1, time_dir2] 30 29 30 # sww filename extensions ie. batemans_bay_time_37860_0.sww, input into list 17640 31 # make sure numbers are in sequential order 32 times = [] 33 34 #Modify the cellsize value to set the size of the raster you require 35 #Take into account mesh size when aplying this paramater 31 36 cellsize = 20 #dependent on data resolution in area of interest. 32 37 38 #Now set the timestep at which you want the raster generated. 39 #Either set the actual timestep required or use 'None' to indicate that 40 #you want the maximum values in the raster over all timesteps 33 41 timestep = None # None means no timestep! 34 42 ##timestep = 0 … … 52 60 53 61 # one or more key strings from var_equations above 62 #var = ['depth', 'speed','stage'] 54 63 var = ['elevation'] 55 #var = ['depth', 'speed', 'stage']56 64 ###### 57 # Start running the various conversions we require. 65 # Start script, running through variables, area, folder, sww file (determine by times) 66 # Then creates a maximum asci if there is more than one sww file 58 67 ###### 59 68 … … 80 89 81 90 for time_dir in time_dirs: 82 83 name1 = join(directory, time_dir, project.scenario_name) 84 85 names = [name1] 91 names = [join(directory, time_dir, project.scenario_name)] 92 for time in times: 93 names.append(join(directory, time_dir, project.scenario_name)+ '_time_' + str(time) + '_0') 86 94 87 95 asc_name = [] … … 108 116 asc_name.append(outname + '.asc') 109 117 110 maxasc_outname = join(directory, time_dir, project.scenario_name)+'_'+which_area+'_'+which_var+'_max.asc' 118 if len(names) >1: 119 maxasc_outname = join(directory, time_dir, project.scenario_name)+'_'+which_area+'_'+which_var+'_max.asc' 111 120 112 print 'max asc outname ', maxasc_outname113 print 'asc_name ', str(asc_name)121 print 'max asc outname ', maxasc_outname 122 print 'asc_name ', str(asc_name) 114 123 115 MaxAsc(maxasc_outname, asc_name) 124 MaxAsc(maxasc_outname, asc_name) 125 else: 126 print 'only one sww input'
Note: See TracChangeset
for help on using the changeset viewer.