Changeset 1796
- Timestamp:
- Sep 7, 2005, 1:20:12 PM (20 years ago)
- Location:
- production/karratha_2005
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
production/karratha_2005/create_mesh.py
r1786 r1796 8 8 from pmesh.mesh import * 9 9 from pyvolution.coordinate_transforms.geo_reference import Geo_reference 10 from pyvolution.coordinate_transforms.redfearn import redfearn, degminsec2decimal_degrees 10 from pyvolution.coordinate_transforms.redfearn import redfearn 11 12 13 import project 11 14 12 15 #------------------------------------------------------------- … … 14 17 15 18 16 refzone = 5019 17 20 #Basic geometry 18 21 19 south = degminsec2decimal_degrees(-20,45,0) 20 north = degminsec2decimal_degrees(-20,15,0) 21 west = degminsec2decimal_degrees(116,30,0) 22 east = degminsec2decimal_degrees(117,0,0) 22 south = project.south 23 north = project.north 24 west = project.west 25 east = project.east 26 27 refzone = project.refzone 23 28 24 29 … … 76 81 m.generateMesh('pzq28.0za1000000a') 77 82 78 import project79 83 m.export_mesh_file(project.meshname + '.msh') 80 84 -
production/karratha_2005/prepare_boundary.py
r1793 r1796 21 21 from pyvolution.data_manager import ferret2sww 22 22 23 #Origin of existing tsh file (Temporary measure) 24 mesh_origin = (56,308500.000000,6189000.000000) 23 24 south = project.south 25 north = project.north 26 west = project.west 27 east = project.east 28 29 30 #Origin of existing dem (Temporary measure) 31 mesh_origin = (50, 421544.35127423, 7677669.5257159) 32 33 25 34 26 35 ferret2sww(source_dir+project.boundary_basename, 27 36 project.boundary_basename, 28 37 verbose=True, 29 minlat= -35, maxlat=-34,30 minlon= 150.5, maxlon=152,38 minlat=south-1, maxlat=north+1, 39 minlon=west-1, maxlon=east+1, 31 40 origin = mesh_origin, 32 41 zscale = 1, 33 fail_on_NaN = False), 42 fail_on_NaN = False, 43 inverted_bathymetry = True), 34 44 35 45 -
production/karratha_2005/project.py
r1793 r1796 10 10 11 11 meshdir = home+sep+'karratha_tsunami_scenario_2005'+sep+'meshes'+sep 12 datadir = home+sep+'karratha_tsunami_scenario_2005'+sep+' data'+sep12 datadir = home+sep+'karratha_tsunami_scenario_2005'+sep+'topographies'+sep 13 13 outputdir = home+sep+'karratha_tsunami_scenario_2005'+sep+'output'+sep 14 14 boundarydir = home+sep+'karratha_tsunami_scenario_2005'+sep+'boundaries'+sep … … 18 18 meshname = meshdir + basename 19 19 demname = datadir + basename 20 boundaryname = boundarydir + 'SU-AU' 20 21 21 22 boundary_basename = 'SU-AU' 22 23 24 #Georeferencing 25 from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees 23 26 27 south = degminsec2decimal_degrees(-20,45,0) 28 north = degminsec2decimal_degrees(-20,15,0) 29 west = degminsec2decimal_degrees(116,30,0) 30 east = degminsec2decimal_degrees(117,0,0) 31 32 33 refzone = 50 -
production/karratha_2005/run_karratha.py
r1786 r1796 8 8 9 9 from pyvolution.shallow_water import Domain, Reflective_boundary 10 from pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts 10 from pyvolution.data_manager import convert_dem_from_ascii2netcdf,\ 11 dem2pts, ferret2sww 11 12 from pyvolution.pmesh2domain import pmesh_to_domain_instance 12 13 from caching import cache 13 14 import project 14 15 16 #Data preparation 15 17 #Convert ASC 2 DEM 2 PTS using source data and store result in source data 16 17 18 demname = project.demname 18 19 19 20 20 cache(convert_dem_from_ascii2netcdf, demname, {'verbose': True}, 21 21 dependencies = [demname + '.asc'], 22 22 verbose = True) 23 #evaluate = True) 23 24 24 25 cache(dem2pts, demname, {'verbose': True}, … … 26 27 verbose = True) 27 28 29 #Convert MOST boundary 28 30 31 ferret2sww('test', verbose=False, 32 origin = (56, 0, 0)) 33 34 35 #Read mesh 29 36 mesh = project.meshname + '.msh' 30 37 domain = cache(pmesh_to_domain_instance, (mesh, Domain), … … 39 46 print "Number of triangles = ", len(domain) 40 47 print 'The extent is ', domain.get_extent() 48 41 49 42 50 #IC
Note: See TracChangeset
for help on using the changeset viewer.