maketopo.py.html | |
Source file: maketopo.py | |
Directory: /var/www/html/clawpack/links/awr11/chile2010awr | |
Converted: Sat Feb 5 2011 at 15:39:50 using clawcode2html | |
This documentation file will not reflect any later changes in the source file. |
""" Create topo files needed for this example: etopo10min120W60W60S0S.asc download from GeoClaw topo repository usgs_subfault.tt1 create using Okada model and """ from pyclaw.geotools import topotools import os,sys from subfaults import make_dz_chile2010 def gettopo(): """ Retrieve the topo file from the GeoClaw repository. """ remote_directory = 'http://kingkong.amath.washington.edu/topo/etopo2' topo_fname = 'etopo10min120W60W60S0S.asc' topotools.get_topo(topo_fname, remote_directory) def makedtopo(): """ Create dtopo data file for deformation of sea floor due to earthquake. Uses the Okada model with fault parameters and mesh specified in the .cfg file. """ from pyclaw.geotools import okada dtopo_fname = 'usgs_subfault.tt1' if os.path.exists(dtopo_fname): print "*** Not regenerating dtopo file (already exists): %s" % dtopo_fname else: print "Using Okada model to create %s " % dtopo_fname make_dz_chile2010() if __name__=='__main__': gettopo() makedtopo()