def maketopo_pwlinear():
    """
    Output topography file for the entire domain
    """
    nxpoints = 501
    nypoints = 5
    xlower = 0.e0
    xupper = 50.e0
    ylower = -20.e0
    yupper = 20.e0
    outfile= "pwlinear2.topotype1"     
    topotools.topo1writer(outfile,topo_pwlinear,xlower,xupper,ylower,yupper,nxpoints,nypoints)
Example #2
0
def makeqinit():
    """
    Create qinit data file
    """
    nxpoints = 2001
    nypoints = 2001
    xlower = 0.e0
    xupper = 200000.e0
    yupper = 200000.e0
    ylower = 0.e0
    outfile= "hump.xyz"     
    topotools.topo1writer(outfile,qinit,xlower,xupper,ylower,yupper,nxpoints,nypoints)
Example #3
0
def makeqinit():
    """
    Create qinit data file
    """
    nxpoints = 101
    nypoints = 101
    xlower = 205.
    xupper = 217.5
    yupper = -14.
    ylower = -22.
    outfile= "hump.xyz"     
    topotools.topo1writer(outfile,qinit,xlower,xupper,ylower,yupper,nxpoints,nypoints)
Example #4
0
def makeqinit():
    """
    Create qinit data file
    """
    nxpoints=100
    nypoints=100
    xlower=-84.e0
    xupper=-80.e0
    ylower=-49.e0
    yupper=-45.e0
    outfile= "hump.xyz"
    topotools.topo1writer(outfile,qinit,xlower,xupper,ylower,yupper,nxpoints,nypoints)
Example #5
0
def makeqinit():
    """
    Create qinit data file
    """
    nxpoints = 101
    nypoints = 101
    xlower = -100.e0
    xupper = 100.e0
    yupper = 100.e0
    ylower = -100.e0
    outfile = "hump.xyz"
    topotools.topo1writer(outfile, qinit, xlower, xupper, ylower, yupper,
                          nxpoints, nypoints)
Example #6
0
def maketopo_pwlinear():
    """
    Output topography file for the entire domain
    """
    nxpoints = 501
    nypoints = 5
    xlower = 0.e0
    xupper = 50.e0
    ylower = -20.e0
    yupper = 20.e0
    outfile = "pwlinear2.topotype1"
    topotools.topo1writer(outfile, topo_pwlinear, xlower, xupper, ylower,
                          yupper, nxpoints, nypoints)
Example #7
0
def makeqinit():
    """
        Create qinit data file
    """

    nxpoints = 201
    nypoints = 201

    xlower = xcenter - 1.5
    xupper = xcenter + 1.5
    ylower = ycenter - 1.5
    yupper = ycenter + 1.5

    outfile = "hump.xyz"
    topotools.topo1writer(outfile, qinit, xlower, xupper, ylower, yupper,
                          nxpoints, nypoints)
def makeqinit():
    """
        Create qinit data file
    """

    with open("../../PreRun/InputData/fgmax_grid.txt") as f:
        temp = f.readlines()
    temp = temp[7:]
    data = zeros((len(temp),2))
    for i in range(len(temp)):
        lon, lat = temp[i].split()
        data[i][0] = lon
        data[i][1] = lat
    xcenter = data[:,0]
    ycenter = data[:,1]

    xlower = min(xcenter)-1
    xupper = max(xcenter)+1
    ylower = min(ycenter)-1
    yupper = max(ycenter)+1

    nxpoints = int((xupper-xlower)*60)+1
    nypoints = int((yupper-ylower)*60)+1

    print("nxpoints etc")
    print(nxpoints)
    print(nypoints)

    def qinit(x,y,scale=150):
        from numpy import where
        from clawpack.geoclaw.util import haversine

        z = 0

    # Gaussian using distance in meters:
        for i in range(len(xcenter)):
            r = haversine(x,y,xcenter[i],ycenter[i])
        #    z = exp(-(r/20e3)**2)
            z = z+exp(-(r/scale)**2)  #This is highly debatable...does this decay to quickly to register on the rough grid we are using?  If we have the decay slower, are we going to have the problem of multiple points stacking up and biasing the solver?
        return z



    outfile= "hump.xyz"
    topotools.topo1writer(outfile,qinit,xlower,xupper,ylower,yupper,nxpoints,nypoints)
Example #9
0
def maketopo():
    """
    Output topography files
    """
    nxpoints = 201
    nypoints = 21
    xlower = 0.
    xupper = 20.
    ylower = 0.
    yupper = 1.52
    outfile= "domain.tt1"
    topotools.topo1writer(outfile,topo,xlower,xupper,ylower,yupper,nxpoints,nypoints)

    nxpoints = 201
    nypoints = 201
    xlower = 4.5
    xupper = 5.5
    ylower = 0.25
    yupper = 1.25
    outfile= "hump.tt1"
    topotools.topo1writer(outfile,topo,xlower,xupper,ylower,yupper,nxpoints,nypoints)