示例#1
0
文件: Swiss.java 项目: SED-EEW/EEWD
  @Override
  public Shaking getPSA(
      double magnitude,
      double sourceLat,
      double sourceLon,
      double sourceDepthM,
      double targetLat,
      double targetLon,
      double targetElevM,
      String amplificationType,
      double amplificationProxyValueSI,
      double period,
      EventParameters eventParameters) {

    // Returns median PSA, 16th-percentile PSA, 84th percentile PSA in m/s2 for a given spectral
    // period T
    // Mag is the magnitude from the EW message
    // ampType in Switzerland is deltaI, i.e. intensity increments
    // Coefficients are region dependent, i.e. different in the Swiss Alps and in the Swiss Foreland
    double rmin = 3; // set cut-off distance
    double Mw = magnitude; // reasonable assumption in CH
    double[][] cofs = getCofs(sourceLat, sourceLon);

    int cnt = 0; // init
    double sigma = 0; // init
    double amp = 1; // init

    // Compute hypocentral distance
    double[] pEvent = GeoCalc.Geo2Cart(sourceLat, sourceLon, -sourceDepthM);
    double[] pTarget = GeoCalc.Geo2Cart(targetLat, targetLon, targetElevM);
    double distance = GeoCalc.Distance3D(pEvent, pTarget);

    double Rh = distance / 1000; // in kilometers

    // end of hypocentral distance computation
    // Assume Rrup ~ Rh
    double Rrup = Rh;
    // else estimate Rrup based on Cauzzi et al. (2014)

    if (Mw >= 5.8) {
      Rrup =
          Rh
              + 7.5 * Mw
              - 38
              - 1.38
              - 0.014
                  * exp(
                      Mw); // 7.5 * Mw + 38 included to avoid negative distances at points with Rh =
                           // 0 ...
    }

    // define the distance cut-off
    double Ru = max(rmin, Rrup);

    // define the distance metric used in the attenuation formulas
    double d = log10(Ru);

    // pick the right coefficients according to the spectral period
    if (period == 0.01) {
      cnt = 1;
      sigma = 0.3346;
      amp = 2.58;
    } else if (period == 0.02) {
      cnt = 2;
      sigma = 0.3346;
      amp = 2.57;

    } else if (period == 0.03) {
      cnt = 3;
      sigma = 0.3346;
      amp = 2.57;

    } else if (period == 0.05) {
      cnt = 4;
      sigma = 0.3348;
      amp = 2.56;

    } else if (period == 0.1) {
      cnt = 5;
      sigma = 0.2953;
      amp = 2.55;

    } else if (period == 0.2) {
      cnt = 6;
      sigma = 0.2884;
      amp = 2.52;

    } else if (period == 0.4) {
      cnt = 7;
      sigma = 0.2641;
      amp = 2.47;

    } else if (period == 1) {
      cnt = 8;
      sigma = 0.2751;
      amp = 2.29;

    } else if (period == 2) {
      cnt = 9;
      sigma = 0.2840;
      amp = 2.01;
    }

    double logpsa =
        cofs[cnt][0]
            + cofs[cnt][1] * Mw
            + cofs[cnt][2] * pow(Mw, 2)
            + cofs[cnt][3] * pow(Mw, 3)
            + cofs[cnt][4] * pow(Mw, 4)
            + cofs[cnt][5] * pow(Mw, 5)
            + cofs[cnt][6] * pow(Mw, 6)
            + (cofs[cnt][7]
                    + cofs[cnt][8] * Mw
                    + cofs[cnt][9] * pow(Mw, 2)
                    + cofs[cnt][10] * pow(Mw, 3))
                * d
            + (cofs[cnt][11]
                    + cofs[cnt][12] * Mw
                    + cofs[cnt][13] * pow(Mw, 2)
                    + cofs[cnt][14] * pow(Mw, 3))
                * pow(d, 2)
            + (cofs[cnt][15]
                    + cofs[cnt][16] * Mw
                    + cofs[cnt][17] * pow(Mw, 2)
                    + cofs[cnt][18] * pow(Mw, 3))
                * pow(d, 3)
            + (cofs[cnt][19]
                    + cofs[cnt][20] * Mw
                    + cofs[cnt][21] * pow(Mw, 2)
                    + cofs[cnt][22] * pow(Mw, 3))
                * pow(d, 4);

    // Now add site term
    double logpsasite = logpsa + (amplificationProxyValueSI / amp);

    // Now compute plus/minus sigma bounds
    double logpsasiteplus = logpsasite + sigma;
    double logpsasiteminus = logpsasite - sigma;

    // Now in m/s2
    Shaking PSA = new Shaking();
    PSA.expectedSI = pow(10, logpsasite) / 100;
    PSA.percentile84 = pow(10, logpsasiteplus) / 100;
    PSA.percentile16 = pow(10, logpsasiteminus) / 100;

    // Now should return Shaking ...
    return PSA;
  }
示例#2
0
文件: Swiss.java 项目: SED-EEW/EEWD
  @Override
  public Shaking getPGV(
      double Mag,
      double sourceLat,
      double sourceLon,
      double sourceDepthM,
      double targetLat,
      double targetLon,
      double targetElevM,
      String amplificationType,
      double amplificationProxyValueSI,
      EventParameters eventParameters) {

    // Returns median PGV, 16th-percentile PGV, 84th percentile PGV in m/s
    // Mag is the magnitude from the EW message
    // ampType in Switzerland is deltaI, i.e. intensity increments
    // GMP coefficients are region dependent, i.e. different in the Swiss Alps and in the Swiss
    // Foreland
    double rmin = 3; // set cut-off distance
    double Mw = Mag; // reasonable assumption in CH
    double[][] cofs = getCofs(sourceLat, sourceLon);

    // Compute hypocentral distance
    double[] pEvent = GeoCalc.Geo2Cart(sourceLat, sourceLon, -sourceDepthM);
    double[] pTarget = GeoCalc.Geo2Cart(targetLat, targetLon, targetElevM);
    double distance = GeoCalc.Distance3D(pEvent, pTarget);

    double Rh = distance / 1000; // in kilometers

    // end of hypocentral distance computation
    // Assume Rrup ~ Rh
    double Rrup = Rh;
    // else estimate Rrup based on Cauzzi et al. (2014)

    if (Mw >= 5.8) {
      Rrup =
          Rh
              + 7.5 * Mw
              - 38
              - 1.38
              - 0.014
                  * exp(
                      Mw); // 7.5 * Mw + 38 included to avoid negative distances at points with Rh =
                           // 0 ...
    }

    // define the distance cut-off
    double Ru = max(rmin, Rrup);

    // define the distance metric used in the attenuation formulas
    double d = log10(Ru);

    double logpgv =
        cofs[10][0]
            + cofs[10][1] * Mw
            + cofs[10][2] * pow(Mw, 2)
            + cofs[10][3] * pow(Mw, 3)
            + cofs[10][4] * pow(Mw, 4)
            + cofs[10][5] * pow(Mw, 5)
            + cofs[10][6] * pow(Mw, 6)
            + (cofs[10][7]
                    + cofs[10][8] * Mw
                    + cofs[10][9] * pow(Mw, 2)
                    + cofs[10][10] * pow(Mw, 3))
                * d
            + (cofs[10][11]
                    + cofs[10][12] * Mw
                    + cofs[10][13] * pow(Mw, 2)
                    + cofs[10][14] * pow(Mw, 3))
                * pow(d, 2)
            + (cofs[10][15]
                    + cofs[10][16] * Mw
                    + cofs[10][17] * pow(Mw, 2)
                    + cofs[10][18] * pow(Mw, 3))
                * pow(d, 3)
            + (cofs[10][19]
                    + cofs[10][20] * Mw
                    + cofs[10][21] * pow(Mw, 2)
                    + cofs[10][22] * pow(Mw, 3))
                * pow(d, 4);

    // Now add site term
    double logpgvsite = logpgv + (amplificationProxyValueSI / 2.35);

    // Now compute plus/minus sigma bounds
    double sigma = 0.2953;
    double logpgvsiteplus = logpgvsite + sigma;
    double logpgvsiteminus = logpgvsite - sigma;

    // Now in m/s
    Shaking PGV = new Shaking();
    PGV.expectedSI = pow(10, logpgvsite) / 100;
    PGV.percentile84 = pow(10, logpgvsiteplus) / 100;
    PGV.percentile16 = pow(10, logpgvsiteminus) / 100;

    // Now should return Shaking ...
    return PGV;
  }