Changeset 5150
- Timestamp:
- Mar 10, 2008, 4:00:52 PM (17 years ago)
- Location:
- anuga_work/production/geraldton
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/geraldton/build_geraldton.py
r5012 r5150 36 36 #------------------------------------------------------------------------------ 37 37 38 39 38 print 'time stamp: ',project.build_time 40 print 'USER: ', project.user41 42 39 43 40 copy_code_files(project.output_build_time_dir,__file__, … … 45 42 46 43 start_screen_catcher(project.output_build_time_dir) 44 45 print 'time stamp: ',project.build_time 46 print 'USER: ', project.user, project.host 47 47 48 48 … … 81 81 82 82 print'create Geospatial data1 objects from topographies' 83 G1 = Geospatial_data(file_name = onshore_dir_name + '.pts' )83 G1 = Geospatial_data(file_name = onshore_dir_name + '.pts',verbose=True) 84 84 print'finished reading in %s.pts' %onshore_dir_name 85 G2 = Geospatial_data(file_name = coast_in_dir_name + '.txt' )86 G3 = Geospatial_data(file_name = island_dir_name + '.pts' )87 G4 = Geospatial_data(file_name = offshore_in_dir_name + '.txt' )85 G2 = Geospatial_data(file_name = coast_in_dir_name + '.txt',verbose=True) 86 G3 = Geospatial_data(file_name = island_dir_name + '.pts',verbose=True) 87 G4 = Geospatial_data(file_name = offshore_in_dir_name + '.txt',verbose=True) 88 88 print'finished reading in files' 89 89 90 G_onshore_clip = G1.clip(project.poly_all, verbose=True) 91 print 'finished clip' 92 G_onshore_clip_clipout=G_onshore_clip.clip_outside(project.poly_cbd, verbose=True) 93 print 'finished clipout' 94 # reduce resolution by 9 time (1/9) of the original file. This was determined 95 # as the resolution for this region is going to be 20000 and the asc grid cellsize is 96 # 30m there (900). The sqrt of 20000 is about 140 or 150, a 150m x150m grid would contain 97 # 36 points at a 30m grid spacing and we only need 4. So 4/36 is 1/9 or 0.11111 98 G_onshore_clip_clipout_reduced=G_onshore_clip_clipout.split(0.111, verbose=True) 90 #G_onshore_clip = G1.clip(project.poly_all, verbose=True) 91 #print 'finished clip' 92 #G_onshore_clip_clipout=G_onshore_clip.clip_outside(project.poly_cbd, verbose=True) 93 #print 'finished clipout' 94 ## reduce resolution by 10 time (1/10) of the original file. This was determined 95 ## as the resolution for this region is going to be 20000 and the asc grid cellsize is 96 ## 10m there (100). There is 2 20000m triangles in a 200m x 200m grid sqrt of 40000 is about 200, 97 ## a 200m x 200m area would contain 400 points at a 10m grid spacing and we only need 4. So 4/400 is 1/100 or 0.01 98 ## 1/100 reduction is possible but a 1/10 is enough to help with file size and loading 99 #G_onshore_clip_clipout_reduced=G_onshore_clip_clipout.split(0.1, verbose=True) 100 # 101 #G_cbd = G1.clip(projec.poly_cbd,verbose=True) 102 ##G_cbd_reduced = G_cbd.split(0.25, verbose=True) 103 # 104 #G_bathy = G4.clip(project.poly_all) 105 #G_island = G3.clip(project.poly_all) 106 #G_coast = G2.clip(project.poly_all) 107 # 108 #print'add all geospatial objects' 109 #G = G_onshore_clip_clipout_reduced + G_cbd_reduced + G_bathy + G_island + G_coast 99 110 100 G_cbd = G1.clip(projec.poly_cbd,verbose=True) 101 G_cbd_reduced = G_cbd.split(0.25, verbose=True) 111 G = G1 + G2 + G3 + G4 102 112 103 G_bathy = G4.clip(project.poly_all) 104 G_island = G3.clip(project.poly_all) 105 G_coast = G2.clip(project.poly_all) 106 107 print'add all geospatial objects' 108 G = G_onshore_clip_clipout_reduced + G_cbd_reduced + G_bathy + G_island + G_coast 113 G_clip = G.clip(project.poly_all, verbose=True) 109 114 110 115 print'clip combined geospatial object by bounding polygon' … … 116 121 if access(project.topographies_dir,F_OK) == 0: 117 122 mkdir (project.topographies_dir) 118 G .export_points_file(project.combined_dir_name + '.txt')123 G_clip.export_points_file(project.combined_dir_name + '.txt') 119 124 #G_clipped.export_points_file(project.combined_dir_name + '.xya') 120 G_small, = G.split(0.1, verbose)125 G_small,G_other = G_clip.split(0.01, verbose=True) 121 126 G_small.export_points_file(project.combined_dir_name_small + '.txt') 122 127 -
anuga_work/production/geraldton/project.py
r5012 r5150 39 39 starttime=10000 40 40 midtime=21600 41 finaltime=25000 41 #finaltime=25000 42 finaltime=10000 42 43 export_cellsize=50 43 setup=' trial'44 setup='final' 44 45 source='other' 45 46 … … 73 74 74 75 #final topo name 75 combined_name ='geraldton_combined_elevation .pts'76 combined_ smaller_name = 'geraldton_combined_elevation_smaller'76 combined_name ='geraldton_combined_elevation' 77 combined_name_small = 'geraldton_combined_elevation_small' 77 78 78 79 anuga_dir = home+state+sep+scenario+sep+'anuga'+sep 79 80 80 topographies_in_dir = home+s ep+state+sep+scenario+sep+'elevation_final'+sep+'points'+sep81 topographies_dir = home+s ep+state+sep+scenario+sep+'anuga'+sep+'topographies'+sep81 topographies_in_dir = home+state+sep+scenario+sep+'elevation_final'+sep+'points'+sep 82 topographies_dir = home+state+sep+scenario+sep+'anuga'+sep+'topographies'+sep 82 83 83 84 #input topo file location … … 95 96 #final topo files 96 97 combined_dir_name = topographies_dir + combined_name 97 combined_ smaller_dir_name = topographies_dir + combined_smaller_name98 combined_dir_name_small = topographies_dir + combined_name_small 98 99 99 100 meshes_dir = anuga_dir+'meshes'+sep … … 127 128 #output locations 128 129 output_dir = anuga_dir+'outputs'+sep 129 output_build_time_dir = output_dir+build_time+ '_'+source+sep130 output_build_time_dir = output_dir+build_time+dir_comment+sep 130 131 output_run_time_dir = output_dir +run_time+dir_comment+sep 131 132 #output_run_time_dir = output_dir+sep+run_time+sep … … 134 135 #gauges 135 136 gauge_name = '???.csv' 136 gauges_dir = home+s ep+state+sep+scenario+sep+'anuga'+sep+'gauges'+sep137 gauges_dir = home+state+sep+scenario+sep+'anuga'+sep+'gauges'+sep 137 138 gauges_dir_name = gauges_dir + gauge_name 138 139 … … 171 172 172 173 poly_neg20_pos20 = read_polygon(polygons_dir+'neg20_pos20_points.csv') 173 res_neg20_pos20 = 2 5000*res_factor174 res_neg20_pos20 = 20000*res_factor 174 175 175 176 poly_neg10_pos10= read_polygon(polygons_dir+'neg10_pos10_points.csv') 176 res_neg10_pos10 = 5000*res_factor177 res_neg10_pos10 = 2000*res_factor 177 178 178 179 poly_cbd = read_polygon(polygons_dir+'cbd_points.csv') … … 180 181 181 182 poly_wallabi = read_polygon(polygons_dir+'island_wallabi_poly_points.csv') 182 res_wallabi = 25000*res_factor 183 res_wallabi = 20000*res_factor 184 183 185 poly_dingiville = read_polygon(polygons_dir+'island_dingiville_poly_points.csv') 184 res_dingiville = 25000*res_factor 186 res_dingiville = 20000*res_factor 187 185 188 poly_pelsaert = read_polygon(polygons_dir+'island_pelsaert_poly_points.csv') 186 res_pelsaert = 2 5000*res_factor189 res_pelsaert = 20000*res_factor 187 190 188 191 -
anuga_work/production/geraldton/run_geraldton.py
r5007 r5150 168 168 print 'domain id', id(domain) 169 169 #print 'Reading Boundary file',project.boundaries_dir_namea + '.sww' 170 print'set_boundary' 171 172 Br = Reflective_boundary(domain) 173 Bd = Dirichlet_boundary([kwargs['tide'],0,0]) 174 Bo = Dirichlet_boundary([kwargs['tide']+5.0,0,0]) 170 175 171 176 if project.source != 'other': … … 173 178 domain, time_thinning=kwargs['time_thinning'], mean_stage=kwargs['tide'], 174 179 use_cache=True, verbose=True) 175 176 kwargs['input_start_time']=domain.starttime 177 178 print 'finished reading boundary file' 179 180 Br = Reflective_boundary(domain) 181 Bd = Dirichlet_boundary([kwargs['tide'],0,0]) 182 Bo = Dirichlet_boundary([kwargs['tide']+5.0,0,0]) 183 184 185 print'set_boundary' 186 187 domain.set_boundary({'back': Br, 188 'side': Bd, 189 'ocean': Bf}) 180 print 'finished reading boundary file' 181 domain.set_boundary({'back': Br, 182 'side': Bd, 183 'ocean': Bf}) 184 else: 185 print 'set ocean' 186 domain.set_boundary({'back': Br, 187 'side': Bd, 188 'ocean': Bd}) 189 190 # kwargs['input_start_time']=domain.starttime 191 192 193 190 194 print'finish set boundary' 191 195 … … 195 199 t0 = time.time() 196 200 197 for t in domain.evolve(yieldstep = 240, finaltime = kwargs[' starttime']):201 for t in domain.evolve(yieldstep = 240, finaltime = kwargs['finaltime']): 198 202 domain.write_time() 199 203 domain.write_boundary_statistics(tags = 'ocean') 200 204 201 if allclose(t, 120):205 if allclose(t, 240): 202 206 domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bo}) 203 207 204 if allclose(t, 720):208 if allclose(t, 1440): 205 209 domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bd}) 206 210 … … 274 278 275 279 kwargs['output_dir']=project.output_run_time_dir 276 kwargs['bathy_file']=project.combined_dir_name 277 # kwargs['bathy_file']=project.combined_small_dir_name + '.pts'280 # kwargs['bathy_file']=project.combined_dir_name+'.txt' 281 kwargs['bathy_file']=project.combined_dir_name_small + '.txt' 278 282 kwargs['boundary_file']=project.boundaries_in_dir_name + '.sww' 279 283 kwargs['file_name']=project.home+'detail.csv'
Note: See TracChangeset
for help on using the changeset viewer.