Changeset 2077
- Timestamp:
- Nov 25, 2005, 3:39:56 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
production/gippsland_2005/run_gippsland.py
r2076 r2077 10 10 import project 11 11 from create_mesh import create_mesh 12 12 from pyvolution.shallow_water import Domain, Reflective_boundary,\ 13 File_boundary, Dirichlet_boundary, Time_boundary, Transmissive_boundary 14 from pyvolution.least_squares import fit_to_mesh_file, DEFAULT_ALPHA 13 15 14 16 #Data preparation … … 20 22 # #evaluate = True) 21 23 22 cache(dem2pts, project.demname , {'verbose': True},23 dependencies = [project.demname + '.dem']24 cache(dem2pts, project.demname[:-4], {'verbose': True}, 25 dependencies = [project.demname] 24 26 ,verbose = False 25 27 ) … … 34 36 project.ucur_dir, 35 37 project.vcur_dir, 36 project.boundaryname + '.sww'),38 project.boundaryname), 37 39 {'verbose': True, 38 40 'minlat': -38.25, … … 54 56 #fit_to_mesh_file(mesh_file, point_file, mesh_output_file, DEFAULT_ALPHA, 55 57 # verbose=True, expand_search=True, precrop=True) 56 cache(fit_to_mesh_file,(project.mesh _file,57 p oint_file,58 mesh_output_file,58 cache(fit_to_mesh_file,(project.meshname, 59 project.pointname, 60 project.mesh_elevname, 59 61 DEFAULT_ALPHA), 60 62 {'verbose': True, 61 63 'expand_search': True, 62 64 'precrop': True} 63 ,dependencies = [project.mesh _file, point_file]64 #,verbose = True65 ,dependencies = [project.meshname, project.pointname] 66 ,verbose = False 65 67 ) 66 68 69 70 #Setup domain 71 domain = cache(pmesh_to_domain_instance, (project.mesh_elevname, Domain), 72 dependencies = [project.mesh_elevname] 73 ,verbose = False 74 ) 75 76 77 domain.set_name(project.basename) # + '_%d' %resolution) 78 domain.set_datadir(project.outputdir) 79 domain.store = True 80 domain.quantities_to_be_stored = ['stage'] 81 82 print 'Number of triangles = ', len(domain) 83 print 'The extent is ', domain.get_extent() 84 85 #Setup Initial Conditions 86 domain.set_quantity('friction', 0) 87 domain.set_quantity('stage', project.tide) 88 89 90 #Setup Boundary Conditions 91 print domain.get_boundary_tags() 92 93 print "****** run ****" 94 print "project.boundaryname",project.boundaryname 95 print "**********" 96 97 Bf = File_boundary(project.boundaryname, domain, verbose = True) 98 #domain.starttime = 3000 #Obtained from MOST 99 domain.starttime = 0 #Obtained from MOST 100 101 Br = Reflective_boundary(domain) 102 Bt = Transmissive_boundary(domain) 103 Bd = Dirichlet_boundary([project.tide,0,0]) 104 Bw = Time_boundary(domain=domain, 105 f=lambda t: [(60<t<660)*4, 0, 0]) 106 107 domain.set_boundary( {'back': Br,'side': Bd, 'ocean': Bf} ) #CSIRO storm surge 108 109 #Evolve 110 import time 111 t0 = time.time() 112 113 for t in domain.evolve(yieldstep = 60, finaltime = 1200): 114 # skip_initial_step = True): 115 domain.write_time() 116 domain.write_boundary_statistics(tags = 'ocean') #quantities = 'stage') 117 118 print 'That took %.2f seconds' %(time.time()-t0)
Note: See TracChangeset
for help on using the changeset viewer.