Skip to content
Snippets Groups Projects
Commit b9d5a854 authored by Powers, Peter M.'s avatar Powers, Peter M.
Browse files

added AK 2007 e-2- unit tests

parent bed7c5bf
No related branches found
No related tags found
2 merge requests!730Production Release | nshmp-haz,!727Deploy AK 2007
......@@ -5,7 +5,7 @@ nshms:
# Alaska 2023 NSHM
-
repo: nshm-alaska
tag: 2.1.0
tag: 2.2.0
year: 2007
deployments:
development:
......
......@@ -33,7 +33,6 @@ import gov.usgs.earthquake.nshmp.calc.Site;
import gov.usgs.earthquake.nshmp.data.XySequence;
import gov.usgs.earthquake.nshmp.geo.Location;
import gov.usgs.earthquake.nshmp.gmm.Imt;
import io.swagger.v3.core.util.Yaml;
/**
......@@ -55,7 +54,6 @@ class NshmTestUtils {
*/
static NshmModel loadModel(Nshm nshm) {
int cores = Runtime.getRuntime().availableProcessors();
return new NshmModel(
nshm,
ModelLoader.load(nshm.modelPath()),
......
......@@ -48,6 +48,7 @@ class NshmTests {
NshmpSite.KAILUA_KONA_HI);
private static final Set<Imt> IMTS = EnumSet.of(Imt.PGA, Imt.SA0P2, Imt.SA1P0, Imt.SA5P0);
private static final Set<Imt> AK_2007_IMTS = EnumSet.of(Imt.PGA, Imt.SA0P2, Imt.SA1P0);
private static final Map<String, Nshm> NSHMS;
......@@ -56,6 +57,7 @@ class NshmTests {
for (NshmInfo nshmInfo : NshmTestUtils.readNshms().nshms) {
List<NamedLocation> locations = new ArrayList<>();
Set<Imt> imts = IMTS;
switch (nshmInfo.repo) {
case "nshm-conus": {
......@@ -64,6 +66,9 @@ class NshmTests {
}
case "nshm-alaska": {
locations = ALASKA_LOCATIONS;
if (nshmInfo.year == 2007) {
imts = AK_2007_IMTS;
}
break;
}
case "nshm-hawaii": {
......@@ -74,7 +79,7 @@ class NshmTests {
throw new RuntimeException(nshmInfo.repo + " not supported");
}
nshms.put(nshmInfo.repo + "-" + nshmInfo.year, new Nshm(nshmInfo, locations, IMTS));
nshms.put(nshmInfo.repo + "-" + nshmInfo.year, new Nshm(nshmInfo, locations, imts));
}
NSHMS = nshms;
......@@ -90,7 +95,8 @@ class NshmTests {
// run single model
NshmModel nshmModel =
NshmTestUtils.loadModel(NSHMS.get("nshm-conus-2007"));
NshmTestUtils.loadModel(NSHMS.get("nshm-alaska-2007"));
NshmTestUtils.writeExpecteds(nshmModel);
nshmModel.exec.shutdown();
......
{
"1.00 Second Spectral Acceleration": {
"xs": [
-5.991464547107982,
-5.585999438999818,
-5.181423615076537,
-4.775958506968373,
-4.374058465024705,
-3.9633162998156966,
-3.5613661338149765,
-3.1535563587475584,
-2.7488721956224653,
-2.3434070875143007,
-1.9379419794061366,
-1.5324768712979722,
-1.1270117631898076,
-0.7215466550816433,
-0.31608154697347896,
0.08617769624105241,
0.494696241836107,
0.9001613499442714,
1.3056264580524357,
1.7119945007591924
],
"ys": [
1.216784296389448,
1.001712499365357,
0.7796429247164196,
0.5719011068498189,
0.39834574699730324,
0.2617839994778919,
0.1660428466673632,
0.10003334171779812,
0.05737347098846019,
0.030619419719839037,
0.014904607266644073,
0.006565568384584038,
0.0026793854641647477,
0.0010416460147385325,
3.629137895691359E-4,
9.82623278317095E-5,
1.5879665844816693E-5,
6.648778909021348E-7,
1.7997491318464683E-12,
0.0
]
},
"Peak Ground Acceleration": {
"xs": [
-6.061887011404528,
-5.654992310486769,
-5.251433780649187,
-4.845968672541022,
-4.439655747510518,
-4.034190639402354,
-3.6306105459899607,
-3.223888366691745,
-2.8184232585835804,
-2.4123999590012524,
-2.0099154790312257,
-1.5994875815809322,
-1.1973282616072674,
-0.789658080940789,
-0.3856624808119846,
0.01980262729617973,
0.4252677354043441,
0.8329091229351039,
1.235471471385307,
1.6428726885203377
],
"ys": [
1.65397819274769,
1.4774726044583617,
1.2707743009482835,
1.0374950532982243,
0.7909487640658447,
0.5566615888725722,
0.3627089251747853,
0.22040790487251347,
0.12651798364766775,
0.06757725919698641,
0.033002677733662764,
0.014271739151160378,
0.005693025514814955,
0.0019431717707338516,
4.8730752588366135E-4,
7.326467022422194E-5,
5.361893639138177E-6,
2.0660199338622954E-7,
3.1708663587822375E-10,
0.0
]
},
"0.20 Second Spectral Acceleration": {
"xs": [
-5.704782974989785,
-5.30031936921871,
-4.8941864814530085,
-4.491841500681089,
-4.080441657053109,
-3.6769508832486624,
-3.2728041668937564,
-2.866459937849852,
-2.4615808244845034,
-2.05572501506252,
-1.6502599069543555,
-1.2447947988461912,
-0.8393296907380268,
-0.4338645826298623,
-0.028399474521698,
0.37843643572024505,
0.7839015438284094,
1.1878434223960523,
1.5933085305042167,
1.998773638612381
],
"ys": [
1.722096296877698,
1.57398677222407,
1.3948514208523581,
1.1868737782914325,
0.9486733636220279,
0.7100408174082283,
0.4947271612575376,
0.32261569377545196,
0.19947502689884467,
0.11681594901507046,
0.06395461351278024,
0.031884675080501315,
0.014271993188868275,
0.005793050581460287,
0.002121342475395979,
6.235952081095882E-4,
1.226785445725974E-4,
1.4246353621355988E-5,
9.352016591244695E-7,
4.253931015422376E-8
]
}
}
\ No newline at end of file
{
"1.00 Second Spectral Acceleration": {
"xs": [
-5.991464547107982,
-5.585999438999818,
-5.181423615076537,
-4.775958506968373,
-4.374058465024705,
-3.9633162998156966,
-3.5613661338149765,
-3.1535563587475584,
-2.7488721956224653,
-2.3434070875143007,
-1.9379419794061366,
-1.5324768712979722,
-1.1270117631898076,
-0.7215466550816433,
-0.31608154697347896,
0.08617769624105241,
0.494696241836107,
0.9001613499442714,
1.3056264580524357,
1.7119945007591924
],
"ys": [
0.3464423908576828,
0.2746884250513254,
0.20330958648206365,
0.14036328868086187,
0.0915012349273498,
0.056022641564065334,
0.03311999914335675,
0.0185713164570039,
0.009917617739224244,
0.004934944876941708,
0.002246095428853393,
9.151846593388017E-4,
3.2672748123260695E-4,
9.811837073821066E-5,
2.4114425298279172E-5,
4.475413565666441E-6,
4.930242108836648E-7,
2.0581607286335368E-8,
3.9947818607662745E-11,
0.0
]
},
"Peak Ground Acceleration": {
"xs": [
-6.061887011404528,
-5.654992310486769,
-5.251433780649187,
-4.845968672541022,
-4.439655747510518,
-4.034190639402354,
-3.6306105459899607,
-3.223888366691745,
-2.8184232585835804,
-2.4123999590012524,
-2.0099154790312257,
-1.5994875815809322,
-1.1973282616072674,
-0.789658080940789,
-0.3856624808119846,
0.01980262729617973,
0.4252677354043441,
0.8329091229351039,
1.235471471385307,
1.6428726885203377
],
"ys": [
0.42512155522078154,
0.3741248597866011,
0.3152726977613771,
0.2491485882595672,
0.1799327453137114,
0.11646001961850086,
0.06764399484522848,
0.035703098745247346,
0.017700600181056944,
0.00837961685899477,
0.0038272935587927537,
0.0016232798394108885,
6.340002373559136E-4,
2.0468430635468642E-4,
5.011845527471985E-5,
7.698786233975062E-6,
5.300404641363028E-7,
3.548535310227123E-9,
0.0,
0.0
]
},
"0.20 Second Spectral Acceleration": {
"xs": [
-5.704782974989785,
-5.30031936921871,
-4.8941864814530085,
-4.491841500681089,
-4.080441657053109,
-3.6769508832486624,
-3.2728041668937564,
-2.866459937849852,
-2.4615808244845034,
-2.05572501506252,
-1.6502599069543555,
-1.2447947988461912,
-0.8393296907380268,
-0.4338645826298623,
-0.028399474521698,
0.37843643572024505,
0.7839015438284094,
1.1878434223960523,
1.5933085305042167,
1.998773638612381
],
"ys": [
0.4639164930556865,
0.42128555188145733,
0.3691183172602479,
0.30700991917468584,
0.2352268775263029,
0.1653869037122999,
0.10623707402118183,
0.06272553775403064,
0.03469716969315349,
0.018259778334807297,
0.009222357093637543,
0.004424577781715228,
0.00198392813312124,
8.083322813290075E-4,
2.830172399074972E-4,
7.925255124903666E-5,
1.5951797142877935E-5,
1.963226654943825E-6,
1.089640439801509E-7,
2.452338948529823E-10
]
}
}
\ No newline at end of file
{
"1.00 Second Spectral Acceleration": {
"xs": [
-5.991464547107982,
-5.585999438999818,
-5.181423615076537,
-4.775958506968373,
-4.374058465024705,
-3.9633162998156966,
-3.5613661338149765,
-3.1535563587475584,
-2.7488721956224653,
-2.3434070875143007,
-1.9379419794061366,
-1.5324768712979722,
-1.1270117631898076,
-0.7215466550816433,
-0.31608154697347896,
0.08617769624105241,
0.494696241836107,
0.9001613499442714,
1.3056264580524357,
1.7119945007591924
],
"ys": [
0.14018496089247262,
0.1082180504924474,
0.07924233732120106,
0.05582782598193431,
0.03894598542891116,
0.027051416538377965,
0.018782546895544608,
0.012334737104400877,
0.007428193921599053,
0.004041166881254465,
0.0019814162270296912,
8.466167136800707E-4,
2.985332224552966E-4,
8.107412195629211E-5,
1.5578100036615844E-5,
2.0319947482407376E-6,
1.7178404489425482E-7,
2.9031224848126113E-9,
3.2000505378803756E-12,
0.0
]
},
"Peak Ground Acceleration": {
"xs": [
-6.061887011404528,
-5.654992310486769,
-5.251433780649187,
-4.845968672541022,
-4.439655747510518,
-4.034190639402354,
-3.6306105459899607,
-3.223888366691745,
-2.8184232585835804,
-2.4123999590012524,
-2.0099154790312257,
-1.5994875815809322,
-1.1973282616072674,
-0.789658080940789,
-0.3856624808119846,
0.01980262729617973,
0.4252677354043441,
0.8329091229351039,
1.235471471385307,
1.6428726885203377
],
"ys": [
0.16119691921728796,
0.13873414272430967,
0.11495867702672521,
0.08962877562496549,
0.06406406418411464,
0.04146443536571581,
0.024584756227350266,
0.013434411687047471,
0.006749211263866024,
0.0030316026784251,
0.0012097560999651123,
4.1753422654192433E-4,
1.255941387114207E-4,
2.8891731713975016E-5,
4.9391883396298844E-6,
6.333607105458819E-7,
4.213447857938414E-8,
2.8098517790646575E-10,
0.0,
0.0
]
},
"0.20 Second Spectral Acceleration": {
"xs": [
-5.704782974989785,
-5.30031936921871,
-4.8941864814530085,
-4.491841500681089,
-4.080441657053109,
-3.6769508832486624,
-3.2728041668937564,
-2.866459937849852,
-2.4615808244845034,
-2.05572501506252,
-1.6502599069543555,
-1.2447947988461912,
-0.8393296907380268,
-0.4338645826298623,
-0.028399474521698,
0.37843643572024505,
0.7839015438284094,
1.1878434223960523,
1.5933085305042167,
1.998773638612381
],
"ys": [
0.18505130966174427,
0.16345119360758736,
0.13975659408596586,
0.11382259847142859,
0.08555542293931166,
0.05945984027585358,
0.03845004207648512,
0.02325634313827287,
0.01311636208532044,
0.006922451437616338,
0.0034286644021358924,
0.001520932694912381,
5.788668145749388E-4,
1.850169501925151E-4,
4.846642143656083E-5,
9.96081599232255E-6,
1.5784375508128453E-6,
1.6294075376712294E-7,
8.817948928079425E-9,
1.972572104269551E-11
]
}
}
\ No newline at end of file
{
"1.00 Second Spectral Acceleration": {
"xs": [
-5.991464547107982,
-5.585999438999818,
-5.181423615076537,
-4.775958506968373,
-4.374058465024705,
-3.9633162998156966,
-3.5613661338149765,
-3.1535563587475584,
-2.7488721956224653,
-2.3434070875143007,
-1.9379419794061366,
-1.5324768712979722,
-1.1270117631898076,
-0.7215466550816433,
-0.31608154697347896,
0.08617769624105241,
0.494696241836107,
0.9001613499442714,
1.3056264580524357,
1.7119945007591924
],
"ys": [
1.0202890885330151,
0.8375083352263466,
0.6475662303710862,
0.4707918425427096,
0.32519272294896445,
0.21283124141356322,
0.13574097527098886,
0.08381717413931657,
0.05102722546305094,
0.030533684096192584,
0.017757505947837975,
0.009779208536822154,
0.00495739062237132,
0.00223748814778023,
8.360775271106734E-4,
2.3127145518716242E-4,
3.908766959259963E-5,
2.5626815539339554E-6,
0.0,
0.0
]
},
"Peak Ground Acceleration": {
"xs": [
-6.061887011404528,
-5.654992310486769,
-5.251433780649187,
-4.845968672541022,
-4.439655747510518,
-4.034190639402354,
-3.6306105459899607,
-3.223888366691745,
-2.8184232585835804,
-2.4123999590012524,
-2.0099154790312257,
-1.5994875815809322,
-1.1973282616072674,
-0.789658080940789,
-0.3856624808119846,
0.01980262729617973,
0.4252677354043441,
0.8329091229351039,
1.235471471385307,
1.6428726885203377
],
"ys": [
1.3143840761818835,
1.1715241821556248,
1.0073110589775853,
0.822439125345779,
0.625115708600688,
0.4357796832874383,
0.2795278984445908,
0.16752488019629042,
0.09692443479191427,
0.05487333213721911,
0.030272844286145184,
0.015399970754471155,
0.007108660320946837,
0.0027335226497319045,
7.558825338514728E-4,
1.1765771038459163E-4,
6.310901665123947E-6,
2.450787801717188E-7,
3.507351114684557E-10,
0.0
]
},
"0.20 Second Spectral Acceleration": {
"xs": [
-5.704782974989785,
-5.30031936921871,
-4.8941864814530085,
-4.491841500681089,
-4.080441657053109,
-3.6769508832486624,
-3.2728041668937564,
-2.866459937849852,
-2.4615808244845034,
-2.05572501506252,
-1.6502599069543555,
-1.2447947988461912,
-0.8393296907380268,
-0.4338645826298623,
-0.028399474521698,
0.37843643572024505,
0.7839015438284094,
1.1878434223960523,
1.5933085305042167,
1.998773638612381
],
"ys": [
1.3878090480442422,
1.2678189199286058,
1.1244476634474234,
0.9577566116756505,
0.7648024244341658,
0.5696821914048495,
0.3936262320736718,
0.25445762904341573,
0.1571249991498746,
0.094043350911653,
0.0551398685546081,
0.03136425581007428,
0.016788523699286094,
0.008121696981340598,
0.0033908803225935636,
0.0010922520629723033,
2.2741198895158383E-4,
2.4083912692036422E-5,
1.1325656884416224E-6,
5.171979288734243E-8
]
}
}
\ No newline at end of file
{
"1.00 Second Spectral Acceleration": {
"xs": [
-5.991464547107982,
-5.585999438999818,
-5.181423615076537,
-4.775958506968373,
-4.374058465024705,
-3.9633162998156966,
-3.5613661338149765,
-3.1535563587475584,
-2.7488721956224653,
-2.3434070875143007,
-1.9379419794061366,
-1.5324768712979722,
-1.1270117631898076,
-0.7215466550816433,
-0.31608154697347896,
0.08617769624105241,
0.494696241836107,
0.9001613499442714,
1.3056264580524357,
1.7119945007591924
],
"ys": [
0.8012677504331033,
0.6573423103469673,
0.5063567337421476,
0.3656761465287457,
0.24998725414520195,
0.16073387876630174,
0.09954072289402163,
0.05862243229234874,
0.03334265172051943,
0.01827894445150576,
0.009656941823402142,
0.004895423521973996,
0.002401904041828213,
0.0011587127756169883,
5.217832797347172E-4,
1.8943907736914238E-4,
4.520195530459815E-5,
5.9031694728150844E-6,
0.0,
0.0
]
},
"Peak Ground Acceleration": {
"xs": [
-6.061887011404528,
-5.654992310486769,
-5.251433780649187,
-4.845968672541022,
-4.439655747510518,
-4.034190639402354,
-3.6306105459899607,
-3.223888366691745,
-2.8184232585835804,
-2.4123999590012524,
-2.0099154790312257,
-1.5994875815809322,
-1.1973282616072674,
-0.789658080940789,
-0.3856624808119846,
0.01980262729617973,
0.4252677354043441,
0.8329091229351039,
1.235471471385307,
1.6428726885203377
],
"ys": [
1.0038320165648558,
0.9057705268649427,
0.7875249886419105,
0.646418900623757,
0.4882256711176156,
0.33264280767940735,
0.20478981928867987,
0.11605620823277465,
0.0631495460606707,
0.033670693646757656,
0.017560259407659134,
0.00853103150445209,
0.003921440108418463,
0.0016798703505209835,
6.031299483740042E-4,
1.304993686643946E-4,
1.2042480549777548E-5,
2.2852168444346527E-7,
3.1708663587822375E-10,
0.0
]
},
"0.20 Second Spectral Acceleration": {
"xs": [
-5.704782974989785,
-5.30031936921871,
-4.8941864814530085,
-4.491841500681089,
-4.080441657053109,
-3.6769508832486624,
-3.2728041668937564,
-2.866459937849852,
-2.4615808244845034,
-2.05572501506252,
-1.6502599069543555,
-1.2447947988461912,
-0.8393296907380268,
-0.4338645826298623,
-0.028399474521698,
0.37843643572024505,
0.7839015438284094,
1.1878434223960523,
1.5933085305042167,
1.998773638612381
],
"ys": [
1.0667638963335844,
0.9865827154981542,
0.8856938430755091,
0.7608557925362749,
0.608087709906037,
0.44839060199479647,
0.30290260055542356,
0.18897128034685856,
0.1114445428191399,
0.06331826478144816,
0.035125825079706796,
0.01885795753078175,
0.0095744801255221,
0.004527700423457455,
0.002011162445869445,
7.907593732871031E-4,
2.229299254168037E-4,
3.484169813642111E-5,
1.6439194740510125E-6,
4.675795093996697E-8
]
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment