def momentrateFromStrainRateBarba(poly, strain_in, regime): """Compute seismic moment rate from Barba strain rate data set. Input: poly Area zone geometry as Shapely polygon strain_in Strain rate dataset as list of lists [ [lon, lat, value], ...] regime Dict of Shapely multipolygons for each deformation regime Currently only Continental (C) and Ridge-transform (R) implemented {'C': Multipolygon, 'R': Multipolygon} Output: momentrate moment rate computed from strain rate summed over area zone """ momentrate = 0.0 for (lon, lat, value) in strain_in: # make Shapely point from lon, lat point = shapely.geometry.Point((lon, lat)) # check if in area zone polygon # if positive, sum up strain rate contribution if poly.intersects(point) and value > 0.0: # get deformation regime regime_key = strain.tectonicRegimeForPoint(point, regime) # if point not in one of the tectonic regions, use value for # crustal if regime_key not in (strain.DEFORMATION_REGIME_KEY_C, strain.DEFORMATION_REGIME_KEY_R): regime_key = strain.DEFORMATION_REGIME_KEY_C # select value for coupled thickness (cz): # if crustal, use value of Continental Transform Fault # if ridge-transform: use value of Oceanic Transform Fault # unit: km if regime_key == strain.DEFORMATION_REGIME_KEY_C: cz = strain.BIRD_SEISMICITY_PARAMETERS[\ strain.DEFORMATION_REGIME_KEY_CTF]['cz'] else: cz = strain.BIRD_SEISMICITY_PARAMETERS[\ strain.DEFORMATION_REGIME_KEY_OTF]['cz'] momentrate += (cz * value) # Bird & Liu eq. 7B # Note: unit of values in Barba dataset is s^-1 # computed strain rate has unit # km * Pa / s = 1000 m * N / (m^2 * s) = 1000 (Nm/s) per m^2 # TODO(fab): double-check this !! # convert to strain rate per square kilometre: multiply with 10^-6 # return 1000 * cz * SHEAR_MODULUS * strainrate * 1.0e-6 return 1000 * SHEAR_MODULUS * momentrate
def momentrateFromStrainRateBird(poly, strain_in, regime): """Compute seismic moment rate from Bird strain rate data set. Input: poly Area zone geometry as Shapely polygon strain_in Strain rate dataset as list of lists [ [lat, lon, exx, eyy, exy], ...] regime Dict of Shapely multipolygons for each deformation regime Currently only Continental (C) and Ridge-transform (R) implemented {'C': Multipolygon, 'R': Multipolygon} Output: momentrate moment rate computed from strain rate summed over area zone """ momentrate = 0.0 for (lat, lon, exx, eyy, exy) in strain_in: # make Shapely point from lon, lat point = shapely.geometry.Point((lon, lat)) # check if in area zone polygon # TODO(fab): small area zones that do not include a strain rate # grid node if poly.intersects(point): # get deformation regime regime_key = strain.tectonicRegimeForPoint(point, regime) # select values for cz and mc if regime_key not in (strain.DEFORMATION_REGIME_KEY_C, strain.DEFORMATION_REGIME_KEY_R): # point not in available regimes, don't evaluate contribution # from this point continue else: (e1, e2, e3, e1h, e2h, err) = \ strain.strainRateComponentsFromDataset((exx, eyy, exy)) if regime_key == strain.DEFORMATION_REGIME_KEY_C: # continental regime if ( err <= strain.BIRD_CONTINENTAL_REGIME_COMPARISON_FACTOR * e2h \ and err >= strain.BIRD_CONTINENTAL_REGIME_COMPARISON_FACTOR * e1h): # strike-slip faulting dominates parameter_key = strain.DEFORMATION_REGIME_KEY_CTF elif \ err > strain.BIRD_CONTINENTAL_REGIME_COMPARISON_FACTOR * e2h: # thrust faulting dominates parameter_key = strain.DEFORMATION_REGIME_KEY_CCB else: # normal faulting dominates parameter_key = strain.DEFORMATION_REGIME_KEY_CRB elif regime_key == strain.DEFORMATION_REGIME_KEY_R: # ridge-transform regime if e1h >= 0.0: parameter_key = strain.DEFORMATION_REGIME_KEY_OSR elif e2h < 0.0: parameter_key = strain.DEFORMATION_REGIME_KEY_OCB elif (e1h * e2h < 0.0 and (e1h + e2h) >= 0.0): parameter_key = strain.DEFORMATION_REGIME_KEY_OTF elif (e1h * e2h < 0.0 and (e1h + e2h) < 0.0): parameter_key = strain.DEFORMATION_REGIME_KEY_OCB else: # never get here raise RuntimeError, \ "Unexpected case in ridge-transform regime" # TODO(fab): criterion for not adding contribution cz = strain.BIRD_SEISMICITY_PARAMETERS[parameter_key]['cz'] if e2 < 0: momentrate += (2 * cz * e3) else: momentrate += (2 * cz * -e1) # convert original unit of [10^-9 yr^-1] to [s^-1] return 1000 * SHEAR_MODULUS * 1.0e-9 * momentrate * (60 * 60 * 24 * 365.25)
def momentrateFromStrainRateBird(poly, strain_in, regime): """Compute seismic moment rate from Bird strain rate data set. Input: poly Area zone geometry as Shapely polygon strain_in Strain rate dataset as list of lists [ [lat, lon, exx, eyy, exy], ...] regime Dict of Shapely multipolygons for each deformation regime Currently only Continental (C) and Ridge-transform (R) implemented {'C': Multipolygon, 'R': Multipolygon} Output: momentrate moment rate computed from strain rate summed over area zone """ momentrate = 0.0 for (lat, lon, exx, eyy, exy) in strain_in: # make Shapely point from lon, lat point = shapely.geometry.Point((lon, lat)) # check if in area zone polygon # TODO(fab): small area zones that do not include a strain rate # grid node if poly.intersects(point): # get deformation regime regime_key = strain.tectonicRegimeForPoint(point, regime) # select values for cz and mc if regime_key not in (strain.DEFORMATION_REGIME_KEY_C, strain.DEFORMATION_REGIME_KEY_R): # point not in available regimes, don't evaluate contribution # from this point continue else: (e1, e2, e3, e1h, e2h, err) = \ strain.strainRateComponentsFromDataset((exx, eyy, exy)) if regime_key == strain.DEFORMATION_REGIME_KEY_C: # continental regime if ( err <= strain.BIRD_CONTINENTAL_REGIME_COMPARISON_FACTOR * e2h \ and err >= strain.BIRD_CONTINENTAL_REGIME_COMPARISON_FACTOR * e1h): # strike-slip faulting dominates parameter_key = strain.DEFORMATION_REGIME_KEY_CTF elif \ err > strain.BIRD_CONTINENTAL_REGIME_COMPARISON_FACTOR * e2h: # thrust faulting dominates parameter_key = strain.DEFORMATION_REGIME_KEY_CCB else: # normal faulting dominates parameter_key = strain.DEFORMATION_REGIME_KEY_CRB elif regime_key == strain.DEFORMATION_REGIME_KEY_R: # ridge-transform regime if e1h >= 0.0: parameter_key = strain.DEFORMATION_REGIME_KEY_OSR elif e2h < 0.0: parameter_key = strain.DEFORMATION_REGIME_KEY_OCB elif (e1h * e2h < 0.0 and (e1h + e2h) >= 0.0): parameter_key = strain.DEFORMATION_REGIME_KEY_OTF elif (e1h * e2h < 0.0 and (e1h + e2h) < 0.0): parameter_key = strain.DEFORMATION_REGIME_KEY_OCB else: # never get here raise RuntimeError, \ "Unexpected case in ridge-transform regime" # TODO(fab): criterion for not adding contribution cz = strain.BIRD_SEISMICITY_PARAMETERS[parameter_key]['cz'] if e2 < 0: momentrate += (2 * cz * e3) else: momentrate += (2 * cz * -e1) # convert original unit of [10^-9 yr^-1] to [s^-1] return 1000 * SHEAR_MODULUS * 1.0e-9 * momentrate * ( 60 * 60 * 24 * 365.25)