Skip to content
Snippets Groups Projects
Commit cd6a0474 authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

Merge branch 'main' into 'production'

Production Release | nshmp-haz

See merge request !730
parents 6084bf27 357049eb
No related branches found
No related tags found
1 merge request!730Production Release | nshmp-haz
Pipeline #282740 passed
Showing
with 759 additions and 5 deletions
......@@ -245,6 +245,7 @@ NSHM Tests:
needs: []
parallel:
matrix:
- CMD: testAlaska2007
- CMD: testAlaska2023
- CMD: testConus2018
- CMD: testConus2023
......
......@@ -11,7 +11,7 @@ micronautVersion = 3.2.3
micronautRxVersion = 2.1.1
nodePluginVersion = 3.0.1
nodeVersion = 16.3.0
nshmpLibVersion = 1.3.3
nshmpLibVersion = 1.3.5
nshmpWsUtilsVersion = 0.3.11
openApiVersion = 4.0.0
shadowVersion = 7.1.2
......
......@@ -76,6 +76,30 @@ task nshms() {
}
}
// Test Alaska 2007 NSHM
task testAlaska2007(type: Test) {
description = "Test Alaska 2007 NSHM"
group = "verification"
doFirst {
downloadNshm(findNshm("nshm-alaska", 2007))
}
testLogging {
exceptionFormat "full"
}
useJUnitPlatform()
jvmArgs(
"-Xms2g",
"-Xmx8g",
)
filter {
includeTestsMatching "gov.usgs.earthquake.nshmp.model.NshmTests.testAlaska2007"
}
}
// Test Alaska 2023 NSHM
task testAlaska2023(type: Test) {
description = "Test Alaska 2023 NSHM"
......
......@@ -2,6 +2,20 @@
# NSHMs to use for unit tests and for deployments.
####
nshms:
# Alaska 2007 NSHM
-
repo: nshm-alaska
tag: 2.2.1
year: 2007
deployments:
development:
instanceType: t4g.xlarge
staging:
instanceType: t4g.2xlarge
# TODO: Add to production when model is stable
# production:
# instanceType: c7g.8xlarge
# Alaska 2023 NSHM
-
repo: nshm-alaska
......
......@@ -55,7 +55,6 @@ class NshmTestUtils {
*/
static NshmModel loadModel(Nshm nshm) {
int cores = Runtime.getRuntime().availableProcessors();
return new NshmModel(
nshm,
ModelLoader.load(nshm.modelPath()),
......@@ -285,7 +284,7 @@ class NshmTestUtils {
}
String resultFilename(NamedLocation location) {
return String.format("%s-%s-%s.json", modelName(), year(), location.name());
return String.format("%s.json", location.name());
}
}
}
......@@ -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-2018"));
NshmTestUtils.loadModel(NSHMS.get("nshm-alaska-2007"));
NshmTestUtils.writeExpecteds(nshmModel);
nshmModel.exec.shutdown();
......@@ -102,6 +108,16 @@ class NshmTests {
// }
}
/**
* Test Alaska 2007 NSHM
*
* To run test: ./gradlew testAlaska2007
*/
@Test
final void testAlaska2007() throws IOException {
NshmTestUtils.testNshm(NSHMS.get("nshm-alaska-2007"));
}
/**
* Test Alaska 2023 NSHM
*
......
{
"1.00 Second Spectral Acceleration": {
"xs": [
-5.991464547107982,
-5.585999438999818,
-5.181423615076538,
-4.775958506968373,
-4.374058465024705,
-3.9633162998156966,
-3.5613661338149765,
-3.153556358747558,
-2.7488721956224653,
-2.3434070875143007,
-1.9379419794061366,
-1.532476871297972,
-1.1270117631898076,
-0.7215466550816433,
-0.3160815469734789,
0.0861776962410524,
0.494696241836107,
0.9001613499442714,
1.3056264580524357,
1.7119945007591926
],
"ys": [
1.216784296389448,
1.001712499365357,
0.7796429247164196,
0.5719011068498189,
0.39834574699730324,
0.2617839994778919,
0.1660428466673632,
0.10003334171779812,
0.05737347098846019,
0.030619419719839034,
0.014904607266644073,
0.006565568384584037,
0.0026793854641647477,
0.0010416460147385327,
3.629137895691359E-4,
9.82623278317095E-5,
1.5879665844816693E-5,
6.648778909021348E-7,
1.7997491318464677E-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.38566248081198456,
0.01980262729617973,
0.4252677354043441,
0.832909122935104,
1.235471471385307,
1.6428726885203377
],
"ys": [
1.65397819274769,
1.4774726044583617,
1.2707743009482835,
1.0374950532982243,
0.7909487640658448,
0.5566615888725722,
0.36270892517478526,
0.22040790487251347,
0.12651798364766775,
0.06757725919698641,
0.03300267773366276,
0.014271739151160378,
0.005693025514814956,
0.0019431717707338516,
4.873075258836614E-4,
7.326467022422193E-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.7220962968776978,
1.57398677222407,
1.394851420852358,
1.1868737782914325,
0.9486733636220279,
0.7100408174082282,
0.49472716125753763,
0.3226156937754519,
0.1994750268988446,
0.11681594901507047,
0.06395461351278024,
0.031884675080501315,
0.014271993188868272,
0.005793050581460287,
0.002121342475395979,
6.235952081095883E-4,
1.226785445725974E-4,
1.4246353621355985E-5,
9.352016591244695E-7,
4.253931015422376E-8
]
}
}
\ No newline at end of file
{
"1.00 Second Spectral Acceleration": {
"xs": [
-5.991464547107982,
-5.585999438999818,
-5.181423615076538,
-4.775958506968373,
-4.374058465024705,
-3.9633162998156966,
-3.5613661338149765,
-3.153556358747558,
-2.7488721956224653,
-2.3434070875143007,
-1.9379419794061366,
-1.532476871297972,
-1.1270117631898076,
-0.7215466550816433,
-0.3160815469734789,
0.0861776962410524,
0.494696241836107,
0.9001613499442714,
1.3056264580524357,
1.7119945007591926
],
"ys": [
0.3464423908576828,
0.2746884250513254,
0.20330958648206368,
0.1403632886808619,
0.0915012349273498,
0.056022641564065334,
0.03311999914335675,
0.018571316457003897,
0.009917617739224244,
0.004934944876941708,
0.0022460954288533925,
9.151846593388019E-4,
3.26727481232607E-4,
9.811837073821066E-5,
2.4114425298279172E-5,
4.475413565666441E-6,
4.930242108836647E-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.38566248081198456,
0.01980262729617973,
0.4252677354043441,
0.832909122935104,
1.235471471385307,
1.6428726885203377
],
"ys": [
0.42512155522078154,
0.3741248597866011,
0.31527269776137723,
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.0896404398015089E-7,
2.452338948529823E-10
]
}
}
\ No newline at end of file
{
"1.00 Second Spectral Acceleration": {
"xs": [
-5.991464547107982,
-5.585999438999818,
-5.181423615076538,
-4.775958506968373,
-4.374058465024705,
-3.9633162998156966,
-3.5613661338149765,
-3.153556358747558,
-2.7488721956224653,
-2.3434070875143007,
-1.9379419794061366,
-1.532476871297972,
-1.1270117631898076,
-0.7215466550816433,
-0.3160815469734789,
0.0861776962410524,
0.494696241836107,
0.9001613499442714,
1.3056264580524357,
1.7119945007591926
],
"ys": [
0.15711896486246746,
0.12501262128440851,
0.09573172183056405,
0.07175972210060443,
0.053919993202308635,
0.040401182475899265,
0.02978383684132939,
0.020390931410482413,
0.01260966486160384,
0.006969616384468542,
0.003419961276845986,
0.001426755968984542,
4.763697061356834E-4,
1.1838379953962976E-4,
1.9467603264257974E-5,
2.1012839661451054E-6,
1.7178404489425482E-7,
2.9031224848126118E-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.38566248081198456,
0.01980262729617973,
0.4252677354043441,
0.832909122935104,
1.235471471385307,
1.6428726885203377
],
"ys": [
0.1778922496833284,
0.15506822814114957,
0.1308377467268995,
0.10486391161493126,
0.07816083816160604,
0.053552032042243444,
0.03362392034614441,
0.018925421114481263,
0.009320182850262714,
0.003883187508247969,
0.0013873837718383136,
4.3431463298702157E-4,
1.259789594876419E-4,
2.8891731713975013E-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.20198315974707726,
0.18021937291091744,
0.15619226394543845,
0.1297226266098986,
0.10052490844368282,
0.07290039731805786,
0.04959322834395091,
0.03132812189942363,
0.017987779421530157,
0.00937667316239904,
0.004463898770707188,
0.0018544280343519254,
6.50698309917748E-4,
1.9287667775979073E-4,
4.86255393650736E-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.181423615076538,
-4.775958506968373,
-4.374058465024705,
-3.9633162998156966,
-3.5613661338149765,
-3.153556358747558,
-2.7488721956224653,
-2.3434070875143007,
-1.9379419794061366,
-1.532476871297972,
-1.1270117631898076,
-0.7215466550816433,
-0.3160815469734789,
0.0861776962410524,
0.494696241836107,
0.9001613499442714,
1.3056264580524357,
1.7119945007591926
],
"ys": [
1.0202890885330151,
0.8375083352263466,
0.6475662303710862,
0.4707918425427097,
0.32519272294896445,
0.2128312414135632,
0.13574097527098886,
0.08381717413931654,
0.05102722546305095,
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.38566248081198456,
0.01980262729617973,
0.4252677354043441,
0.832909122935104,
1.235471471385307,
1.6428726885203377
],
"ys": [
1.3143840761818832,
1.1715241821556248,
1.0073110589775853,
0.8224391253457789,
0.625115708600688,
0.4357796832874383,
0.27952789844459086,
0.16752488019629042,
0.09692443479191427,
0.054873332137219115,
0.030272844286145184,
0.015399970754471156,
0.007108660320946838,
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.1244476634474232,
0.9577566116756505,
0.7648024244341657,
0.5696821914048495,
0.3936262320736718,
0.25445762904341573,
0.1571249991498746,
0.094043350911653,
0.055139868554608104,
0.03136425581007428,
0.016788523699286094,
0.008121696981340597,
0.003390880322593564,
0.0010922520629723035,
2.2741198895158385E-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.181423615076538,
-4.775958506968373,
-4.374058465024705,
-3.9633162998156966,
-3.5613661338149765,
-3.153556358747558,
-2.7488721956224653,
-2.3434070875143007,
-1.9379419794061366,
-1.532476871297972,
-1.1270117631898076,
-0.7215466550816433,
-0.3160815469734789,
0.0861776962410524,
0.494696241836107,
0.9001613499442714,
1.3056264580524357,
1.7119945007591926
],
"ys": [
0.8012677504331032,
0.6573423103469674,
0.5063567337421475,
0.36567614652874564,
0.24998725414520195,
0.16073387876630177,
0.09954072289402163,
0.05862243229234874,
0.03334265172051943,
0.018278944451505758,
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.38566248081198456,
0.01980262729617973,
0.4252677354043441,
0.832909122935104,
1.235471471385307,
1.6428726885203377
],
"ys": [
1.0038320165648555,
0.9057705268649429,
0.7875249886419105,
0.646418900623757,
0.4882256711176156,
0.3326428076794074,
0.20478981928867987,
0.11605620823277468,
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.885693843075509,
0.7608557925362751,
0.608087709906037,
0.44839060199479647,
0.3029026005554235,
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