Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-lib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ghsc
National Seismic Hazard Model Project
nshmp-lib
Commits
5a8b8a5e
Commit
5a8b8a5e
authored
1 month ago
by
Powers, Peter M.
Browse files
Options
Downloads
Patches
Plain Diff
MA_03 implementation
parent
d2d881bc
No related branches found
No related tags found
1 merge request
!445
PRVI legacy gmms
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/gov/usgs/earthquake/nshmp/gmm/MotazedianAtkinson_2003.java
+131
-0
131 additions, 0 deletions
...ov/usgs/earthquake/nshmp/gmm/MotazedianAtkinson_2003.java
src/main/resources/gmm/coeffs/MotazedianAtkinson03.csv
+4
-0
4 additions, 0 deletions
src/main/resources/gmm/coeffs/MotazedianAtkinson03.csv
with
135 additions
and
0 deletions
src/main/java/gov/usgs/earthquake/nshmp/gmm/MotazedianAtkinson_2003.java
0 → 100644
+
131
−
0
View file @
5a8b8a5e
package
gov.usgs.earthquake.nshmp.gmm
;
import
static
gov
.
usgs
.
earthquake
.
nshmp
.
gmm
.
GmmInput
.
Field
.
MW
;
import
static
gov
.
usgs
.
earthquake
.
nshmp
.
gmm
.
GmmInput
.
Field
.
RRUP
;
import
static
gov
.
usgs
.
earthquake
.
nshmp
.
gmm
.
GmmInput
.
Field
.
VS30
;
import
static
gov
.
usgs
.
earthquake
.
nshmp
.
gmm
.
GmmUtils
.
BASE_10_TO_E
;
import
static
gov
.
usgs
.
earthquake
.
nshmp
.
gmm
.
GmmUtils
.
LN_G_CM_TO_M
;
import
static
java
.
lang
.
Math
.
log10
;
import
static
java
.
lang
.
Math
.
sqrt
;
import
java.util.Map
;
import
com.google.common.collect.Range
;
import
gov.usgs.earthquake.nshmp.gmm.GmmInput.Constraints
;
import
gov.usgs.earthquake.nshmp.tree.LogicTree
;
/**
* Implementation of the preliminary MA05 model that was used for PRVI.
* Functional form is the same as MA05 with diffeent coefficients and constants.
* Coefficients were gleaned from forttran codes and only three IMTs are
* supported (PGA, 0.2 s, and 1 s).
*
* <p><b>Component:</b> not specified (avg horizontal implied)
*
* @author U.S. Geological Survey
* @see MotazedianAtkinson_2005
* @see Gmm#MA_03_PRVI
*/
public
class
MotazedianAtkinson_2003
implements
GroundMotionModel
{
static
final
String
NAME
=
"Motazedian & Atkinson (2003) PRVI Preliminary"
;
static
final
Constraints
CONSTRAINTS
=
Constraints
.
builder
()
.
set
(
MW
,
Range
.
closed
(
4.0
,
9.5
))
.
set
(
RRUP
,
Range
.
closed
(
0.0
,
1000.0
))
.
set
(
VS30
,
Range
.
closedOpen
(
150.0
,
1500.0
))
.
build
();
static
final
CoefficientContainer
COEFFS
=
new
CoefficientContainer
(
"MotazedianAtkinson03.csv"
);
// distance centering coefficients
private
static
final
double
C5
=
-
7.333
;
private
static
final
double
C6
=
2.333
;
// hinge function coefficients
private
static
final
double
C7
=
-
1.88
;
private
static
final
double
C8
=
0.14
;
private
static
final
double
DIST_HINGE_LOWER
=
75.0
;
private
static
final
double
DIST_HINGE_UPPER
=
100.0
;
// convert log10 sigma to ln
private
static
final
double
SIGMA
=
0.28
*
BASE_10_TO_E
;
private
static
final
class
Coefficients
{
final
Imt
imt
;
final
double
c1
,
c2
,
c3
,
c4
;
Coefficients
(
Imt
imt
,
CoefficientContainer
cc
)
{
this
.
imt
=
imt
;
Map
<
String
,
Double
>
coeffs
=
cc
.
get
(
imt
);
c1
=
coeffs
.
get
(
"c1"
);
c2
=
coeffs
.
get
(
"c2"
);
c3
=
coeffs
.
get
(
"c3"
);
c4
=
coeffs
.
get
(
"c4"
);
}
}
private
final
Coefficients
coeffs
;
MotazedianAtkinson_2003
(
Imt
imt
)
{
coeffs
=
new
Coefficients
(
imt
,
COEFFS
);
}
@Override
public
Imt
imt
()
{
return
coeffs
.
imt
;
}
@Override
public
LogicTree
<
GroundMotion
>
calc
(
GmmInput
in
)
{
return
calc
(
coeffs
,
in
);
}
private
static
LogicTree
<
GroundMotion
>
calc
(
Coefficients
c
,
GmmInput
in
)
{
double
μ
=
calcMean
(
c
,
in
.
rRup
,
in
.
Mw
);
return
GroundMotions
.
createTree
(
μ
,
SIGMA
);
}
private
static
final
double
calcMean
(
Coefficients
c
,
double
rRup
,
double
Mw
)
{
/* Eq. 6, log10(PSA) in cm/s/s */
double
r
=
getR
(
rRup
,
Mw
);
double
hingeFunction
=
getHingeFunction
(
r
,
Mw
);
double
μ
=
c
.
c1
+
c
.
c2
*
(
Mw
-
6
)
+
c
.
c3
*
(
Mw
-
6
)
*
(
Mw
-
6
)
+
hingeFunction
+
c
.
c4
*
r
;
// convert from base 10 to base e and from cm/s/s to g
return
μ
*
BASE_10_TO_E
-
LN_G_CM_TO_M
;
}
private
static
final
double
getR
(
double
rRup
,
double
Mw
)
{
// Equation and coefficients defined in Table 2 caption
double
delta
=
C5
+
C6
*
Mw
;
return
sqrt
(
rRup
*
rRup
+
delta
*
delta
);
}
private
static
final
double
getHingeFunction
(
double
dist
,
double
Mw
)
{
// Equation and coefficients defined in Table 2 caption
double
mFac
=
C7
+
C8
*
Mw
;
if
(
dist
<=
DIST_HINGE_LOWER
)
{
// R <= 75 km
return
mFac
*
log10
(
dist
);
}
else
if
(
dist
<=
DIST_HINGE_UPPER
)
{
// 75 km < R <= 100 km
return
mFac
*
log10
(
DIST_HINGE_LOWER
);
}
else
{
// R >= 100 km
return
mFac
*
log10
(
DIST_HINGE_LOWER
)
-
0.5
*
log10
(
dist
/
DIST_HINGE_UPPER
);
}
}
}
This diff is collapsed.
Click to expand it.
src/main/resources/gmm/coeffs/MotazedianAtkinson03.csv
0 → 100644
+
4
−
0
View file @
5a8b8a5e
T, c1, c2, c3, c4
PGA, 3.87, 0.39062, -0.11289, -0.00213
0.2, 4.33, 0.38815, -0.13977, -0.00189
1, 3.40, 0.64818, -0.15222, -0.00091
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment