Changeset 1801


Ignore:
Timestamp:
Sep 7, 2005, 4:31:19 PM (20 years ago)
Author:
ole
Message:
 
Location:
production/karratha_2005
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • production/karratha_2005/prepare_boundary.py

    r1796 r1801  
    99"""
    1010
     11#FIXME: OBSOLETE
    1112
    1213import os
  • production/karratha_2005/run_karratha.py

    r1796 r1801  
    77
    88
    9 from pyvolution.shallow_water import Domain, Reflective_boundary
     9from pyvolution.shallow_water import Domain, Reflective_boundary, File_boundary
    1010from pyvolution.data_manager import convert_dem_from_ascii2netcdf,\
    1111     dem2pts, ferret2sww
     
    2727      verbose = True)
    2828
     29
    2930#Convert MOST boundary
    30 
    31 ferret2sww('test', verbose=False,
    32            origin = (56, 0, 0))
     31source_dir = project.boundarydir
    3332
    3433
    35 #Read mesh
     34#Data
     35from pyvolution.data_manager import ferret2sww
     36
     37
     38south = project.south
     39north = project.north
     40west = project.west
     41east = project.east
     42
     43#Origin of existing dem (FIXME: Temporary measure)
     44mesh_origin = (50, 421544.35127423, 7677669.5257159)
     45
     46ferret2sww(source_dir+project.boundary_basename,
     47           project.boundary_basename,
     48           verbose=True,
     49           minlat=south-1, maxlat=north+1,
     50           minlon=west-1, maxlon=east+1,
     51           origin = mesh_origin,
     52           zscale = 1,
     53           fail_on_NaN = False,
     54           inverted_bathymetry = True),
     55
     56
     57
     58#Setup domain
    3659mesh = project.meshname + '.msh'
    3760domain = cache(pmesh_to_domain_instance, (mesh, Domain),
     
    4871
    4972
    50 #IC
     73#Setup IC
    5174domain.set_quantity('stage', 0)
    5275domain.set_quantity('elevation',
     
    5578                    verbose = True)
    5679
    57 #BC
     80#Setup BC
     81Bf = File_boundary(project.boundary_basename + '.sww', domain, verbose = True)
     82
    5883Br = Reflective_boundary(domain)
    5984domain.set_boundary( {'wall': Br} )
     
    6186
    6287#Run
    63 for t in domain.evolve(yieldstep = 1, finaltime = 1):
     88for t in domain.evolve(yieldstep = 1, finaltime = 100):
    6489    domain.write_time()
Note: See TracChangeset for help on using the changeset viewer.