# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' The GMPE of BSSA 2014
#'
#' This function calculates the ground motion median values and standard deviations
#' @useDynLib RPSHA
#' @importFrom Rcpp sourceCpp
#' @param M A list of moment magnitudes for all interest of events
#' @param period The period of interest. -1 for PGV, 0 for PGA. A numeric value.
#' @param Rjb A list of Joyner-Boore distance (km); closest distance (km) to surface
#' projection of rupture plane. The length should equal to the length of moment magnitudes
#' @param Fault_Type A list of fault type indicators: 0 for unspecified fault;
#' 1 for strike-slip fault; 2 for normal fault; 3 for reverse fault.
#' The length should equal to the length of moment magnitudes
#' @param region A list of region indicators: 0 for global (incl. Taiwan); 1 for California;
#' 2 for Japan; 3 for China or Turkey; 4 for Italy. The length should equal to the length of moment magnitudes
#' @param z1 Basin depth (km): depth from the ground surface to the 1km/s shear-wave horizon.
#' -999 if unknown. A numeric value.
#' @param Vs30 Shear wave velocity averaged over top 30 m (in m/s). A numeric value.
#' @param coeffs The coefficient table of BSSA 2014. You can use the internal saved data object, bssa_2014_coeffs
#' @return A dataframe with four calculated columns, median/sigma/phi/tau. Each row is the calcualted values for each event.
#' @references Boore, D. M., Stewart, J. P., Seyhan, E., and Atkinson, G. M. (2014).
#' NGA-West2 Equations for Predicting PGA, PGV, and 5% Damped PSA for
#' Shallow Crustal Earthquakes. Earthquake Spectra, 30(3), 1057-1085.
#' @export
bssa_2014_nga <- function(M, period, Rjb, Fault_Type, region, z1, Vs30, coeffs) {
.Call('_RPSHA_bssa_2014_nga', PACKAGE = 'RPSHA', M, period, Rjb, Fault_Type, region, z1, Vs30, coeffs)
}
#' The subroutine of GMPE of BSSA 2014
#'
#' This is a subroutine of BSSA 2014
#' @useDynLib RPSHA
#' @importFrom Rcpp sourceCpp
#' @param M Moment magnitude, a numeric value
#' @param ip The index (starting from 0) of working period in the per-defined periods: (-1,
#' 0, 0.010, 0.020, 0.022, 0.025, 0.029, 0.030, 0.032, 0.035, 0.036, 0.040, 0.042,
#' 0.044, 0.045, 0.046, 0.048, 0.050, 0.055, 0.060, 0.065, 0.067, 0.070, 0.075,
#' 0.080, 0.085, 0.090, 0.095, 0.100, 0.110, 0.120, 0.130, 0.133, 0.140, 0.150,
#' 0.160, 0.170, 0.180, 0.190, 0.200, 0.220, 0.240, 0.250, 0.260, 0.280, 0.290,
#' 0.300, 0.320, 0.340, 0.350, 0.360, 0.380, 0.400, 0.420, 0.440, 0.450, 0.460,
#' 0.480, 0.500, 0.550, 0.600, 0.650, 0.667, 0.700, 0.750, 0.800, 0.850, 0.900,
#' 0.950, 1.000, 1.100, 1.200, 1.300, 1.400, 1.500, 1.600, 1.700, 1.800, 1.900,
#' 2.000, 2.200, 2.400, 2.500, 2.600, 2.800, 3.000, 3.200, 3.400, 3.500, 3.600,
#' 3.800, 4.000, 4.200, 4.400, 4.600, 4.800, 5.000, 5.500, 6.000, 6.500, 7.000,
#' 7.500, 8.000, 8.500, 9.000, 9.500, 10.000)
#' @param Rjb Joyner-Boore distance (km); closest distance (km) to surface
#' projection of rupture plane
#' @param U The indicator of fault type: 1 for unspecified fault, 0 for otherwise
#' @param SS The indicator of fault type: 1 for strike-slip fault, 0 for otherwise
#' @param NS The indicator of fault type: 1 for normal fault, 0 for otherwise
#' @param RS The indicator of fault type: 1 for reverse fault, 0 for otherwise
#' @param region Region indicator: 0 for global (incl. Taiwan); 1 for California;
#' 2 for Japan; 3 for China or Turkey; 4 for Italy
#' @param z1 Basin depth (km): depth from the ground surface to the 1km/s shear-wave horizon.
#' -999 if unknown.
#' @param Vs30 Shear wave velocity averaged over top 30 m (in m/s)
#' @param coeffs The coefficient table of BSSA 2014. You can use the internal saved data object, bssa_2014_coeffs
#' @return A list of four calculated results, median/sigma/phi/tau
#' @references Boore, D. M., Stewart, J. P., Seyhan, E., and Atkinson, G. M. (2014).
#' NGA-West2 Equations for Predicting PGA, PGV, and 5% Damped PSA for
#' Shallow Crustal Earthquakes. Earthquake Spectra, 30(3), 1057-1085.
#' @export
bssa_2014_subroutine <- function(M, ip, Rjb, U, SS, NS, RS, region, z1, Vs30, coeffs) {
.Call('_RPSHA_bssa_2014_subroutine', PACKAGE = 'RPSHA', M, ip, Rjb, U, SS, NS, RS, region, z1, Vs30, coeffs)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.