def main():
    import argparse

    parser = argparse.ArgumentParser()
    parser.add_argument('--n-loads', type=int, default=16,
                        help='Number of loads to apply')
    parser.add_argument('--shape', type=int, default=200,
                        help='Number rows and columns')
    parser.add_argument('--spacing', type=int, default=5e3,
                        help='Spading between rows and columns (m)')
    parser.add_argument('--n-procs', type=int, default=1,
                        help='Number of processors to use')
    parser.add_argument('--plot', action='store_true', default=False,
                        help='Plot an image of the total deflection')

    args = parser.parse_args()

    shape = (args.shape, args.shape)
    spacing = (args.spacing, args.spacing)

    load_locs = get_random_load_locations(shape, args.n_loads)
    load_sizes = get_random_load_magnitudes(args.n_loads)

    grid = RasterModelGrid(shape[0], shape[1], spacing[0])

    flex = Flexure(grid, method='flexure')

    put_loads_on_grid(grid, load_locs, load_sizes)

    flex.update(n_procs=args.n_procs)

    if args.plot:
        grid.imshow('node', 'lithosphere_surface__elevation_increment',
                    symmetric_cbar=False, cmap='spectral', show=True)
def main():
    import argparse

    parser = argparse.ArgumentParser()
    parser.add_argument('--shape', type=int, default=200,
                        help='Number rows and columns')
    parser.add_argument('--spacing', type=int, default=5e3,
                        help='Spading between rows and columns (m)')
    parser.add_argument('--n-procs', type=int, default=1,
                        help='Number of processors to use')
    parser.add_argument('--plot', action='store_true', default=False,
                        help='Plot an image of the total deflection')

    args = parser.parse_args()

    shape = (args.shape, args.shape)
    spacing = (args.spacing, args.spacing)

    load_sizes = get_random_load_magnitudes(args.shape * args.shape)

    grid = RasterModelGrid(shape[0], shape[1], spacing[0])

    flex = Flexure(grid, method='flexure')

    put_loads_on_grid(grid, load_sizes)

    flex.update(n_procs=args.n_procs)

    if args.plot:
        grid.imshow('node', 'lithosphere_surface__elevation_increment',
                    symmetric_cbar=False, cmap='spectral', show=True)
Пример #3
0
def main():
    (n_rows, n_cols) = (100, 100)
    (dy, dx) = (10e3, 10e3)

    grid = RasterModelGrid(n_rows, n_cols, dx)

    flex = Flexure(grid, method="flexure")

    add_load_to_middle_of_grid(grid, 1e7)

    flex.update()

    grid.imshow("node", "lithosphere__elevation_increment", symmetric_cbar=True, show=True)
Пример #4
0
def main():
    import argparse

    parser = argparse.ArgumentParser()
    parser.add_argument("--n-loads",
                        type=int,
                        default=16,
                        help="Number of loads to apply")
    parser.add_argument("--shape",
                        type=int,
                        default=200,
                        help="Number rows and columns")
    parser.add_argument("--spacing",
                        type=int,
                        default=5e3,
                        help="Spading between rows and columns (m)")
    parser.add_argument("--n-procs",
                        type=int,
                        default=1,
                        help="Number of processors to use")
    parser.add_argument(
        "--plot",
        action="store_true",
        default=False,
        help="Plot an image of the total deflection",
    )

    args = parser.parse_args()

    shape = (args.shape, args.shape)
    spacing = (args.spacing, args.spacing)

    load_locs = get_random_load_locations(shape, args.n_loads)
    load_sizes = get_random_load_magnitudes(args.n_loads)

    grid = RasterModelGrid(shape[0], shape[1], spacing[0])

    flex = Flexure(grid, method="flexure")

    put_loads_on_grid(grid, load_locs, load_sizes)

    flex.update(n_procs=args.n_procs)

    if args.plot:
        grid.imshow(
            "node",
            "lithosphere_surface__elevation_increment",
            symmetric_cbar=False,
            cmap="spectral",
            show=True,
        )
Пример #5
0
def main():

    grid = RasterModelGrid(SHAPE[0], SHAPE[1], SPACING[0])

    create_lithosphere_elevation_with_bulge(grid)

    flex = Flexure(grid, method='flexure')

    put_two_point_loads_on_grid(grid)

    flex.update()

    grid.at_node['lithosphere_surface__elevation'] += grid.at_node['lithosphere_surface__elevation_increment']
    grid.imshow('node', 'lithosphere_surface__elevation',
                symmetric_cbar=False, show=True)
def main():
    (n_rows, n_cols) = (100, 100)
    (dy, dx) = (10e3, 10e3)

    grid = RasterModelGrid(n_rows, n_cols, dx)

    flex = Flexure(grid, method='flexure')

    add_load_to_middle_of_grid(grid, 1e7)

    flex.update()

    grid.imshow('node',
                'lithosphere_surface__elevation_increment',
                symmetric_cbar=True,
                show=True)
Пример #7
0
def main():

    grid = RasterModelGrid(SHAPE[0], SHAPE[1], SPACING[0])

    create_lithosphere_elevation_with_bulge(grid)

    flex = Flexure(grid, method="flexure")

    put_two_point_loads_on_grid(grid)

    flex.update()

    grid.at_node["lithosphere_surface__elevation"] += grid.at_node[
        "lithosphere_surface__elevation_increment"
    ]
    grid.imshow(
        "node", "lithosphere_surface__elevation", symmetric_cbar=False, show=True
    )
Пример #8
0
def main():

    grid = RasterModelGrid(SHAPE[0], SHAPE[1], SPACING[0])

    create_lithosphere_elevation_with_bulge(grid)

    flex = Flexure(grid, method='flexure')

    put_two_point_loads_on_grid(grid)

    flex.update()

    grid.at_node['lithosphere__elevation'] += grid.at_node[
        'lithosphere__elevation_increment']
    grid.imshow('node',
                'lithosphere__elevation',
                symmetric_cbar=False,
                show=True)
def main():
    import argparse

    parser = argparse.ArgumentParser()
    parser.add_argument(
        "--shape", type=int, default=200, help="Number rows and columns"
    )
    parser.add_argument(
        "--spacing", type=int, default=5e3, help="Spading between rows and columns (m)"
    )
    parser.add_argument(
        "--n-procs", type=int, default=1, help="Number of processors to use"
    )
    parser.add_argument(
        "--plot",
        action="store_true",
        default=False,
        help="Plot an image of the total deflection",
    )

    args = parser.parse_args()

    shape = (args.shape, args.shape)
    spacing = (args.spacing, args.spacing)

    load_sizes = get_random_load_magnitudes(args.shape * args.shape)

    grid = RasterModelGrid(shape[0], shape[1], spacing[0])

    flex = Flexure(grid, method="flexure")

    put_loads_on_grid(grid, load_sizes)

    flex.update(n_procs=args.n_procs)

    if args.plot:
        grid.imshow(
            "node",
            "lithosphere_surface__elevation_increment",
            symmetric_cbar=False,
            cmap="spectral",
            show=True,
        )
Пример #10
0
grid.dy, grid.dx

# ## Create the component

# Now we create the flexure component and tell it to use our newly-created grid. First, though, we'll examine the Flexure component a bit.

from landlab.components.flexure import Flexure

# The Flexure component, as with most landlab components, will require our grid to have some data that it will use. We can get the names of these data fields with the `intput_var_names` attribute of the component *class*.

Flexure.input_var_names

# We see that flexure uses just 1 data field: the change in lithospheric loading. landlab component classes can provide additional information about each of these fields. For instance, to the the units for a field, use the `var_units` method.

Flexure.var_units('lithosphere__overlying_pressure_increment')

# To print a more detailed description of a field, use `var_help`.

Flexure.var_help('lithosphere__overlying_pressure_increment')

# What about the data that `Flexure` provides? Use the `output_var_names` attribute.

Flexure.output_var_names

Flexure.var_help('lithosphere_surface__elevation_increment')

# Now that we understand the component a little more, create it using our grid.

flex = Flexure(grid, method='flexure')