Skip to content

4 Sparta, North Carolina (Initial Investigation)

Luke Pajer edited this page Oct 28, 2020 · 1 revision

Import the Slam Calculator Package

import geo_slam_calculator_v1 as slam

Define the DEM area

area = slam.DEM(longitude=-81.094, latitude=36.476, lon_del=0.2, lat_del=0.2)

lat_min, lat_max, lon_min, lon_max = area.get_bounds()
lat_min, lat_max, lon_min, lon_max

dem_file = area.get_dem(lat_min, lat_max, lon_min, lon_max)
Begin Downloading DEM File...  
Downloaded DEM file in 7.1 seconds  
Processing...  
Complete.  

Get Quaternary Faults and Folds Shapefile

from geo_slam_calculator_v1 import qFaults

qfaults = qFaults.get_qfaults()
Warning: Be courteous to the USGS API and do not download this file more than once, as this is a very large file.
Downloaded Quaternary Faults and Folds Shape File in 0.8 seconds

Get the Earthquake Data for the 2020 Earthquake

data = slam.get_data(lat_min=lat_min, lat_max=lat_max, lon_min=lon_min, lon_max=lon_max)
events_2020 = data.event_query(start_time='2020-08-08', end_time='2020-08-10', min_mag=5)
Downloaded Regional Earthquake Data in 0.6505 seconds

image

focal_data_2020 = data.focal_data(earthquakes=events_2020)
focal_data_2020.focal_data

image

focal_data_2020.error_data

image

Filter the data for the earthquake of interest

eq1_2020 = focal_data_2020.data

image image

Prepare Variables for Swath Calculation

Since the strike, dip, and rake for the nodal planes are not yet available via the API, these must be manually entered into the nodal_comps function below.

swaths_init = slam.swaths(elevation=dem_file.elevation)

# Calculate the Grid North Adjustment
gridNorthAdjustment_2020 = swaths_init.grid_adjustment(longitude=-81.0935, latitude=36.4755, zoneMeridian=-81)

# Combine Focal Data Points
focal_data_2020 = swaths_init.focal_metrics(lon=-81.0935, lat=36.4755, depth=11.5)

# Nodal 1 Computations
nodal_comps_2020 = swaths_init.nodal_comps(strike=299, grid_adjust=gridNorthAdjustment_2020, 
                                           strike_uncert=0, plunge=85, dip_ang=0)

# Determine Errors Relative to the Nodal Plane
err_comps_2020 = swaths_init.err_computations(eh1=eq1_2020.eh1[0], eh2=eq1_2020.eh2[0], 
                                              eh1Az=eq1_2020.ehaz[0], ez=eq1_2020.ez[0], 
                                              grid_adjust=gridNorthAdjustment_2020)

# Calculate the Light Direction for the DEM map
lightDirection_2020 = swaths_init.light_direction(nodal_comps_2020[1])

image

Calculate Swath Bounds

swaths_2020 = swaths_init.swath_calc(npDipPlunge=nodal_comps_2020[3], npDipAngUncert=nodal_comps_2020[4], 
                                     npDipTr=nodal_comps_2020[1], npDipTrendUncert=nodal_comps_2020[2], 
                                     widthFactor=1.5, multiplier=1.5, cellsize=dem_file.cellsize, 
                                     cellsize_res=30, eh1=err_comps_2020[0], eh1Az=err_comps_2020[1], 
                                     eh2=err_comps_2020[2], ez=err_comps_2020[3], lat=focal_data_2020[0], 
                                     lon=focal_data_2020[1], focalDepth=focal_data_2020[2], 
                                     bounds=dem_file.bounds, thin=False)

image

Calculate Swath Shading

swaths_shade_2020 = swaths_init.get_shade(swaths_2020.swaths, trend='EW')
Begin computing Seismo-Lineament boundary area
Finished assessment of Seismo-Lineament boundary area in 10.09 seconds

Plot Swaths for 2014 Earthquake

maps = slam.SLAM_viz(elevation=dem_file.elevation)
maps.elevation_map(middle_road=swaths_2020.middle_road, swaths_shade=swaths_shade_2020, 
                   lightDirection=lightDirection_2020, altDeg=12.5, lon=focal_data_2020[1], lat=focal_data_2020[0], 
                   lon_max=lon_max, lon_min=lon_min, lat_max=lat_max, lat_min=lat_min, 
                   strike=299, dip=59, rake=51, title='A1', faults=qfaults)

maps.physical_map(middle_road=swaths_2020.middle_road, swaths_shade=swaths_shade_2020, 
                  lon=focal_data_2020[1], lat=focal_data_2020[0], lon_max=lon_max, 
                  lon_min=lon_min, lat_max=lat_max, lat_min=lat_min, strike=299, 
                  dip=59, rake=51, title='A1', faults=qfaults, tiler_size=11)

Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under ODbL