hex_lattice_tectonicizer.py.
Models discrete normal-fault offset on a 2D hex lattice with a rectangular shape and with one orientation of the nodes being vertical.
The intention here is to use a particle (LCA) model to represent the evolution of a 2D hillslope, with the hex_lattice_tectonicizer serving to shift the nodes either upward (simple vertical uplift relative to baselevel), or up and sideways (representing motion on a fault plane).
Created on Mon Nov 17 08:01:49 2014
@author: gtucker
HexLatticeTectonicizer
(grid=None, node_state=None, propid=None, prop_data=None, prop_reset_value=None)[source]¶Bases: object
Handles tectonics and baselevel for CellLab-CTS models.
This is the base class from which classes to represent particular baselevel/fault geometries are derived.
Examples
>>> hlt = HexLatticeTectonicizer()
>>> hlt.grid.number_of_nodes
25
>>> hlt.nr
5
>>> hlt.nc
5
LatticeNormalFault
(fault_x_intercept=0.0, grid=None, node_state=None, propid=None, prop_data=None, prop_reset_value=None)[source]¶Bases: landlab.ca.boundaries.hex_lattice_tectonicizer.HexLatticeTectonicizer
Handles normal-fault displacement in CellLab-CTS models.
Represents a 60 degree, left-dipping normal fault, and handles discrete offsets for a hex grid that has vertical columns and a rectangular shape.
Examples
>>> import numpy as np
>>> from landlab import HexModelGrid
>>> from landlab.ca.boundaries.hex_lattice_tectonicizer import LatticeNormalFault
>>> pid = np.arange(25, dtype=int)
>>> pdata = np.arange(25)
>>> ns = np.arange(25, dtype=int)
>>> grid = HexModelGrid(5, 5, 1.0, orientation='vertical', shape='rect', reorient_links=True)
>>> lnf = LatticeNormalFault(0.0, grid, ns, pid, pdata, 0.0)
>>> lnf.first_fw_col
1
>>> lnf.num_fw_rows
array([0, 1, 3, 4, 5])
>>> lnf.incoming_node
array([1, 3, 4, 6])
>>> lnf.outgoing_node
array([12, 17, 19, 22])
>>> pid = arange(16, dtype=int)
>>> ns = arange(16, dtype=int)
>>> pdata = arange(16)
>>> grid = HexModelGrid(4, 4, 1.0, orientation='vertical', shape='rect', reorient_links=True)
>>> lnf = LatticeNormalFault(0.0, grid, ns, pid, pdata, 0.0)
>>> lnf.num_fw_rows
array([0, 1, 3, 4])
>>> lnf.incoming_node
array([1, 2, 5])
>>> lnf.outgoing_node
array([ 7, 11, 15])
>>> lnf.do_offset(rock_state=16)
>>> ns
array([ 0, 16, 16, 16, 4, 16, 6, 1, 8, 2, 10, 5, 12, 13, 14, 9])
>>> lnf.propid
array([ 0, 7, 11, 3, 4, 15, 6, 1, 8, 2, 10, 5, 12, 13, 14, 9])
>>> pid = arange(20, dtype=int)
>>> ns = arange(20, dtype=int)
>>> pdata = arange(20)
>>> grid = HexModelGrid(4, 5, 1.0, orientation='vertical', shape='rect', reorient_links=True)
>>> lnf = LatticeNormalFault(0.0, grid, ns, pid, pdata, 0.0)
>>> lnf.incoming_node
array([1, 3, 4, 6])
>>> lnf.outgoing_node
array([12, 14, 17, 19])
>>> lnf.do_offset(rock_state=20)
>>> ns
array([ 0, 20, 20, 20, 20, 5, 20, 20, 8, 1, 10, 3, 4, 13, 6, 15, 16,
9, 18, 11])
>>> lnf.propid
array([ 0, 12, 2, 14, 17, 5, 19, 7, 8, 1, 10, 3, 4, 13, 6, 15, 16,
9, 18, 11])
do_offset
(rock_state=1)[source]¶Apply 60-degree normal-fault offset.
Offset is applied to a hexagonal grid with vertical node orientation and rectangular arrangement of nodes.
Parameters: | rock_state : int
|
---|
Examples
>>> import numpy as np
>>> from landlab.ca.boundaries.hex_lattice_tectonicizer import LatticeNormalFault
>>> from landlab import HexModelGrid
>>> pid = np.arange(25, dtype=int)
>>> pdata = np.arange(25)
>>> ns = np.arange(25, dtype=int)
>>> grid = HexModelGrid(5, 5, 1.0, orientation='vertical', shape='rect', reorient_links=True)
>>> lnf = LatticeNormalFault(0.0, grid, ns, pid, pdata, 0.0)
>>> lnf.do_offset(rock_state=25)
>>> ns
array([ 0, 25, 25, 25, 25, 5, 25, 25, 8, 1, 10, 3, 4, 13, 6, 15, 16,
9, 18, 11, 20, 21, 14, 23, 24])
>>> lnf.propid
array([ 0, 12, 2, 17, 19, 5, 22, 7, 8, 1, 10, 3, 4, 13, 6, 15, 16,
9, 18, 11, 20, 21, 14, 23, 24])
LatticeUplifter
(grid=None, node_state=None, propid=None, prop_data=None, prop_reset_value=None)[source]¶Bases: landlab.ca.boundaries.hex_lattice_tectonicizer.HexLatticeTectonicizer
Handles vertical uplift of interior (not edges) for a hexagonal lattice with vertical node orientation and rectangular node arrangement.
uplift_interior_nodes
(rock_state=1)[source]¶Simulate ‘vertical’ displacement by shifting contents of node_state
Examples
>>> lu = LatticeUplifter()
>>> lu.node_state[:] = arange(len(lu.node_state))
>>> lu.uplift_interior_nodes(rock_state=25)
>>> lu.node_state
array([ 0, 25, 2, 25, 25,
5, 1, 7, 3, 4,
10, 6, 12, 8, 9,
15, 11, 17, 13, 14,
20, 16, 22, 18, 19])