Changeset 2945


Ignore:
Timestamp:
May 23, 2006, 2:25:03 PM (18 years ago)
Author:
sexton
Message:

updates to smf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/smf.py

    r2869 r2945  
    346346        kappa = self.kappa
    347347        kappad = self.kappad
    348         amin = self.find_min(x0,wa,kappad,kappa)
     348        amin = self.find_min(x0,wa,kappad,kappa,dx,am)
    349349
    350350        #double Gaussian calculation assumes water displacement is oriented
     
    363363        for i in range(N):
    364364            try:
    365                 z[i] =  -am / (amin*(cosh(kappa*(yr[i]-y0)/(wi+wa)))**2) \
     365                z[i] =  -am / ((cosh(kappa*(yr[i]-y0)/(wi+wa)))**2) \
    366366                            * (exp(-((xr[i]-x0)/wa)**2) - \
    367367                                kappad*exp(-((xr[i]-dx-x0)/wa)**2))
     
    394394        self.dx = 2.0 * (c * sqrt(-log((zsmall/a),e))) / 5.0
    395395
    396     def find_min(self, x0, wa, kappad, kappa):
     396    def find_min(self, x0, wa, kappad, kappa, dx, am):
    397397        """Determine eta_min to scale eta(x,y)
    398398        """
     
    400400        from math import exp, cosh
    401401
    402         step = 0.001
     402        step = 10.0
    403403        x = x0
    404404        deriv = 10.0
    405405        tol = 0.001
    406         count_max = 100000
     406        count_max = 1000000
    407407        c = 0
    408408
Note: See TracChangeset for help on using the changeset viewer.