/[escript]/trunk/modellib/py_src/tsunami.py
ViewVC logotype

Diff of /trunk/modellib/py_src/tsunami.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 280 by cochrane, Wed Nov 30 06:23:59 2005 UTC revision 281 by elspeth, Wed Nov 30 09:10:59 2005 UTC
# Line 9  from esys.escript.linearPDEs import Line Line 9  from esys.escript.linearPDEs import Line
9  from esys.escript.modelframe import Model  from esys.escript.modelframe import Model
10  import numarray  import numarray
11  import math  import math
12  import urllib  #import urllib
13    import urllib2
14    
15  EPS=1.e-5  EPS=1.e-5
16    
# Line 641  class OceanRegionCollector(Model): Line 642  class OceanRegionCollector(Model):
642             """             """
643             c=self.__mergeParameters(self.coastline_source)             c=self.__mergeParameters(self.coastline_source)
644             b=self.__mergeParameters(self.bathymetry_source)             b=self.__mergeParameters(self.bathymetry_source)
645             self.coastline_stream=urllib.urlopen(c)             self.coastline_stream=urllib2.urlopen(c)
646             self.bathymetry_stream=urllib.urlopen(b)             self.bathymetry_stream=urllib2.urlopen(b)
647    
648        def __mergeParameters(self,txt):        def __mergeParameters(self,txt):
649             return txt.replace("%%west%%",str(self.west))\             return txt.replace("%%west%%",str(self.west))\
# Line 1212  class SurfMovie(Model): Line 1213  class SurfMovie(Model):
1213            for fname in self.imageFiles:            for fname in self.imageFiles:
1214                os.unlink(fname)                os.unlink(fname)
1215    
1216  if __name__=="__main__":  def main():
1217     from esys.escript.modelframe import Link,Simulation     from esys.escript.modelframe import Link,Simulation
1218     from esys.modellib.input import Sequencer     from esys.modellib.input import Sequencer
1219    
# Line 1266  if __name__=="__main__": Line 1267  if __name__=="__main__":
1267     sm.max_height=Link(src,"amplitude")     sm.max_height=Link(src,"amplitude")
1268        
1269     s=Simulation([sq,oc,b,oreg,src,ts,sm])     s=Simulation([sq,oc,b,oreg,src,ts,sm])
1270     # s.writeXML()     s.writeXML()
1271     s.run()     s.run()
1272    
1273    if __name__=="__main__":
1274        from esys.modellib import tsunami
1275        tsunami.main()
1276    
1277  # vim: expandtab shiftwidth=4:  # vim: expandtab shiftwidth=4:

Legend:
Removed from v.280  
changed lines
  Added in v.281

  ViewVC Help
Powered by ViewVC 1.1.26