Changeset 4429 for anuga_work/production/broome_2006/run_broome.py
- Timestamp:
- May 15, 2007, 4:13:58 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/broome_2006/run_broome.py
r4372 r4429 81 81 interior_regions=project.interior_regions, 82 82 filename=meshes_dir_name, 83 use_cache= True,83 use_cache=False, 84 84 verbose=True) 85 85 … … 92 92 print 'Setup computational domain' 93 93 #domain = Domain(meshes_time_dir_name, use_cache=True, verbose=True) 94 domain = Domain(meshes_dir_name, use_cache= True, verbose=True)94 domain = Domain(meshes_dir_name, use_cache=False, verbose=True) 95 95 print domain.statistics() 96 '''97 print 'starting to create boundary conditions'98 boundaries_in_dir_name = project.boundaries_in_dir_name99 100 from anuga.shallow_water.data_manager import urs2sww, ferret2sww101 102 # put above distribute103 print 'boundary file is: ',boundaries_dir_name104 from caching import cache105 if myid == 0:106 cache(ferret2sww,107 (boundaries_in_dir_name,108 # boundaries_time_dir_name),109 boundaries_dir_name),110 {'verbose': True,111 'minlat': project.south_boundary,112 'maxlat': project.north_boundary,113 'minlon': project.west_boundary,114 'maxlon': project.east_boundary,115 # 'minlat': project.south,116 # 'maxlat': project.north,117 # 'minlon': project.west,118 # 'maxlon': project.east,119 'mint': 0, 'maxt': 35100,120 'origin': domain.geo_reference.get_origin(),121 'mean_stage': project.tide,122 # 'zscale': 1, #Enhance tsunami123 'fail_on_NaN': False},124 verbose = True,125 )126 barrier()127 '''128 96 129 97 #------------------------------------------------------------------------- … … 134 102 print 'Setup initial conditions' 135 103 136 domain.set_quantity('stage', tide) 137 domain.set_quantity('friction', 0.01) 104 from polygon import Polygon_function 105 #following sets the stage/water to be offcoast only 106 IC = Polygon_function( [(project.poly_mainland, -1.0)], default = tide, 107 geo_reference = domain.geo_reference) 108 domain.set_quantity('stage', IC) 138 109 #combined_time_dir_name = project.topographies_dir+build_time+project.combined_name 139 110 print 'Start Set quantity' 140 111 print 'project.combined_dir_name_unclipped1',project.combined_dir_name_unclipped1+'.txt' 141 112 domain.set_quantity('elevation', 113 # filename = project.combined_dir_name+'.txt', 142 114 filename = project.combined_dir_name_unclipped1+'.txt', 143 115 # filename = project.combined_smaller_name_dir+'.xya', … … 175 147 print 'domain id', id(domain) 176 148 #Bf = File_boundary(boundaries_dir_name + '.sww', 177 # domain, time_thinning=5, use_cache=True, verbose=True) 149 # domain, time_thinning=12, use_cache=True, verbose=True) 150 Bf = Field_boundary(boundaries_dir_name + '.sww', 151 domain, time_thinning=1, mean_stage=tide, 152 use_cache=True, verbose=True) 178 153 179 154 print 'finished reading boundary file' … … 185 160 domain.set_boundary({'back': Br, 186 161 'side': Bd, 187 'ocean': Bd}) 162 'ocean': Bf}) 163 # 'ocean': Bd}) 188 164 print'finish set boundary' 189 165 … … 194 170 t0 = time.time() 195 171 196 for t in domain.evolve(yieldstep = 60, finaltime = 10000):172 for t in domain.evolve(yieldstep = 60, finaltime = 30000): 197 173 domain.write_time() 198 174 domain.write_boundary_statistics(tags = 'ocean') 199 if allclose(t, 120):200 domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bo})175 # if allclose(t, 120): 176 # domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bo}) 201 177 202 if allclose(t, 1020):203 domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bd})178 # if allclose(t, 1020): 179 # domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bd}) 204 180 205 181
Note: See TracChangeset
for help on using the changeset viewer.