Example #1
0
def topo(x, y):
    """
    x = longitude, y = latitude in degrees
    """
    import numpy as np
    x0 = 0.0
    y0 = 40.0
    d = gcdist(x0, y0, x, y, Rearth)
    z = shelf1(d)
    d = gcdist(xisland, yisland, x, y, Rearth)
    z = z + island1(d)
    z = where(z > 200, 200, z)  # cut off topo at 200 m above sea level
    return z
Example #2
0
def qinit(x, y):
    """
    Gaussian hump:
    """
    from numpy import where
    x0 = 0.0
    y0 = 40.0
    d = gcdist(x0, y0, x, y, Rearth)
    ze = -d**2 / 2.e9
    z = where(ze > -100., 3.e0 * exp(ze), 0.)
    return z