diff --git a/python/idsse_testing/risk_processor/__init__.py b/python/idsse_testing/risk_processor/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/python/idsse_testing/risk_processor/binghamton/2022_12_23_17_00_BINGHAMTON_SNOW.nc b/python/idsse_testing/risk_processor/binghamton/2022_12_23_17_00_BINGHAMTON_SNOW.nc new file mode 100644 index 0000000..94266f6 Binary files /dev/null and b/python/idsse_testing/risk_processor/binghamton/2022_12_23_17_00_BINGHAMTON_SNOW.nc differ diff --git a/python/idsse_testing/risk_processor/binghamton/criteria_binghamton_snow.json b/python/idsse_testing/risk_processor/binghamton/criteria_binghamton_snow.json new file mode 100644 index 0000000..c3ba572 --- /dev/null +++ b/python/idsse_testing/risk_processor/binghamton/criteria_binghamton_snow.json @@ -0,0 +1,132 @@ +{ + "corrId": { + "originator": "IDSSe", + "uuid": "22222222-beec-467b-a0e6-9d215b715b97", + "issueDt": "2022-12-23T12:00:00.000Z" + }, + "issueDt": "2022-12-23T12:00:00.000Z", + "location": { + "features": [ + { + "type": "Feature", + "properties": { + "name": "Location 1" + }, + "geometry": { + "coordinates": [ + [-75.82261820803978, 42.100751285762954], + [-75.8383708354987, 42.10864014806441], + [-75.84165263288575, 42.10883492237019], + [-75.85005403419683, 42.1067897623133], + [-75.85320455968883, 42.10756887868658], + [-75.86081832962735, 42.10990617035307], + [-75.86935100283405, 42.11010094076886], + [-75.87473315054933, 42.11263290171084], + [-75.88549744597924, 42.11535951576835], + [-75.90741985252599, 42.11487262900434], + [-75.91110962823032, 42.112191219739174], + [-75.91482278268002, 42.111617354402284], + [-75.93276969585565, 42.114601397417374], + [-75.93741113891811, 42.11620813161767], + [-75.94359972966832, 42.11919195849035], + [-75.94545630689318, 42.11976575524366], + [-75.9609277837683, 42.119650996309076], + [-75.97392382434361, 42.120569061969576], + [-75.97856530045271, 42.12045478019678], + [-75.99682164316545, 42.11609384198053] + ], + "type": "LineString" + } + }, + { + "type": "Feature", + "properties": { + "name": "Location 2" + }, + "geometry": { + "coordinates": [ + [-75.89888713596261, 42.177520971578645], + [-75.89563812581969, 42.16740193106875], + [-75.89811356211946, 42.15644975745005], + [-75.89803620473538, 42.155016086565354], + [-75.89664377181656, 42.151231039381315], + [-75.89672112920069, 42.14928107825122], + [-75.90174935918506, 42.14073495192076], + [-75.90428874301112, 42.12926503403716], + [-75.90475044884926, 42.125755168409285], + [-75.90994463952903, 42.11873485376785], + [-75.90971378660967, 42.117108084502036], + [-75.90809781617592, 42.116080629764724], + [-75.90498130176806, 42.11513878162259] + ], + "type": "LineString" + } + }, + { + "type": "Feature", + "properties": { + "name": "Location 3" + }, + "geometry": { + "coordinates": [ + [-75.83457119675651, 42.167090721498084], + [-75.8373414317859, 42.166064077510725], + [-75.84357446060109, 42.16127285194375], + [-75.84634469563048, 42.160417237769394], + [-75.85107718047209, 42.16007498886057], + [-75.85881075326135, 42.16127285194375], + [-75.86631347313237, 42.16349739465042], + [-75.87254650194754, 42.164267410442335], + [-75.87473960467915, 42.16392518235833], + [-75.88235775100927, 42.15981830096317], + [-75.88397372144304, 42.15896266712116], + [-75.88605139771495, 42.15673796498447], + [-75.89274613236827, 42.145185369661306], + [-75.8939003969639, 42.14415837025939], + [-75.89563179385732, 42.14338810977449], + [-75.90071055807739, 42.14218990817287] + ], + "type": "LineString" + } + } + ] + }, + "validDt": [ + {"start": "2022-12-23T12:00:00.000Z", "end": "2022-12-24T00:00:00.000Z"} + ], + "conditions": [ + { + "name": "Binghamton, Snow", + "severity": "MODERATE", + "combined": "A", + "partsUsed": ["A"] + } + ], + "parts": [ + { + "name": "A", + "duration": 0, + "arealPercentage": 0, + "region": "CONUS", + "product": { + "fcst": ["NBM"] + }, + "field": "1 HR SNOWFALL", + "units": "INCHES", + "relational": "GREATER THAN OR EQUAL", + "thresh": 0.01, + "mapping": { + "min": 0, + "max": 3, + "clip": "true" + } + } + ], + "tags": { + "values": [], + "keyValues": { + "name": "Binghamton, Snow", + "nwsOffice": "BGM" + } + } +} diff --git a/python/idsse_testing/risk_processor/binghamton/data_service_response_binghamton.json b/python/idsse_testing/risk_processor/binghamton/data_service_response_binghamton.json new file mode 100644 index 0000000..f95bc0c --- /dev/null +++ b/python/idsse_testing/risk_processor/binghamton/data_service_response_binghamton.json @@ -0,0 +1,92 @@ +{ + "A:Raw": { + "filenames": { + "Deterministic": "/share/2022/12/23/NBM.AWS.GRIB/SNOW1HR/Inches/gridstore-907024368.nc" + }, + "issue_dt": "2022-12-23T12:00:00.000Z", + "valid_dt": "2022-12-23T13:00:00.000Z", + "proj_name": "NBM CONUS", + "proj_spec": "+proj=lcc +lat_0=25.0 +lon_0=-95.0 +lat_1=25.0 +a=6371200", + "grid_spec": "+dx=2539.703 +dy=2539.703 +w=400 +h=300 +lat_ll=39.3883615035761 +lon_ll=-82.17510536773516", + "data_name": "Snowfall: 1hr accum (ASNOW)", + "data_loc": "arn:aws:s3:::noaa-nbm-grib2-pds:", + "units": "Inches", + "region": "CONUS", + "slice": "[1736:2136,762:1062]" + }, + "A:ThreatLevel": { + "filenames": { + "Deterministic": "/share/2022/12/23/NBM.AWS.GRIB/SNOW1HR.Criteria/ThreatLevel/gridstore-401831466.nc" + }, + "issue_dt": "2022-12-23T12:00:00.000Z", + "valid_dt": "2022-12-23T13:00:00.000Z", + "proj_name": "NBM CONUS", + "proj_spec": "+proj=lcc +lat_0=25.0 +lon_0=-95.0 +lat_1=25.0 +a=6371200", + "grid_spec": "+dx=2539.703 +dy=2539.703 +w=400 +h=300 +lat_ll=39.3883615035761 +lon_ll=-82.17510536773516", + "data_name": "Snowfall: 1hr accum (ASNOW)", + "data_loc": "arn:aws:s3:::noaa-nbm-grib2-pds:", + "units": "ThreatLevel", + "region": "CONUS", + "slice": "[1736:2136,762:1062]" + }, + "Binghamton, Snow": { + "filenames": { + "Deterministic": "/share/2022/12/23/NBM.AWS.GRIB/Criteria/ThreatLevel/gridstore2098351630.nc" + }, + "issue_dt": "2022-12-23T12:00:00.000Z", + "valid_dt": "2022-12-23T13:00:00.000Z", + "proj_name": "NBM CONUS", + "proj_spec": "+proj=lcc +lat_0=25.0 +lon_0=-95.0 +lat_1=25.0 +a=6371200", + "grid_spec": "+dx=2539.703 +dy=2539.703 +w=400 +h=300 +lat_ll=39.3883615035761 +lon_ll=-82.17510536773516", + "data_name": "Snowfall: 1hr accum (ASNOW)", + "data_loc": "arn:aws:s3:::noaa-nbm-grib2-pds:", + "units": "ThreatLevel", + "region": "CONUS", + "slice": "[1736:2136,762:1062]" + }, + "request": { + "corrId": { + "originator": "IDSSe", + "uuid": "22222222-beec-467b-a0e6-9d215b715b97", + "issueDt": "2022-12-23T12:00:00.000Z" + }, + "label": "Binghamton, Snow", + "sourceType": "join", + "sourceObj": { + "join": "OR", + "sources": [ + { + "sourceType": "condition", + "label": "A:ThreatLevel", + "sourceObj": { + "relational": "GREATER THAN OR EQUAL", + "thresh": 0.01, + "mapping": { + "startWeight": [0, 1, 0], + "endWeight": [0, 1, 0], + "controlPoints": ["-Infinity", 0, 3, "Infinity"] + }, + "source": { + "label": "A:Raw", + "sourceType": "data", + "sourceObj": { + "product": "NBM", + "field": "1 HR SNOWFALL", + "region": "CONUS", + "units": "INCHES", + "sliceCoords": [ + [-75.99682164316545, 42.100751285762954], + [-75.82261820803978, 42.177520971578645] + ], + "minSize": [400, 300], + "minBuff": 50, + "validDt": "2022-12-23T13:00:00.000Z", + "issueDt": "2022-12-23T12:00:00.000Z" + } + } + } + } + ] + } + } +} diff --git a/python/idsse_testing/risk_processor/binghamton/event_portfolio_binghamton_snow.json b/python/idsse_testing/risk_processor/binghamton/event_portfolio_binghamton_snow.json new file mode 100644 index 0000000..a056367 --- /dev/null +++ b/python/idsse_testing/risk_processor/binghamton/event_portfolio_binghamton_snow.json @@ -0,0 +1,1353 @@ +{ + "corrId": { + "originator": "IDSSe", + "uuid": "22222222-beec-467b-a0e6-9d215b715b97", + "issueDt": "2022-12-23T12:00:00.000Z" + }, + "issueDt": "2022-12-23T12:00:00.000Z", + "location": { + "features": [ + { + "type": "Feature", + "properties": { "name": "Location 1" }, + "geometry": { + "coordinates": [ + [-75.82261820803978, 42.100751285762954], + [-75.8383708354987, 42.10864014806441], + [-75.84165263288575, 42.10883492237019], + [-75.85005403419683, 42.1067897623133], + [-75.85320455968883, 42.10756887868658], + [-75.86081832962735, 42.10990617035307], + [-75.86935100283405, 42.11010094076886], + [-75.87473315054933, 42.11263290171084], + [-75.88549744597924, 42.11535951576835], + [-75.90741985252599, 42.11487262900434], + [-75.91110962823032, 42.112191219739174], + [-75.91482278268002, 42.111617354402284], + [-75.93276969585565, 42.114601397417374], + [-75.93741113891811, 42.11620813161767], + [-75.94359972966832, 42.11919195849035], + [-75.94545630689318, 42.11976575524366], + [-75.9609277837683, 42.119650996309076], + [-75.97392382434361, 42.120569061969576], + [-75.97856530045271, 42.12045478019678], + [-75.99682164316545, 42.11609384198053] + ], + "type": "LineString" + } + }, + { + "type": "Feature", + "properties": { "name": "Location 2" }, + "geometry": { + "coordinates": [ + [-75.89888713596261, 42.177520971578645], + [-75.89563812581969, 42.16740193106875], + [-75.89811356211946, 42.15644975745005], + [-75.89803620473538, 42.155016086565354], + [-75.89664377181656, 42.151231039381315], + [-75.89672112920069, 42.14928107825122], + [-75.90174935918506, 42.14073495192076], + [-75.90428874301112, 42.12926503403716], + [-75.90475044884926, 42.125755168409285], + [-75.90994463952903, 42.11873485376785], + [-75.90971378660967, 42.117108084502036], + [-75.90809781617592, 42.116080629764724], + [-75.90498130176806, 42.11513878162259] + ], + "type": "LineString" + } + }, + { + "type": "Feature", + "properties": { "name": "Location 3" }, + "geometry": { + "coordinates": [ + [-75.83457119675651, 42.167090721498084], + [-75.8373414317859, 42.166064077510725], + [-75.84357446060109, 42.16127285194375], + [-75.84634469563048, 42.160417237769394], + [-75.85107718047209, 42.16007498886057], + [-75.85881075326135, 42.16127285194375], + [-75.86631347313237, 42.16349739465042], + [-75.87254650194754, 42.164267410442335], + [-75.87473960467915, 42.16392518235833], + [-75.88235775100927, 42.15981830096317], + [-75.88397372144304, 42.15896266712116], + [-75.88605139771495, 42.15673796498447], + [-75.89274613236827, 42.145185369661306], + [-75.8939003969639, 42.14415837025939], + [-75.89563179385732, 42.14338810977449], + [-75.90071055807739, 42.14218990817287] + ], + "type": "LineString" + } + } + ] + }, + "validDt": [ + {"start": "2022-12-23T12:00:00.000Z", "end": "2022-12-24T00:00:00.000Z"} + ], + "conditions": [ + { + "name": "Binghamton, Snow", + "severity": "MODERATE", + "combined": "A", + "partsUsed": ["A"] + } + ], + "parts": [ + { + "name": "A", + "duration": 0, + "arealPercentage": 0, + "region": "CONUS", + "product": { "fcst": ["NBM"] }, + "field": "1 HR SNOWFALL", + "units": "INCHES", + "relational": "GREATER THAN OR EQUAL", + "thresh": 0.01, + "mapping": { "min": 0, "max": 3, "clip": "true" } + } + ], + "tags": { + "values": [], + "keyValues": { "name": "Binghamton, Snow", "nwsOffice": "BGM" } + }, + "riskResults": [ + { + "evaluatedAt": "2024-04-17T15:32:51.890Z", + "conditionKey": "Binghamton, Snow", + "productKey": "NBM", + "region": "CONUS", + "slice": "[1736:2136,762:1062]", + "locationKey": "Sub Location: 1", + "dataSummary": [ + { + "validDt": [ + "2022-12-23T13:00:00.000Z", + "2022-12-23T14:00:00.000Z", + "2022-12-23T15:00:00.000Z", + "2022-12-23T16:00:00.000Z", + "2022-12-23T17:00:00.000Z", + "2022-12-23T18:00:00.000Z", + "2022-12-23T19:00:00.000Z", + "2022-12-23T20:00:00.000Z", + "2022-12-23T21:00:00.000Z", + "2022-12-23T22:00:00.000Z", + "2022-12-23T23:00:00.000Z", + "2022-12-24T00:00:00.000Z" + ], + "data": [ + { + "name": "Binghamton, Snow", + "type": "condition", + "singleValue": [ + -1.0, -1.0, -1.0, -1.0, 0.17, 0.13, -1.0, -1.0, -1.0, -1.0, -1.0, + -1.0 + ], + "geoDist": [ + { "-1.0": 7 }, + { "-1.0": 7 }, + { "-1.0": 7 }, + { "-1.0": 7 }, + { "0.1": 1, "0.13": 5, "0.17": 1 }, + { "0.1": 6, "0.13": 1 }, + { "-1.0": 7 }, + { "-1.0": 7 }, + { "-1.0": 7 }, + { "-1.0": 7 }, + { "-1.0": 7 }, + { "-1.0": 7 } + ] + }, + { + "name": "A", + "type": "criteria", + "singleValue": [ + -1.0, -1.0, -1.0, -1.0, 0.17, 0.13, -1.0, -1.0, -1.0, -1.0, -1.0, + -1.0 + ], + "geoDist": [ + { "-1.0": 7 }, + { "-1.0": 7 }, + { "-1.0": 7 }, + { "-1.0": 7 }, + { "0.1": 1, "0.13": 5, "0.17": 1 }, + { "0.1": 6, "0.13": 1 }, + { "-1.0": 7 }, + { "-1.0": 7 }, + { "-1.0": 7 }, + { "-1.0": 7 }, + { "-1.0": 7 }, + { "-1.0": 7 } + ] + }, + { + "name": "A", + "type": "raw", + "singleValue": [ + 0.0, 0.0, 0.0, 0.0, 0.51, 0.39, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 + ], + "geoDist": [ + { "0.0": 7 }, + { "0.0": 7 }, + { "0.0": 7 }, + { "0.0": 7 }, + { "0.31": 1, "0.39": 5, "0.51": 1 }, + { "0.31": 6, "0.39": 1 }, + { "0.0": 7 }, + { "0.0": 7 }, + { "0.0": 7 }, + { "0.0": 7 }, + { "0.0": 7 }, + { "0.0": 7 } + ] + } + ] + } + ], + "dataDescript": [ + { + "partName": "A", + "dataName": "Snowfall: 1HR", + "dataLocation": "arn:aws:s3:::noaa-nbm-grib2-pds", + "issueDt": "2022-12-23T12:00:00.000Z" + } + ], + "metaData": [ + { + "name": "Binghamton, Snow", + "type": "condition", + "proximalThresh": -0.5, + "states": [ + { + "durationInMin": 206, + "min": -1.0, + "minAt": "2022-12-23T13:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T13:00:00.000Z", + "endDt": "2022-12-23T16:25:38.462Z", + "maxAt": "2022-12-23T16:25:38.462Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 26, + "min": -0.5, + "minAt": "2022-12-23T16:25:38.462Z", + "max": 0.0, + "startDt": "2022-12-23T16:25:38.462Z", + "endDt": "2022-12-23T16:51:16.923Z", + "maxAt": "2022-12-23T16:51:16.923Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 76, + "min": 0.0, + "minAt": "2022-12-23T16:51:16.923Z", + "max": 0.17, + "startDt": "2022-12-23T16:51:16.923Z", + "endDt": "2022-12-23T18:06:54.159Z", + "maxAt": "2022-12-23T17:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 27, + "min": -0.5, + "minAt": "2022-12-23T18:33:27.080Z", + "max": 0.0, + "startDt": "2022-12-23T18:06:54.159Z", + "endDt": "2022-12-23T18:33:27.080Z", + "maxAt": "2022-12-23T18:06:54.159Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 327, + "min": -1.0, + "minAt": "2022-12-23T19:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T18:33:27.080Z", + "endDt": "2022-12-24T00:00:00.000Z", + "maxAt": "2022-12-23T18:33:27.080Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + } + ] + }, + { + "name": "A", + "type": "criteria", + "proximalThresh": -0.5, + "states": [ + { + "durationInMin": 206, + "min": -1.0, + "minAt": "2022-12-23T13:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T13:00:00.000Z", + "endDt": "2022-12-23T16:25:38.462Z", + "maxAt": "2022-12-23T16:25:38.462Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 26, + "min": -0.5, + "minAt": "2022-12-23T16:25:38.462Z", + "max": 0.0, + "startDt": "2022-12-23T16:25:38.462Z", + "endDt": "2022-12-23T16:51:16.923Z", + "maxAt": "2022-12-23T16:51:16.923Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 76, + "min": 0.0, + "minAt": "2022-12-23T16:51:16.923Z", + "max": 0.17, + "startDt": "2022-12-23T16:51:16.923Z", + "endDt": "2022-12-23T18:06:54.159Z", + "maxAt": "2022-12-23T17:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 27, + "min": -0.5, + "minAt": "2022-12-23T18:33:27.080Z", + "max": 0.0, + "startDt": "2022-12-23T18:06:54.159Z", + "endDt": "2022-12-23T18:33:27.080Z", + "maxAt": "2022-12-23T18:06:54.159Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 327, + "min": -1.0, + "minAt": "2022-12-23T19:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T18:33:27.080Z", + "endDt": "2022-12-24T00:00:00.000Z", + "maxAt": "2022-12-23T18:33:27.080Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + } + ] + } + ] + }, + { + "evaluatedAt": "2024-04-17T15:32:51.890Z", + "conditionKey": "Binghamton, Snow", + "productKey": "NBM", + "region": "CONUS", + "slice": "[1736:2136,762:1062]", + "locationKey": "Sub Location: 2", + "dataSummary": [ + { + "validDt": [ + "2022-12-23T13:00:00.000Z", + "2022-12-23T14:00:00.000Z", + "2022-12-23T15:00:00.000Z", + "2022-12-23T16:00:00.000Z", + "2022-12-23T17:00:00.000Z", + "2022-12-23T18:00:00.000Z", + "2022-12-23T19:00:00.000Z", + "2022-12-23T20:00:00.000Z", + "2022-12-23T21:00:00.000Z", + "2022-12-23T22:00:00.000Z", + "2022-12-23T23:00:00.000Z", + "2022-12-24T00:00:00.000Z" + ], + "data": [ + { + "name": "Binghamton, Snow", + "type": "condition", + "singleValue": [ + -1.0, -1.0, -1.0, -1.0, 0.17, 0.13, 0.04, -1.0, 0.04, -1.0, -1.0, + -1.0 + ], + "geoDist": [ + { "-1.0": 4 }, + { "-1.0": 4 }, + { "-1.0": 4 }, + { "-1.0": 4 }, + { "0.13": 1, "0.17": 3 }, + { "0.1": 3, "0.13": 1 }, + { "-1.0": 3, "0.04": 1 }, + { "-1.0": 4 }, + { "-1.0": 3, "0.04": 1 }, + { "-1.0": 4 }, + { "-1.0": 4 }, + { "-1.0": 4 } + ] + }, + { + "name": "A", + "type": "criteria", + "singleValue": [ + -1.0, -1.0, -1.0, -1.0, 0.17, 0.13, 0.04, -1.0, 0.04, -1.0, -1.0, + -1.0 + ], + "geoDist": [ + { "-1.0": 4 }, + { "-1.0": 4 }, + { "-1.0": 4 }, + { "-1.0": 4 }, + { "0.13": 1, "0.17": 3 }, + { "0.1": 3, "0.13": 1 }, + { "-1.0": 3, "0.04": 1 }, + { "-1.0": 4 }, + { "-1.0": 3, "0.04": 1 }, + { "-1.0": 4 }, + { "-1.0": 4 }, + { "-1.0": 4 } + ] + }, + { + "name": "A", + "type": "raw", + "singleValue": [ + 0.0, 0.0, 0.0, 0.0, 0.51, 0.39, 0.12, 0.0, 0.12, 0.0, 0.0, 0.0 + ], + "geoDist": [ + { "0.0": 4 }, + { "0.0": 4 }, + { "0.0": 4 }, + { "0.0": 4 }, + { "0.39": 1, "0.51": 3 }, + { "0.31": 3, "0.39": 1 }, + { "0.0": 3, "0.12": 1 }, + { "0.0": 4 }, + { "0.0": 3, "0.12": 1 }, + { "0.0": 4 }, + { "0.0": 4 }, + { "0.0": 4 } + ] + } + ] + } + ], + "dataDescript": [ + { + "partName": "A", + "dataName": "Snowfall: 1HR", + "dataLocation": "arn:aws:s3:::noaa-nbm-grib2-pds", + "issueDt": "2022-12-23T12:00:00.000Z" + } + ], + "metaData": [ + { + "name": "Binghamton, Snow", + "type": "condition", + "proximalThresh": -0.5, + "states": [ + { + "durationInMin": 206, + "min": -1.0, + "minAt": "2022-12-23T13:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T13:00:00.000Z", + "endDt": "2022-12-23T16:25:38.462Z", + "maxAt": "2022-12-23T16:25:38.462Z", + "empirical": "MISS" + }, + { + "durationInMin": 26, + "min": -0.5, + "minAt": "2022-12-23T16:25:38.462Z", + "max": 0.0, + "startDt": "2022-12-23T16:25:38.462Z", + "endDt": "2022-12-23T16:51:16.923Z", + "maxAt": "2022-12-23T16:51:16.923Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 131, + "min": 0.0, + "minAt": "2022-12-23T16:51:16.923Z", + "max": 0.17, + "startDt": "2022-12-23T16:51:16.923Z", + "endDt": "2022-12-23T19:02:18.462Z", + "maxAt": "2022-12-23T17:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 29, + "min": -0.5, + "minAt": "2022-12-23T19:31:09.231Z", + "max": 0.0, + "startDt": "2022-12-23T19:02:18.462Z", + "endDt": "2022-12-23T19:31:09.231Z", + "maxAt": "2022-12-23T19:02:18.462Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 58, + "min": -1.0, + "minAt": "2022-12-23T20:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T19:31:09.231Z", + "endDt": "2022-12-23T20:28:50.769Z", + "maxAt": "2022-12-23T19:31:09.231Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 29, + "min": -0.5, + "minAt": "2022-12-23T20:28:50.769Z", + "max": 0.0, + "startDt": "2022-12-23T20:28:50.769Z", + "endDt": "2022-12-23T20:57:41.538Z", + "maxAt": "2022-12-23T20:57:41.538Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 5, + "min": 0.0, + "minAt": "2022-12-23T20:57:41.538Z", + "max": 0.04, + "startDt": "2022-12-23T20:57:41.538Z", + "endDt": "2022-12-23T21:02:18.462Z", + "maxAt": "2022-12-23T21:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 29, + "min": -0.5, + "minAt": "2022-12-23T21:31:09.231Z", + "max": 0.0, + "startDt": "2022-12-23T21:02:18.462Z", + "endDt": "2022-12-23T21:31:09.231Z", + "maxAt": "2022-12-23T21:02:18.462Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 149, + "min": -1.0, + "minAt": "2022-12-23T22:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T21:31:09.231Z", + "endDt": "2022-12-24T00:00:00.000Z", + "maxAt": "2022-12-23T21:31:09.231Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + } + ] + }, + { + "name": "A", + "type": "criteria", + "proximalThresh": -0.5, + "states": [ + { + "durationInMin": 206, + "min": -1.0, + "minAt": "2022-12-23T13:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T13:00:00.000Z", + "endDt": "2022-12-23T16:25:38.462Z", + "maxAt": "2022-12-23T16:25:38.462Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 26, + "min": -0.5, + "minAt": "2022-12-23T16:25:38.462Z", + "max": 0.0, + "startDt": "2022-12-23T16:25:38.462Z", + "endDt": "2022-12-23T16:51:16.923Z", + "maxAt": "2022-12-23T16:51:16.923Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 131, + "min": 0.0, + "minAt": "2022-12-23T16:51:16.923Z", + "max": 0.17, + "startDt": "2022-12-23T16:51:16.923Z", + "endDt": "2022-12-23T19:02:18.462Z", + "maxAt": "2022-12-23T17:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 29, + "min": -0.5, + "minAt": "2022-12-23T19:31:09.231Z", + "max": 0.0, + "startDt": "2022-12-23T19:02:18.462Z", + "endDt": "2022-12-23T19:31:09.231Z", + "maxAt": "2022-12-23T19:02:18.462Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 58, + "min": -1.0, + "minAt": "2022-12-23T20:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T19:31:09.231Z", + "endDt": "2022-12-23T20:28:50.769Z", + "maxAt": "2022-12-23T19:31:09.231Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 29, + "min": -0.5, + "minAt": "2022-12-23T20:28:50.769Z", + "max": 0.0, + "startDt": "2022-12-23T20:28:50.769Z", + "endDt": "2022-12-23T20:57:41.538Z", + "maxAt": "2022-12-23T20:57:41.538Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 5, + "min": 0.0, + "minAt": "2022-12-23T20:57:41.538Z", + "max": 0.04, + "startDt": "2022-12-23T20:57:41.538Z", + "endDt": "2022-12-23T21:02:18.462Z", + "maxAt": "2022-12-23T21:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 29, + "min": -0.5, + "minAt": "2022-12-23T21:31:09.231Z", + "max": 0.0, + "startDt": "2022-12-23T21:02:18.462Z", + "endDt": "2022-12-23T21:31:09.231Z", + "maxAt": "2022-12-23T21:02:18.462Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 149, + "min": -1.0, + "minAt": "2022-12-23T22:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T21:31:09.231Z", + "endDt": "2022-12-24T00:00:00.000Z", + "maxAt": "2022-12-23T21:31:09.231Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + } + ] + } + ] + }, + { + "evaluatedAt": "2024-04-17T15:32:51.890Z", + "conditionKey": "Binghamton, Snow", + "productKey": "NBM", + "region": "CONUS", + "slice": "[1736:2136,762:1062]", + "locationKey": "Sub Location: 3", + "dataSummary": [ + { + "validDt": [ + "2022-12-23T13:00:00.000Z", + "2022-12-23T14:00:00.000Z", + "2022-12-23T15:00:00.000Z", + "2022-12-23T16:00:00.000Z", + "2022-12-23T17:00:00.000Z", + "2022-12-23T18:00:00.000Z", + "2022-12-23T19:00:00.000Z", + "2022-12-23T20:00:00.000Z", + "2022-12-23T21:00:00.000Z", + "2022-12-23T22:00:00.000Z", + "2022-12-23T23:00:00.000Z", + "2022-12-24T00:00:00.000Z" + ], + "data": [ + { + "name": "Binghamton, Snow", + "type": "condition", + "singleValue": [ + -1.0, -1.0, -1.0, -1.0, 0.17, 0.1, 0.06, -1.0, 0.06, 0.04, -1.0, + -1.0 + ], + "geoDist": [ + { "-1.0": 3 }, + { "-1.0": 3 }, + { "-1.0": 3 }, + { "-1.0": 3 }, + { "0.1": 1, "0.13": 1, "0.17": 1 }, + { "0.1": 3 }, + { "-1.0": 1, "0.04": 1, "0.06": 1 }, + { "-1.0": 3 }, + { "-1.0": 2, "0.06": 1 }, + { "-1.0": 2, "0.04": 1 }, + { "-1.0": 3 }, + { "-1.0": 3 } + ] + }, + { + "name": "A", + "type": "criteria", + "singleValue": [ + -1.0, -1.0, -1.0, -1.0, 0.17, 0.1, 0.06, -1.0, 0.06, 0.04, -1.0, + -1.0 + ], + "geoDist": [ + { "-1.0": 3 }, + { "-1.0": 3 }, + { "-1.0": 3 }, + { "-1.0": 3 }, + { "0.1": 1, "0.13": 1, "0.17": 1 }, + { "0.1": 3 }, + { "-1.0": 1, "0.04": 1, "0.06": 1 }, + { "-1.0": 3 }, + { "-1.0": 2, "0.06": 1 }, + { "-1.0": 2, "0.04": 1 }, + { "-1.0": 3 }, + { "-1.0": 3 } + ] + }, + { + "name": "A", + "type": "raw", + "singleValue": [ + 0.0, 0.0, 0.0, 0.0, 0.51, 0.31, 0.2, 0.0, 0.2, 0.12, 0.0, 0.0 + ], + "geoDist": [ + { "0.0": 3 }, + { "0.0": 3 }, + { "0.0": 3 }, + { "0.0": 3 }, + { "0.31": 1, "0.39": 1, "0.51": 1 }, + { "0.31": 3 }, + { "0.0": 1, "0.12": 1, "0.2": 1 }, + { "0.0": 3 }, + { "0.0": 2, "0.2": 1 }, + { "0.0": 2, "0.12": 1 }, + { "0.0": 3 }, + { "0.0": 3 } + ] + } + ] + } + ], + "dataDescript": [ + { + "partName": "A", + "dataName": "Snowfall: 1HR", + "dataLocation": "arn:aws:s3:::noaa-nbm-grib2-pds", + "issueDt": "2022-12-23T12:00:00.000Z" + } + ], + "metaData": [ + { + "name": "Binghamton, Snow", + "type": "condition", + "proximalThresh": -0.5, + "states": [ + { + "durationInMin": 206, + "min": -1.0, + "minAt": "2022-12-23T13:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T13:00:00.000Z", + "endDt": "2022-12-23T16:25:38.462Z", + "maxAt": "2022-12-23T16:25:38.462Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 26, + "min": -0.5, + "minAt": "2022-12-23T16:25:38.462Z", + "max": 0.0, + "startDt": "2022-12-23T16:25:38.462Z", + "endDt": "2022-12-23T16:51:16.923Z", + "maxAt": "2022-12-23T16:51:16.923Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 132, + "min": 0.0, + "minAt": "2022-12-23T16:51:16.923Z", + "max": 0.17, + "startDt": "2022-12-23T16:51:16.923Z", + "endDt": "2022-12-23T19:03:23.774Z", + "maxAt": "2022-12-23T17:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 28, + "min": -0.5, + "minAt": "2022-12-23T19:31:41.887Z", + "max": 0.0, + "startDt": "2022-12-23T19:03:23.774Z", + "endDt": "2022-12-23T19:31:41.887Z", + "maxAt": "2022-12-23T19:03:23.774Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 57, + "min": -1.0, + "minAt": "2022-12-23T20:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T19:31:41.887Z", + "endDt": "2022-12-23T20:28:18.113Z", + "maxAt": "2022-12-23T19:31:41.887Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 28, + "min": -0.5, + "minAt": "2022-12-23T20:28:18.113Z", + "max": 0.0, + "startDt": "2022-12-23T20:28:18.113Z", + "endDt": "2022-12-23T20:56:36.226Z", + "maxAt": "2022-12-23T20:56:36.226Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 66, + "min": 0.0, + "minAt": "2022-12-23T20:56:36.226Z", + "max": 0.06, + "startDt": "2022-12-23T20:56:36.226Z", + "endDt": "2022-12-23T22:02:18.462Z", + "maxAt": "2022-12-23T21:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 29, + "min": -0.5, + "minAt": "2022-12-23T22:31:09.231Z", + "max": 0.0, + "startDt": "2022-12-23T22:02:18.462Z", + "endDt": "2022-12-23T22:31:09.231Z", + "maxAt": "2022-12-23T22:02:18.462Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 89, + "min": -1.0, + "minAt": "2022-12-23T23:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T22:31:09.231Z", + "endDt": "2022-12-24T00:00:00.000Z", + "maxAt": "2022-12-23T22:31:09.231Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + } + ] + }, + { + "name": "A", + "type": "criteria", + "proximalThresh": -0.5, + "states": [ + { + "durationInMin": 206, + "min": -1.0, + "minAt": "2022-12-23T13:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T13:00:00.000Z", + "endDt": "2022-12-23T16:25:38.462Z", + "maxAt": "2022-12-23T16:25:38.462Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 26, + "min": -0.5, + "minAt": "2022-12-23T16:25:38.462Z", + "max": 0.0, + "startDt": "2022-12-23T16:25:38.462Z", + "endDt": "2022-12-23T16:51:16.923Z", + "maxAt": "2022-12-23T16:51:16.923Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 132, + "min": 0.0, + "minAt": "2022-12-23T16:51:16.923Z", + "max": 0.17, + "startDt": "2022-12-23T16:51:16.923Z", + "endDt": "2022-12-23T19:03:23.774Z", + "maxAt": "2022-12-23T17:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 28, + "min": -0.5, + "minAt": "2022-12-23T19:31:41.887Z", + "max": 0.0, + "startDt": "2022-12-23T19:03:23.774Z", + "endDt": "2022-12-23T19:31:41.887Z", + "maxAt": "2022-12-23T19:03:23.774Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 57, + "min": -1.0, + "minAt": "2022-12-23T20:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T19:31:41.887Z", + "endDt": "2022-12-23T20:28:18.113Z", + "maxAt": "2022-12-23T19:31:41.887Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 28, + "min": -0.5, + "minAt": "2022-12-23T20:28:18.113Z", + "max": 0.0, + "startDt": "2022-12-23T20:28:18.113Z", + "endDt": "2022-12-23T20:56:36.226Z", + "maxAt": "2022-12-23T20:56:36.226Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 66, + "min": 0.0, + "minAt": "2022-12-23T20:56:36.226Z", + "max": 0.06, + "startDt": "2022-12-23T20:56:36.226Z", + "endDt": "2022-12-23T22:02:18.462Z", + "maxAt": "2022-12-23T21:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 29, + "min": -0.5, + "minAt": "2022-12-23T22:31:09.231Z", + "max": 0.0, + "startDt": "2022-12-23T22:02:18.462Z", + "endDt": "2022-12-23T22:31:09.231Z", + "maxAt": "2022-12-23T22:02:18.462Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 89, + "min": -1.0, + "minAt": "2022-12-23T23:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T22:31:09.231Z", + "endDt": "2022-12-24T00:00:00.000Z", + "maxAt": "2022-12-23T22:31:09.231Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + } + ] + } + ] + }, + { + "evaluatedAt": "2024-04-17T15:32:51.890Z", + "conditionKey": "Binghamton, Snow", + "productKey": "NBM", + "region": "CONUS", + "slice": "[1736:2136,762:1062]", + "locationKey": "Agg Location", + "dataSummary": [ + { + "validDt": [ + "2022-12-23T13:00:00.000Z", + "2022-12-23T14:00:00.000Z", + "2022-12-23T15:00:00.000Z", + "2022-12-23T16:00:00.000Z", + "2022-12-23T17:00:00.000Z", + "2022-12-23T18:00:00.000Z", + "2022-12-23T19:00:00.000Z", + "2022-12-23T20:00:00.000Z", + "2022-12-23T21:00:00.000Z", + "2022-12-23T22:00:00.000Z", + "2022-12-23T23:00:00.000Z", + "2022-12-24T00:00:00.000Z" + ], + "data": [ + { + "name": "Binghamton, Snow", + "type": "condition", + "singleValue": [ + -1.0, -1.0, -1.0, -1.0, 0.17, 0.13, 0.06, -1.0, 0.06, 0.04, -1.0, + -1.0 + ], + "geoDist": [ + { "-1.0": 12 }, + { "-1.0": 12 }, + { "-1.0": 12 }, + { "-1.0": 12 }, + { "0.1": 2, "0.13": 6, "0.17": 4 }, + { "0.1": 11, "0.13": 1 }, + { "-1.0": 9, "0.04": 2, "0.06": 1 }, + { "-1.0": 12 }, + { "-1.0": 10, "0.04": 1, "0.06": 1 }, + { "-1.0": 11, "0.04": 1 }, + { "-1.0": 12 }, + { "-1.0": 12 } + ] + }, + { + "name": "A", + "type": "criteria", + "singleValue": [ + -1.0, -1.0, -1.0, -1.0, 0.17, 0.13, 0.06, -1.0, 0.06, 0.04, -1.0, + -1.0 + ], + "geoDist": [ + { "-1.0": 12 }, + { "-1.0": 12 }, + { "-1.0": 12 }, + { "-1.0": 12 }, + { "0.1": 2, "0.13": 6, "0.17": 4 }, + { "0.1": 11, "0.13": 1 }, + { "-1.0": 9, "0.04": 2, "0.06": 1 }, + { "-1.0": 12 }, + { "-1.0": 10, "0.04": 1, "0.06": 1 }, + { "-1.0": 11, "0.04": 1 }, + { "-1.0": 12 }, + { "-1.0": 12 } + ] + }, + { + "name": "A", + "type": "raw", + "singleValue": [ + 0.0, 0.0, 0.0, 0.0, 0.51, 0.39, 0.2, 0.0, 0.2, 0.12, 0.0, 0.0 + ], + "geoDist": [ + { "0.0": 12 }, + { "0.0": 12 }, + { "0.0": 12 }, + { "0.0": 12 }, + { "0.31": 2, "0.39": 6, "0.51": 4 }, + { "0.31": 11, "0.39": 1 }, + { "0.0": 9, "0.12": 2, "0.2": 1 }, + { "0.0": 12 }, + { "0.0": 10, "0.12": 1, "0.2": 1 }, + { "0.0": 11, "0.12": 1 }, + { "0.0": 12 }, + { "0.0": 12 } + ] + } + ] + } + ], + "dataDescript": [ + { + "partName": "A", + "dataName": "Snowfall: 1HR", + "dataLocation": "arn:aws:s3:::noaa-nbm-grib2-pds", + "issueDt": "2022-12-23T12:00:00.000Z" + } + ], + "metaData": [ + { + "name": "Binghamton, Snow", + "type": "condition", + "proximalThresh": -0.5, + "states": [ + { + "durationInMin": 206, + "min": -1.0, + "minAt": "2022-12-23T13:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T13:00:00.000Z", + "endDt": "2022-12-23T16:25:38.462Z", + "maxAt": "2022-12-23T16:25:38.462Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 26, + "min": -0.5, + "minAt": "2022-12-23T16:25:38.462Z", + "max": 0.0, + "startDt": "2022-12-23T16:25:38.462Z", + "endDt": "2022-12-23T16:51:16.923Z", + "maxAt": "2022-12-23T16:51:16.923Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 132, + "min": 0.0, + "minAt": "2022-12-23T16:51:16.923Z", + "max": 0.17, + "startDt": "2022-12-23T16:51:16.923Z", + "endDt": "2022-12-23T19:03:23.774Z", + "maxAt": "2022-12-23T17:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 28, + "min": -0.5, + "minAt": "2022-12-23T19:31:41.887Z", + "max": 0.0, + "startDt": "2022-12-23T19:03:23.774Z", + "endDt": "2022-12-23T19:31:41.887Z", + "maxAt": "2022-12-23T19:03:23.774Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 57, + "min": -1.0, + "minAt": "2022-12-23T20:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T19:31:41.887Z", + "endDt": "2022-12-23T20:28:18.113Z", + "maxAt": "2022-12-23T19:31:41.887Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 28, + "min": -0.5, + "minAt": "2022-12-23T20:28:18.113Z", + "max": 0.0, + "startDt": "2022-12-23T20:28:18.113Z", + "endDt": "2022-12-23T20:56:36.226Z", + "maxAt": "2022-12-23T20:56:36.226Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 66, + "min": 0.0, + "minAt": "2022-12-23T20:56:36.226Z", + "max": 0.06, + "startDt": "2022-12-23T20:56:36.226Z", + "endDt": "2022-12-23T22:02:18.462Z", + "maxAt": "2022-12-23T21:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 29, + "min": -0.5, + "minAt": "2022-12-23T22:31:09.231Z", + "max": 0.0, + "startDt": "2022-12-23T22:02:18.462Z", + "endDt": "2022-12-23T22:31:09.231Z", + "maxAt": "2022-12-23T22:02:18.462Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 89, + "min": -1.0, + "minAt": "2022-12-23T23:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T22:31:09.231Z", + "endDt": "2022-12-24T00:00:00.000Z", + "maxAt": "2022-12-23T22:31:09.231Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + } + ] + }, + { + "name": "A", + "type": "criteria", + "proximalThresh": -0.5, + "states": [ + { + "durationInMin": 206, + "min": -1.0, + "minAt": "2022-12-23T13:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T13:00:00.000Z", + "endDt": "2022-12-23T16:25:38.462Z", + "maxAt": "2022-12-23T16:25:38.462Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 26, + "min": -0.5, + "minAt": "2022-12-23T16:25:38.462Z", + "max": 0.0, + "startDt": "2022-12-23T16:25:38.462Z", + "endDt": "2022-12-23T16:51:16.923Z", + "maxAt": "2022-12-23T16:51:16.923Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 132, + "min": 0.0, + "minAt": "2022-12-23T16:51:16.923Z", + "max": 0.17, + "startDt": "2022-12-23T16:51:16.923Z", + "endDt": "2022-12-23T19:03:23.774Z", + "maxAt": "2022-12-23T17:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 28, + "min": -0.5, + "minAt": "2022-12-23T19:31:41.887Z", + "max": 0.0, + "startDt": "2022-12-23T19:03:23.774Z", + "endDt": "2022-12-23T19:31:41.887Z", + "maxAt": "2022-12-23T19:03:23.774Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 57, + "min": -1.0, + "minAt": "2022-12-23T20:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T19:31:41.887Z", + "endDt": "2022-12-23T20:28:18.113Z", + "maxAt": "2022-12-23T19:31:41.887Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 28, + "min": -0.5, + "minAt": "2022-12-23T20:28:18.113Z", + "max": 0.0, + "startDt": "2022-12-23T20:28:18.113Z", + "endDt": "2022-12-23T20:56:36.226Z", + "maxAt": "2022-12-23T20:56:36.226Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 66, + "min": 0.0, + "minAt": "2022-12-23T20:56:36.226Z", + "max": 0.06, + "startDt": "2022-12-23T20:56:36.226Z", + "endDt": "2022-12-23T22:02:18.462Z", + "maxAt": "2022-12-23T21:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 29, + "min": -0.5, + "minAt": "2022-12-23T22:31:09.231Z", + "max": 0.0, + "startDt": "2022-12-23T22:02:18.462Z", + "endDt": "2022-12-23T22:31:09.231Z", + "maxAt": "2022-12-23T22:02:18.462Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 89, + "min": -1.0, + "minAt": "2022-12-23T23:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T22:31:09.231Z", + "endDt": "2022-12-24T00:00:00.000Z", + "maxAt": "2022-12-23T22:31:09.231Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + } + ] + } + ] + } + ] +} diff --git a/python/idsse_testing/risk_processor/binghamton/raw_data_binghamton_snow.json b/python/idsse_testing/risk_processor/binghamton/raw_data_binghamton_snow.json new file mode 100644 index 0000000..3b8e341 --- /dev/null +++ b/python/idsse_testing/risk_processor/binghamton/raw_data_binghamton_snow.json @@ -0,0 +1,6 @@ +[ + 0.5118110179901123, 0.3937007784843445, 0.31496062874794006, + 0.31496062874794006, 0.5118110179901123, 0.3937007784843445, + 0.3937007784843445, 0.5118110179901123, 0.3937007784843445, + 0.3937007784843445, 0.3937007784843445, 0.5118110179901123 +] diff --git a/python/idsse_testing/risk_processor/data_service_valids_request.json b/python/idsse_testing/risk_processor/data_service_valids_request.json new file mode 100644 index 0000000..bf98d4d --- /dev/null +++ b/python/idsse_testing/risk_processor/data_service_valids_request.json @@ -0,0 +1,13 @@ +{ + "corrId": { + "originator": "RiskProcessor", + "uuid": "b6591cc7-8b33-4cd3-aa22-408c83ac5e3c", + "issueDt": "2023-01-10T06:00:00.000Z" + }, + "sourceType": "valids", + "sourceObj": { + "field": "TEMPERATURE", + "product": "NBM", + "issueDt": "2023-01-10T06:00:00.000Z" + } +} \ No newline at end of file diff --git a/python/idsse_testing/risk_processor/data_service_valids_response.json b/python/idsse_testing/risk_processor/data_service_valids_response.json new file mode 100644 index 0000000..e11ce7e --- /dev/null +++ b/python/idsse_testing/risk_processor/data_service_valids_response.json @@ -0,0 +1,21 @@ +{ + "request": { + "corrId": { + "originator": "IDSSe", + "uuid": "b6591cc7-8b33-4cd3-aa22-408c83ac5e3c", + "issueDt": "2023-01-10T06:00:00.000Z" + }, + "sourceType": "valids", + "sourceObj": { + "field": "TEMPERATURE", + "product": "NBM.AWS.GRIB", + "issueDt": "2023-01-10T06:00:00.000Z", + "validDt": "2023-01-11T08:00:00.000Z" + } + }, + "valids": [ + "2023-01-11T06:00:00.000Z", + "2023-01-11T07:00:00.000Z", + "2023-01-11T08:00:00.000Z" + ] +} \ No newline at end of file diff --git a/python/idsse_testing/risk_processor/event_portfolio_metadata_example.json b/python/idsse_testing/risk_processor/event_portfolio_metadata_example.json new file mode 100644 index 0000000..2a6af54 --- /dev/null +++ b/python/idsse_testing/risk_processor/event_portfolio_metadata_example.json @@ -0,0 +1,158 @@ +{ + "dataSummary": [ + { + "validDt": [ + "2022-01-11T22:00:00.000Z", + "2022-01-11T23:00:00.000Z", + "2022-01-12T00:00:00.000Z", + "2022-01-12T01:00:00.000Z", + "2022-01-12T02:00:00.000Z" + ], + "data": [ + { + "name": "Some fictional condition", + "type": "condition", + "singleValue": [ + -0.29564464, + -0.5432, + 0.995, + 0.4432, + -0.0123 + ] + }, + { + "name": "Other condition", + "type": "condition", + "singleValue": [ + -1, + -1, + -1, + 0, + 0.5 + ] + }, + { + "name": "Raw data", + "type": "raw", + "singleValue": [ + 12, + 34, + 45, + 56, + 78 + ] + } + ] + } + ], + "metaData": [ + { + "name": "Some fictional condition", + "type": "condition", + "states": [ + { + "durationInMin": 50, + "min": -0.5, + "minAt": "2022-01-11T22:49:31.777Z", + "max": -0.3, + "startDt": "2022-01-11T22:00:00.000Z", + "endDt": "2022-01-11T22:49:31.777Z", + "maxAt": "2022-01-11T22:00:00.000Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 12, + "min": -0.54, + "minAt": "2022-01-11T23:00:00.000Z", + "max": -0.5, + "startDt": "2022-01-11T22:49:31.777Z", + "endDt": "2022-01-11T23:01:41.105Z", + "maxAt": "2022-01-11T22:49:31.777Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 20, + "min": -0.5, + "minAt": "2022-01-11T23:01:41.105Z", + "max": 0.0, + "startDt": "2022-01-11T23:01:41.105Z", + "endDt": "2022-01-11T23:21:11.304Z", + "maxAt": "2022-01-11T23:21:11.304Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 157, + "min": 0.0, + "minAt": "2022-01-11T23:21:11.304Z", + "max": 1.0, + "startDt": "2022-01-11T23:21:11.304Z", + "endDt": "2022-01-12T01:58:22.788Z", + "maxAt": "2022-01-12T00:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 2, + "min": -0.01, + "minAt": "2022-01-12T02:00:00.000Z", + "max": 0.0, + "startDt": "2022-01-12T01:58:22.788Z", + "endDt": "2022-01-12T02:00:00.000Z", + "maxAt": "2022-01-12T01:58:22.788Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + } + ] + }, + { + "name": "Other condition", + "type": "condition", + "states": [ + { + "durationInMin": 150, + "min": -1.0, + "minAt": "2022-01-11T22:00:00.000Z", + "max": -0.5, + "startDt": "2022-01-11T22:00:00.000Z", + "endDt": "2022-01-12T00:30:00.000Z", + "maxAt": "2022-01-12T00:30:00.000Z", + "empirical": "MISS", + "geographical": "PROXIMAL", + "temporal": "HIT" + }, + { + "durationInMin": 30, + "min": -0.5, + "minAt": "2022-01-12T00:30:00.000Z", + "max": 0.0, + "startDt": "2022-01-12T00:30:00.000Z", + "endDt": "2022-01-12T01:00:00.000Z", + "maxAt": "2022-01-12T01:00:00.000Z", + "empirical": "PROXIMAL", + "geographical": "PROXIMAL", + "temporal": "HIT" + }, + { + "durationInMin": 60, + "min": 0.0, + "minAt": "2022-01-12T01:00:00.000Z", + "max": 0.5, + "startDt": "2022-01-12T01:00:00.000Z", + "endDt": "2022-01-12T02:00:00.000Z", + "maxAt": "2022-01-12T02:00:00.000Z", + "empirical": "HIT", + "geographical": "PROXIMAL", + "temporal": "HIT" + } + ] + } + ] +} \ No newline at end of file diff --git a/python/idsse_testing/risk_processor/i87/2022_12_23_13_00_I87_TEMP.nc b/python/idsse_testing/risk_processor/i87/2022_12_23_13_00_I87_TEMP.nc new file mode 100644 index 0000000..71bff2f Binary files /dev/null and b/python/idsse_testing/risk_processor/i87/2022_12_23_13_00_I87_TEMP.nc differ diff --git a/python/idsse_testing/risk_processor/i87/2022_12_23_14_00_I87_TEMP.nc b/python/idsse_testing/risk_processor/i87/2022_12_23_14_00_I87_TEMP.nc new file mode 100644 index 0000000..4104db2 Binary files /dev/null and b/python/idsse_testing/risk_processor/i87/2022_12_23_14_00_I87_TEMP.nc differ diff --git a/python/idsse_testing/risk_processor/i87/2022_12_23_15_00_I87_TEMP.nc b/python/idsse_testing/risk_processor/i87/2022_12_23_15_00_I87_TEMP.nc new file mode 100644 index 0000000..2c354a8 Binary files /dev/null and b/python/idsse_testing/risk_processor/i87/2022_12_23_15_00_I87_TEMP.nc differ diff --git a/python/idsse_testing/risk_processor/i87/2022_12_23_I87_TEMP_FAHRENHEIT_SLICE.nc b/python/idsse_testing/risk_processor/i87/2022_12_23_I87_TEMP_FAHRENHEIT_SLICE.nc new file mode 100644 index 0000000..31de445 Binary files /dev/null and b/python/idsse_testing/risk_processor/i87/2022_12_23_I87_TEMP_FAHRENHEIT_SLICE.nc differ diff --git a/python/idsse_testing/risk_processor/i87/criteria_i87_freezing_rain.json b/python/idsse_testing/risk_processor/i87/criteria_i87_freezing_rain.json new file mode 100644 index 0000000..ff4e08a --- /dev/null +++ b/python/idsse_testing/risk_processor/i87/criteria_i87_freezing_rain.json @@ -0,0 +1,99 @@ +{ + "corrId": { + "originator": "IDSSe", + "uuid": "11111111-beec-467b-a0e6-9d215b715b97", + "issueDt": "2022-12-23T12:00:00.000Z" + }, + "issueDt": "2022-12-23T12:00:00.000Z", + "location": { + "features": [ + { + "type": "Feature", + "properties": { + "name": "Location 1" + }, + "geometry": { + "coordinates": [ + [-73.7590024537097, 42.65591696534881], + [-73.90942792831065, 42.23822787157235], + [-74.06762300901649, 41.87759195324239], + [-74.06833074286453, 41.47501813192122], + [-74.19523410397834, 41.22676406380836], + [-74.16592315820024, 41.132081305023206], + [-74.19779358251459, 41.03313792372083], + [-74.31356413534577, 41.03313792372083], + [-74.34463257389241, 40.89758661905506], + [-74.2799359199833, 40.79969530956663], + [-74.02190712335938, 40.706913872561074] + ], + "type": "LineString" + } + } + ] + }, + "validDt": [ + {"start": "2022-12-23T12:00:00.000Z", "end": "2022-12-24T00:00:00.000Z"} + ], + "conditions": [ + { + "name": "I-87, Albany-Nyack, Icy Roads", + "severity": "MODERATE", + "combined": "A AND B", + "partsUsed": [ + "A", + "B" + ] + } + ], + "parts": [ + { + "name": "A", + "duration": 0, + "arealPercentage": 0, + "region": "CONUS", + "product": { + "fcst": [ + "NBM" + ] + }, + "field": "TEMP", + "units": "Fahrenheit", + "relational": "LESS THAN OR EQUAL", + "thresh": 35, + "mapping": { + "min": 20.0, + "max": 50.0, + "clip": "true" + } + }, + { + "name": "B", + "duration": 0, + "arealPercentage": 0, + "region": "CONUS", + "product": { + "fcst": [ + "NBM" + ] + }, + "field": "1 HR RAINFALL", + "units": "INCHES", + "relational": "GREATER THAN OR EQUAL", + "thresh": 0.01, + "mapping": { + "min": 0, + "max": 3, + "clip": "true" + } + } + ], + "tags": { + "values": [ + "I-87, Albany-Nyack, Icy Roads" + ], + "keyValues": { + "name": "I-87, Albany-Nyack, Icy Roads", + "nwsOffice": "ALY" + } + } +} \ No newline at end of file diff --git a/python/idsse_testing/risk_processor/i87/data_service_condition_request_i87.json b/python/idsse_testing/risk_processor/i87/data_service_condition_request_i87.json new file mode 100644 index 0000000..696c925 --- /dev/null +++ b/python/idsse_testing/risk_processor/i87/data_service_condition_request_i87.json @@ -0,0 +1,116 @@ +{ + "corrId": { + "originator": "IDSSe", + "uuid": "11111111-beec-467b-a0e6-9d215b715b97", + "issueDt": "2022-12-23T12:00:00.000Z" + }, + "label": "I-87, Albany-Nyack, Icy Roads", + "sourceType": "join", + "sourceObj": { + "join": "AND", + "sources": [ + { + "sourceType": "condition", + "label": "A:ThreatLevel", + "sourceObj": { + "relational": "LESS THAN OR EQUAL", + "thresh": 35, + "mapping": { + "startWeight": [ + 0, + 1, + 0 + ], + "endWeight": [ + 0, + 1, + 0 + ], + "controlPoints": [ + "-Infinity", + 20.0, + 50.0, + "Infinity" + ] + }, + "source": { + "sourceType": "units", + "label": "A:Raw", + "sourceObj": { + "units": "Fahrenheit", + "source": { + "sourceType": "slice", + "sourceObj": { + "slice": "[1801:2201,746:1046]", + "source": { + "sourceType": "data", + "sourceObj": { + "product": { + "fcst": [ + "NBM" + ] + }, + "field": "TEMP", + "region": "CONUS", + "validDt": "2022-12-23T13:00:00.000Z", + "issueDt": "2022-12-23T12:00:00.000Z" + } + } + } + } + } + } + } + }, + { + "sourceType": "condition", + "label": "B:ThreatLevel", + "sourceObj": { + "relational": "GREATER THAN OR EQUAL", + "thresh": 0.01, + "mapping": { + "startWeight": [ + 0, + 1, + 0 + ], + "endWeight": [ + 0, + 1, + 0 + ], + "controlPoints": [ + "-Infinity", + 0, + 3, + "Infinity" + ] + }, + "source": { + "sourceType": "units", + "label": "B:Raw", + "sourceObj": { + "units": "INCHES", + "source": { + "sourceType": "slice", + "sourceObj": { + "slice": "[1801:2201,746:1046]", + "source": { + "sourceType": "data", + "sourceObj": { + "product": "NBM", + "field": "1 HR RAINFALL", + "region": "CONUS", + "validDt": "2022-12-23T13:00:00.000Z", + "issueDt": "2022-12-23T12:00:00.000Z" + } + } + } + } + } + } + } + } + ] + } +} \ No newline at end of file diff --git a/python/idsse_testing/risk_processor/i87/data_service_condition_response_i87.json b/python/idsse_testing/risk_processor/i87/data_service_condition_response_i87.json new file mode 100644 index 0000000..8ae21fa --- /dev/null +++ b/python/idsse_testing/risk_processor/i87/data_service_condition_response_i87.json @@ -0,0 +1,189 @@ +{ + "A:Raw": { + "filenames": { + "Deterministic": "/share/2022/12/23/NBM.AWS.GRIB/TEMP/Fahrenheit/gridstore-1492124782.nc" + }, + "issue_dt": "2022-12-23T12:00:00.000Z", + "valid_dt": "2022-12-23T13:00:00.000Z", + "proj_name": "NBM", + "region": "CONUS", + "slice": "[1801:2201,746:1046]", + "proj_spec": "+proj=lcc +lat_0=25.0 +lon_0=-95.0 +lat_1=25.0 +a=6371200", + "grid_spec": "+dx=2539.703 +dy=2539.703 +w=400 +h=300 +lat_ll=38.890989440701716 +lon_ll=-80.37708064973489", + "units": "Fahrenheit", + "data_name": "Temperature: 2m (Ensemble mean)", + "data_loc": "arn:aws:s3:::noaa-nbm-grib2-pds:" + }, + "A:ThreatLevel": { + "filenames": { + "Deterministic": "/share/2022/12/23/NBM.AWS.GRIB/TEMP.Criteria/ThreatLevel/gridstore1698359448.nc" + }, + "issue_dt": "2022-12-23T12:00:00.000Z", + "valid_dt": "2022-12-23T13:00:00.000Z", + "proj_name": "NBM", + "region": "CONUS", + "slice": "[1801:2201,746:1046]", + "proj_spec": "+proj=lcc +lat_0=25.0 +lon_0=-95.0 +lat_1=25.0 +a=6371200", + "grid_spec": "+dx=2539.703 +dy=2539.703 +w=400 +h=300 +lat_ll=38.890989440701716 +lon_ll=-80.37708064973489", + "units": "ThreatLevel", + "data_name": "Temperature: 2m (Ensemble mean)", + "data_loc": "arn:aws:s3:::noaa-nbm-grib2-pds:" + }, + "B:Raw": { + "filenames": { + "Deterministic": "/share/2022/12/23/NBM.AWS.GRIB/RAIN1HR/Inches/gridstore1563243851.nc" + }, + "issue_dt": "2022-12-23T12:00:00.000Z", + "valid_dt": "2022-12-23T13:00:00.000Z", + "proj_name": "NBM", + "region": "CONUS", + "slice": "[1801:2201,746:1046]", + "proj_spec": "+proj=lcc +lat_0=25.0 +lon_0=-95.0 +lat_1=25.0 +a=6371200", + "grid_spec": "+dx=2539.703 +dy=2539.703 +w=400 +h=300 +lat_ll=38.890989440701716 +lon_ll=-80.37708064973489", + "units": "Inches", + "data_name": "Rainfall: 1hr accum (APCP)", + "data_loc": "arn:aws:s3:::noaa-nbm-grib2-pds:" + }, + "B:ThreatLevel": { + "filenames": { + "Deterministic": "/share/2022/12/23/NBM.AWS.GRIB/RAIN1HR.Criteria/ThreatLevel/gridstore-85065583.nc" + }, + "issue_dt": "2022-12-23T12:00:00.000Z", + "valid_dt": "2022-12-23T13:00:00.000Z", + "proj_name": "NBM", + "region": "CONUS", + "slice": "[1801:2201,746:1046]", + "proj_spec": "+proj=lcc +lat_0=25.0 +lon_0=-95.0 +lat_1=25.0 +a=6371200", + "grid_spec": "+dx=2539.703 +dy=2539.703 +w=400 +h=300 +lat_ll=38.890989440701716 +lon_ll=-80.37708064973489", + "units": "ThreatLevel", + "data_name": "Rainfall: 1hr accum (APCP)", + "data_loc": "arn:aws:s3:::noaa-nbm-grib2-pds:" + }, + "I-87, Albany-Nyack, Icy Roads": { + "filenames": { + "Deterministic": "/share/2022/12/23/NBM.AWS.GRIB/Criteria/ThreatLevel/gridstore-2042697837.nc" + }, + "issue_dt": "2022-12-23T12:00:00.000Z", + "valid_dt": "2022-12-23T13:00:00.000Z", + "proj_name": "NBM", + "region": "CONUS", + "slice": "[1801:2201,746:1046]", + "proj_spec": "+proj=lcc +lat_0=25.0 +lon_0=-95.0 +lat_1=25.0 +a=6371200", + "grid_spec": "+dx=2539.703 +dy=2539.703 +w=400 +h=300 +lat_ll=38.890989440701716 +lon_ll=-80.37708064973489", + "units": "ThreatLevel", + "data_name": "AND(Temperature: 2m (Ensemble mean), Rainfall: 1hr accum (APCP))", + "data_loc": "arn:aws:s3:::noaa-nbm-grib2-pds:" + }, + "request": { + "corrId": { + "originator": "IDSSe", + "uuid": "11111111-beec-467b-a0e6-9d215b715b97", + "issueDt": "2022-12-23T12:00:00.000Z" + }, + "label": "I-87, Albany-Nyack, Icy Roads", + "sourceType": "join", + "sourceObj": { + "join": "AND", + "sources": [ + { + "sourceType": "condition", + "label": "A:ThreatLevel", + "sourceObj": { + "relational": "LESS THAN OR EQUAL", + "thresh": 35, + "mapping": { + "startWeight": [ + 0, + 1, + 0 + ], + "endWeight": [ + 0, + 1, + 0 + ], + "controlPoints": [ + "-Infinity", + 20.0, + 50.0, + "Infinity" + ] + }, + "source": { + "sourceType": "units", + "label": "A:Raw", + "sourceObj": { + "units": "Fahrenheit", + "source": { + "sourceType": "slice", + "sourceObj": { + "slice": "[1801:2201,746:1046]", + "source": { + "sourceType": "data", + "sourceObj": { + "product": "NBM", + "field": "TEMP", + "region": "CONUS", + "validDt": "2022-12-23T13:00:00.000Z", + "issueDt": "2022-12-23T12:00:00.000Z" + } + } + } + } + } + } + } + }, + { + "sourceType": "condition", + "label": "B:ThreatLevel", + "sourceObj": { + "relational": "GREATER THAN OR EQUAL", + "thresh": 0.01, + "mapping": { + "startWeight": [ + 0, + 1, + 0 + ], + "endWeight": [ + 0, + 1, + 0 + ], + "controlPoints": [ + "-Infinity", + 0, + 3, + "Infinity" + ] + }, + "source": { + "sourceType": "units", + "label": "B:Raw", + "sourceObj": { + "units": "INCHES", + "source": { + "sourceType": "slice", + "sourceObj": { + "slice": "[1801:2201,746:1046]", + "source": { + "sourceType": "data", + "sourceObj": { + "product": "NBM", + "field": "1 HR RAINFALL", + "region": "CONUS", + "validDt": "2022-12-23T13:00:00.000Z", + "issueDt": "2022-12-23T12:00:00.000Z" + } + } + } + } + } + } + } + } + ] + } + } +} \ No newline at end of file diff --git a/python/idsse_testing/risk_processor/i87/event_portfolio_i87_freezing_rain.json b/python/idsse_testing/risk_processor/i87/event_portfolio_i87_freezing_rain.json new file mode 100644 index 0000000..07903d3 --- /dev/null +++ b/python/idsse_testing/risk_processor/i87/event_portfolio_i87_freezing_rain.json @@ -0,0 +1,846 @@ +{ + "corrId": { + "originator": "IDSSe", + "uuid": "11111111-beec-467b-a0e6-9d215b715b97", + "issueDt": "2022-12-23T12:00:00.000Z" + }, + "issueDt": "2022-12-23T12:00:00.000Z", + "location": { + "features": [ + { + "type": "Feature", + "properties": { + "name": "Location 1" + }, + "geometry": { + "coordinates": [ + [-73.7590024537097, 42.65591696534881], + [-73.90942792831065, 42.23822787157235], + [-74.06762300901649, 41.87759195324239], + [-74.06833074286453, 41.47501813192122], + [-74.19523410397834, 41.22676406380836], + [-74.16592315820024, 41.132081305023206], + [-74.19779358251459, 41.03313792372083], + [-74.31356413534577, 41.03313792372083], + [-74.34463257389241, 40.89758661905506], + [-74.2799359199833, 40.79969530956663], + [-74.02190712335938, 40.706913872561074] + ], + "type": "LineString" + } + } + ] + }, + "validDt": [ + {"start": "2022-12-23T12:00:00.000Z", "end": "2022-12-24T00:00:00.000Z"} + ], + "conditions": [ + { + "name": "I-87, Albany-Nyack, Icy Roads", + "severity": "MODERATE", + "combined": "A AND B", + "partsUsed": [ + "A", + "B" + ] + } + ], + "parts": [ + { + "name": "A", + "duration": 0, + "arealPercentage": 0, + "region": "CONUS", + "product": { + "fcst": [ + "NBM" + ] + }, + "field": "TEMP", + "units": "Fahrenheit", + "relational": "LESS THAN OR EQUAL", + "thresh": 35, + "mapping": { + "min": 20.0, + "max": 50.0, + "clip": "true" + } + }, + { + "name": "B", + "duration": 0, + "arealPercentage": 0, + "region": "CONUS", + "product": { + "fcst": [ + "NBM" + ] + }, + "field": "1 HR RAINFALL", + "units": "INCHES", + "relational": "GREATER THAN OR EQUAL", + "thresh": 0.01, + "mapping": { + "min": 0, + "max": 3, + "clip": "true" + } + } + ], + "tags": { + "values": [ + "I-87, Albany-Nyack, Icy Roads" + ], + "keyValues": { + "name": "I-87, Albany-Nyack, Icy Roads", + "nwsOffice": "ALY" + } + }, + "riskResults": [ + { + "evaluatedAt": "2023-02-21T15:31:39.000Z", + "conditionKey": "I-87, Albany-Nyack, Icy Roads", + "productKey": "NBM", + "locationKey": "Single Location", + "dataSummary": [ + { + "validDt": [ + "2022-12-23T13:00:00.000Z", + "2022-12-23T14:00:00.000Z", + "2022-12-23T15:00:00.000Z", + "2022-12-23T16:00:00.000Z", + "2022-12-23T17:00:00.000Z", + "2022-12-23T18:00:00.000Z", + "2022-12-23T19:00:00.000Z", + "2022-12-23T20:00:00.000Z", + "2022-12-23T21:00:00.000Z", + "2022-12-23T22:00:00.000Z", + "2022-12-23T23:00:00.000Z", + "2022-12-24T00:00:00.000Z" + ], + "data": [ + { + "name": "I-87, Albany-Nyack, Icy Roads", + "type": "condition", + "singleValue": [-0.8666666746139526, -0.7333333492279053, -0.5333333611488342, -0.4000000059604645, -0.3333333432674408, 0.0070947217755019665, 0.2357022762298584, 0.2357022762298584, 0.1885618269443512, -1, -1, -1], + "geoDist": [ + { + "-0.8666666746139526": 5, + "-1.0": 76, + "-0.9333333373069763": 19 + }, + { + "-1.0": 62, + "-0.8666666746139526": 25, + "-0.7333333492279053": 2, + "-0.9333333373069763": 10, + "-0.800000011920929": 1 + }, + { + "-0.6000000238418579": 3, + "-0.6666666865348816": 5, + "-1.0": 45, + "-0.8666666746139526": 25, + "-0.7333333492279053": 3, + "-0.5333333611488342": 4, + "-0.800000011920929": 12, + "-0.9333333373069763": 3 + }, + { + "-0.6000000238418579": 24, + "-0.6666666865348816": 28, + "-1.0": 5, + "-0.8666666746139526": 1, + "-0.4000000059604645": 3, + "-0.7333333492279053": 20, + "-0.5333333611488342": 5, + "-0.46666666865348816": 3, + "-0.800000011920929": 5, + "-0.9333333373069763": 6 + }, + { + "-0.6000000238418579": 20, + "-0.3333333432674408": 13, + "-0.6666666865348816": 2, + "-0.4000000059604645": 8, + "-0.7333333492279053": 7, + "-0.5333333611488342": 39, + "-0.46666666865348816": 11 + }, + { + "-0.6000000238418579": 1, + "-0.3333333432674408": 15, + "-0.6666666865348816": 6, + "0.0047298152931034565": 1, + "-0.4000000059604645": 12, + "0.0070947217755019665": 5, + "-0.13333334028720856": 13, + "-0.20000000298023224": 14, + "-0.5333333611488342": 11, + "-0.46666666865348816": 13, + "-0.06666667014360428": 5, + "-0.2666666805744171": 4 + }, + { + "0.14150042831897736": 1, + "-0.3333333432674408": 15, + "0.0047298152931034565": 7, + "0.09431056678295135": 4, + "-0.4000000059604645": 2, + "-0.13333334028720856": 10, + "0.0023649081122130156": 6, + "-0.20000000298023224": 3, + "0.1885618269443512": 1, + "-0.2666666805744171": 4, + "-1.0": 32, + "0.14144113659858704": 2, + "0.18857665359973907": 1, + "0.2357022762298584": 1, + "-0.46666666865348816": 7, + "-0.06666667014360428": 4 + }, + { + "-1.0": 82, + "0.2357022762298584": 3, + "-0.13333334028720856": 1, + "-0.20000000298023224": 7, + "-0.06666667014360428": 5, + "0.1885618269443512": 2 + }, + { + "-1.0": 83, + "0.0942809134721756": 10, + "0.0471404567360878": 3, + "0.1885618269443512": 2, + "0.1414213627576828": 2 + }, + { + "-1.0": 100 + }, + { + "-1.0": 100 + }, + { + "-1.0": 100 + } + ] + }, + { + "name": "A", + "type": "criteria", + "singleValue": [-0.8666666746139526, -0.7333333492279053, -0.5333333611488342, -0.4000000059604645, -0.3333333432674408, 0, 0.3333333432674408, 0.6000000238418579, 0.8666666746139526, 1, 1, 1], + "geoDist": [ + { + "-0.8666666746139526": 7, + "-1.0": 68, + "-0.9333333373069763": 25 + }, + { + "-0.8666666746139526": 46, + "-1.0": 10, + "-0.7333333492279053": 13, + "-0.800000011920929": 12, + "-0.9333333373069763": 19 + }, + { + "-0.6000000238418579": 4, + "-0.6666666865348816": 7, + "-0.8666666746139526": 32, + "-1.0": 6, + "-0.7333333492279053": 27, + "-0.5333333611488342": 5, + "-0.800000011920929": 16, + "-0.9333333373069763": 3 + }, + { + "-0.6000000238418579": 27, + "-0.6666666865348816": 30, + "-0.8666666746139526": 1, + "-0.4000000059604645": 3, + "-0.7333333492279053": 20, + "-0.5333333611488342": 5, + "-0.46666666865348816": 3, + "-0.800000011920929": 5, + "-0.9333333373069763": 6 + }, + { + "-0.6000000238418579": 20, + "-0.3333333432674408": 13, + "-0.6666666865348816": 2, + "-0.4000000059604645": 8, + "-0.7333333492279053": 7, + "-0.5333333611488342": 39, + "-0.46666666865348816": 11 + }, + { + "-0.0": 6, + "-0.6000000238418579": 1, + "-0.3333333432674408": 15, + "-0.6666666865348816": 6, + "-0.4000000059604645": 12, + "-0.13333334028720856": 13, + "-0.20000000298023224": 14, + "-0.5333333611488342": 11, + "-0.46666666865348816": 13, + "-0.06666667014360428": 5, + "-0.2666666805744171": 4 + }, + { + "0.13333334028720856": 10, + "-0.3333333432674408": 15, + "0.3333333432674408": 4, + "-0.4000000059604645": 2, + "-0.13333334028720856": 10, + "-0.20000000298023224": 3, + "0.2666666805744171": 5, + "-0.2666666805744171": 4, + "-0.0": 14, + "0.20000000298023224": 17, + "0.06666667014360428": 5, + "-0.46666666865348816": 7, + "-0.06666667014360428": 4 + }, + { + "0.4000000059604645": 13, + "0.13333334028720856": 4, + "0.3333333432674408": 3, + "-0.13333334028720856": 4, + "-0.20000000298023224": 8, + "0.46666666865348816": 4, + "0.2666666805744171": 10, + "-0.0": 3, + "0.5333333611488342": 14, + "0.20000000298023224": 6, + "0.06666667014360428": 6, + "-0.06666667014360428": 14, + "0.6000000238418579": 11 + }, + { + "0.4000000059604645": 4, + "0.13333334028720856": 15, + "0.3333333432674408": 5, + "0.800000011920929": 13, + "0.46666666865348816": 8, + "0.6666666865348816": 12, + "0.2666666805744171": 5, + "0.7333333492279053": 6, + "0.5333333611488342": 11, + "0.20000000298023224": 5, + "0.8666666746139526": 9, + "0.06666667014360428": 3, + "0.6000000238418579": 4 + }, + { + "0.5333333611488342": 5, + "1.0": 36, + "0.800000011920929": 13, + "0.8666666746139526": 10, + "0.9333333373069763": 1, + "0.46666666865348816": 8, + "0.6666666865348816": 13, + "0.7333333492279053": 5, + "0.6000000238418579": 9 + }, + { + "1.0": 68, + "0.800000011920929": 4, + "0.8666666746139526": 16, + "0.9333333373069763": 6, + "0.7333333492279053": 6 + }, + { + "1.0": 100 + } + ] + }, + { + "name": "A", + "type": "raw", + "singleValue": [48, 46, 43, 41, 40, 35, 30, 26, 22, 18, 15, 11], + "geoDist": [ + { + "50.0": 45, + "51.0": 20, + "52.0": 3, + "48.0": 7, + "49.0": 25 + }, + { + "50.0": 8, + "51.0": 2, + "46.0": 13, + "47.0": 12, + "48.0": 46, + "49.0": 19 + }, + { + "50.0": 4, + "51.0": 2, + "43.0": 5, + "44.0": 4, + "45.0": 7, + "46.0": 27, + "47.0": 16, + "48.0": 32, + "49.0": 3 + }, + { + "41.0": 3, + "42.0": 3, + "43.0": 5, + "44.0": 27, + "45.0": 30, + "46.0": 20, + "47.0": 5, + "48.0": 1, + "49.0": 6 + }, + { + "40.0": 13, + "41.0": 8, + "42.0": 11, + "43.0": 39, + "44.0": 20, + "45.0": 2, + "46.0": 7 + }, + { + "39.0": 4, + "36.0": 5, + "35.0": 6, + "40.0": 15, + "41.0": 12, + "42.0": 13, + "43.0": 11, + "44.0": 1, + "45.0": 6, + "37.0": 13, + "38.0": 14 + }, + { + "40.0": 15, + "41.0": 2, + "30.0": 4, + "39.0": 4, + "36.0": 4, + "35.0": 14, + "34.0": 5, + "33.0": 10, + "32.0": 17, + "31.0": 5, + "42.0": 7, + "37.0": 10, + "38.0": 3 + }, + { + "30.0": 3, + "27.0": 14, + "26.0": 11, + "36.0": 14, + "35.0": 3, + "34.0": 6, + "33.0": 4, + "32.0": 6, + "31.0": 10, + "37.0": 4, + "29.0": 13, + "38.0": 8, + "28.0": 4 + }, + { + "30.0": 5, + "27.0": 11, + "26.0": 4, + "25.0": 12, + "24.0": 6, + "34.0": 3, + "23.0": 13, + "33.0": 15, + "22.0": 9, + "32.0": 5, + "31.0": 5, + "29.0": 4, + "28.0": 8 + }, + { + "27.0": 5, + "26.0": 9, + "25.0": 13, + "24.0": 5, + "23.0": 13, + "22.0": 10, + "21.0": 1, + "20.0": 20, + "19.0": 11, + "18.0": 5, + "28.0": 8 + }, + { + "16.0": 17, + "15.0": 15, + "24.0": 6, + "23.0": 4, + "22.0": 16, + "21.0": 6, + "20.0": 14, + "19.0": 4, + "18.0": 13, + "17.0": 5 + }, + { + "16.0": 11, + "15.0": 15, + "14.0": 4, + "13.0": 21, + "12.0": 8, + "11.0": 2, + "20.0": 11, + "19.0": 16, + "18.0": 7, + "17.0": 5 + } + ] + }, + { + "name": "B", + "type": "criteria", + "singleValue": [0.0334448367357254, 0.02006690390408039, 0.00668896920979023, 0.01337793655693531, 0.023411385715007782, 0.01337793655693531, 0.00668896920979023, 0, 0, -1, -1, -1], + "geoDist": [ + { + "0.010033451952040195": 3, + "0.0334448367357254": 1, + "0.023411385715007782": 13, + "-1.0": 21, + "0.030100354924798012": 2, + "0.00668896920979023": 5, + "0.01672242023050785": 2, + "1.7941197416604382E-9": 13, + "0.01337793655693531": 3, + "0.003344485303387046": 22, + "0.02006690390408039": 4, + "0.026755869388580322": 11 + }, + { + "0.010033451952040195": 6, + "-1.0": 55, + "0.01672242023050785": 9, + "0.00668896920979023": 11, + "1.7941197416604382E-9": 10, + "0.01337793655693531": 5, + "0.003344485303387046": 2, + "0.02006690390408039": 2 + }, + { + "-1.0": 39, + "0.00668896920979023": 5, + "1.7941197416604382E-9": 45, + "0.003344485303387046": 11 + }, + { + "0.010033451952040195": 21, + "-1.0": 5, + "0.00668896920979023": 16, + "1.7941197416604382E-9": 14, + "0.01337793655693531": 1, + "0.003344485303387046": 43 + }, + { + "0.010033451952040195": 18, + "0.023411385715007782": 1, + "0.01672242023050785": 24, + "0.00668896920979023": 10, + "0.01337793655693531": 24, + "0.003344485303387046": 6, + "0.02006690390408039": 17 + }, + { + "0.010033451952040195": 33, + "0.00668896920979023": 10, + "1.7941197416604382E-9": 3, + "0.01337793655693531": 37, + "0.003344485303387046": 17 + }, + { + "-1.0": 32, + "0.00668896920979023": 9, + "1.7941197416604382E-9": 9, + "0.003344485303387046": 50 + }, + { + "-1.0": 82, + "1.7941197416604382E-9": 18 + }, + { + "-1.0": 83, + "1.7941197416604382E-9": 17 + }, + { + "-1.0": 100 + }, + { + "-1.0": 100 + }, + { + "-1.0": 100 + } + ] + }, + { + "name": "B", + "type": "raw", + "singleValue": [0.11000006645917892, 0.0700000450015068, 0.03000001795589924, 0.05000003054738045, 0.08000004291534424, 0.05000003054738045, 0.03000001795589924, 0.01000000536441803, 0.01000000536441803, 0, 0, 0], + "geoDist": [ + { + "0.02000001072883606": 22, + "0.09000004827976227": 11, + "0.0": 21, + "0.05000003054738045": 3, + "0.01000000536441803": 13, + "0.08000004291534424": 13, + "0.03000001795589924": 5, + "0.0700000450015068": 4, + "0.04000002145767212": 3, + "0.11000006645917892": 1, + "0.06000003591179848": 2, + "0.1000000610947609": 2 + }, + { + "0.02000001072883606": 2, + "0.0": 55, + "0.05000003054738045": 5, + "0.01000000536441803": 10, + "0.03000001795589924": 11, + "0.0700000450015068": 2, + "0.04000002145767212": 6, + "0.06000003591179848": 9 + }, + { + "0.02000001072883606": 11, + "0.0": 39, + "0.01000000536441803": 45, + "0.03000001795589924": 5 + }, + { + "0.02000001072883606": 43, + "0.0": 5, + "0.05000003054738045": 1, + "0.01000000536441803": 14, + "0.03000001795589924": 16, + "0.04000002145767212": 21 + }, + { + "0.02000001072883606": 6, + "0.05000003054738045": 24, + "0.08000004291534424": 1, + "0.03000001795589924": 10, + "0.0700000450015068": 17, + "0.04000002145767212": 18, + "0.06000003591179848": 24 + }, + { + "0.02000001072883606": 17, + "0.05000003054738045": 37, + "0.01000000536441803": 3, + "0.03000001795589924": 10, + "0.04000002145767212": 33 + }, + { + "0.02000001072883606": 50, + "0.0": 32, + "0.01000000536441803": 9, + "0.03000001795589924": 9 + }, + { + "0.0": 82, + "0.01000000536441803": 18 + }, + { + "0.0": 83, + "0.01000000536441803": 17 + }, + { + "0.0": 100 + }, + { + "0.0": 100 + }, + { + "0.0": 100 + } + ] + } + ] + } + ], + "dataDescript": [ + { + "partName": "A", + "dataName": "Temperature: 2m", + "dataLocation": "arn:aws:s3:::noaa-nbm-grib2-pds", + "issueDt": "2022-12-23T12:00:00.000Z" + }, + { + "partName": "B", + "dataName": "Total Precipitation", + "dataLocation": "arn:aws:s3:::noaa-nbm-grib2-pds", + "issueDt": "2022-12-23T12:00:00.000Z" + } + ], + "metaData": [ + { + "name": "I-87, Albany-Nyack, Icy Roads", + "type": "condition", + "proximalThresh": -0.5, + "states": [ + { + "durationInMin": 135, + "min": -0.87, + "minAt": "2022-12-23T13:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T13:00:00.000Z", + "endDt": "2022-12-23T15:15:00.001Z", + "maxAt": "2022-12-23T15:15:00.001Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 164, + "min": -0.5, + "minAt": "2022-12-23T15:15:00.001Z", + "max": 0.0, + "startDt": "2022-12-23T15:15:00.001Z", + "endDt": "2022-12-23T17:58:44.974Z", + "maxAt": "2022-12-23T17:58:44.974Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 191, + "min": 0.0, + "minAt": "2022-12-23T17:58:44.974Z", + "max": 0.24, + "startDt": "2022-12-23T17:58:44.974Z", + "endDt": "2022-12-23T21:09:31.129Z", + "maxAt": "2022-12-23T19:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 25, + "min": -0.5, + "minAt": "2022-12-23T21:34:45.565Z", + "max": 0.0, + "startDt": "2022-12-23T21:09:31.129Z", + "endDt": "2022-12-23T21:34:45.565Z", + "maxAt": "2022-12-23T21:09:31.129Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 145, + "min": -1.0, + "minAt": "2022-12-23T22:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T21:34:45.565Z", + "endDt": "2022-12-24T00:00:00.000Z", + "maxAt": "2022-12-23T21:34:45.565Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + } + ] + }, + { + "name": "A", + "type": "criteria", + "proximalThresh": -0.5, + "states": [ + { + "durationInMin": 135, + "min": -0.87, + "minAt": "2022-12-23T13:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T13:00:00.000Z", + "endDt": "2022-12-23T15:15:00.001Z", + "maxAt": "2022-12-23T15:15:00.001Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 165, + "min": -0.5, + "minAt": "2022-12-23T15:15:00.001Z", + "max": 0.0, + "startDt": "2022-12-23T15:15:00.001Z", + "endDt": "2022-12-23T18:00:00.000Z", + "maxAt": "2022-12-23T18:00:00.000Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 360, + "min": 0.0, + "minAt": "2022-12-23T18:00:00.000Z", + "max": 1.0, + "startDt": "2022-12-23T18:00:00.000Z", + "endDt": "2022-12-24T00:00:00.000Z", + "maxAt": "2022-12-23T22:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + } + ] + }, + { + "name": "B", + "type": "criteria", + "proximalThresh": -0.5, + "states": [ + { + "durationInMin": 480, + "min": 0.0, + "minAt": "2022-12-23T20:00:00.000Z", + "max": 0.03, + "startDt": "2022-12-23T13:00:00.000Z", + "endDt": "2022-12-23T21:00:00.000Z", + "maxAt": "2022-12-23T13:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 30, + "min": -0.5, + "minAt": "2022-12-23T21:30:00.000Z", + "max": 0.0, + "startDt": "2022-12-23T21:00:00.000Z", + "endDt": "2022-12-23T21:30:00.000Z", + "maxAt": "2022-12-23T21:00:00.000Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 150, + "min": -1.0, + "minAt": "2022-12-23T22:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T21:30:00.000Z", + "endDt": "2022-12-24T00:00:00.000Z", + "maxAt": "2022-12-23T21:30:00.000Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/python/idsse_testing/risk_processor/i87/raw_data_i87_temp.json b/python/idsse_testing/risk_processor/i87/raw_data_i87_temp.json new file mode 100644 index 0000000..0b731c3 --- /dev/null +++ b/python/idsse_testing/risk_processor/i87/raw_data_i87_temp.json @@ -0,0 +1,17 @@ +[ + 51.943966, 51.943966, 51.943966, 51.943966, 51.943966, 51.943966, 51.943966, + 51.943966, 51.223965, 51.223965, 51.223965, 51.223965, 51.223965, 50.503963, + 51.223965, 51.223965, 50.503963, 50.503963, 49.063965, 49.783966, 49.063965, + 49.063965, 48.343964, 49.063965, 49.783966, 49.783966, 49.783966, 49.783966, + 50.503963, 49.783966, 49.783966, 49.063965, 49.783966, 49.063965, 49.783966, + 49.063965, 49.063965, 49.783966, 49.783966, 48.343964, 48.343964, 48.343964, + 49.783966, 49.063965, 49.783966, 49.783966, 49.783966, 49.783966, 49.063965, + 50.503963, 50.503963, 50.503963, 50.503963, 50.503963, 49.783966, 49.783966, + 49.783966, 49.783966, 49.783966, 49.783966, 49.063965, 49.063965, 49.783966, + 50.503963, 49.783966, 51.223965, 51.223965, 51.223965, 50.503963, 50.503963, + 49.783966, 49.783966, 49.063965, 49.783966, 49.783966, 49.783966, 49.783966, + 49.063965, 51.223965, 49.063965, 49.063965, 49.063965, 49.063965, 49.063965, + 49.783966, 49.063965, 49.063965, 49.783966, 49.783966, 51.223965, 49.783966, + 50.503963, 50.503963, 50.503963, 49.783966, 51.943966, 51.943966, 51.943966, + 51.223965, 50.503963 +] diff --git a/python/idsse_testing/risk_processor/raw_geometric_distribution.json b/python/idsse_testing/risk_processor/raw_geometric_distribution.json new file mode 100644 index 0000000..da9d6f1 --- /dev/null +++ b/python/idsse_testing/risk_processor/raw_geometric_distribution.json @@ -0,0 +1,14 @@ +{ + "34.66401": 4, + "36.82401": 4, + "37.54401": 4, + "38.264008": 5, + "38.98401": 8, + "39.70401": 10, + "40.424007": 12, + "41.14401": 16, + "41.86401": 14, + "42.584007": 10, + "43.30401": 8, + "44.02401": 5 +} \ No newline at end of file diff --git a/python/idsse_testing/risk_processor/send_criteria_message.py b/python/idsse_testing/risk_processor/send_criteria_message.py new file mode 100644 index 0000000..790a1ed --- /dev/null +++ b/python/idsse_testing/risk_processor/send_criteria_message.py @@ -0,0 +1,169 @@ +"""Standalone python script useful for emitting an example criteria message to RabbitMQ + +Every command line argument has a sane default; you should only need to change --path: + +python3 python/risk_processor/test/resources/send_criteria_message.py \ + --path python/risk_processor/test/resources/simple/criteria_single_temp.json \ + --host rabbitmq_host \ + --username rabbitmq_user \ + --password rabbitmq_password \ + --port rabbitmq_port \ + --criteria_exchange some_exchange_name \ + --criteria_exch_type some_exch_type \ + --criteria_queue some_queue_name +""" +# ------------------------------------------------------------------------------ +# Created on Mon Nov 6 2023 +# +# Copyright (c) 2023 Colorado State University. All rights reserved. (1) +# Copyright (c) 2023 Regents of the University of Colorado (2) +# +# Contributors: +# Mackenzie Grimes (1) +# +# ------------------------------------------------------------------------------ +# pylint: disable=duplicate-code + +import argparse +import json +import logging.config +import logging +import sys + +from pika import BasicProperties + +from idsse.common.log_util import get_default_log_config +from idsse.common.rabbitmq_utils import Conn, Queue, Exch, RabbitMqParams + +logger = logging.getLogger(__name__) + + +class CriteriaPublisher: + """Simple RabbitMQ message publisher for sending criteria using JSON file""" + def __init__(self, conn: Conn, rabbitmq_params: RabbitMqParams): + """ + Args: + connection (Conn): connection parameters for RabbitMQ host + rabbitmq_params (RabbitMqParams): parameters for RabbitMQ exchange and queue + """ + self._params = rabbitmq_params + logger.debug('Making connection to host %s with queue_name %s', + conn.host, self._params.queue.name) + self._connection = conn.to_connection() + self._channel = self._connection.channel() + + def send_criteria(self, criteria_path: str) -> bool: + """Execute sending criteria message to RabbitMQ queue + + Args: + criteria_path (str): Path of criteria JSON file to send as message + + Returns: + True on message published successfully + """ + if self._channel is None or self._channel.is_closed: + logger.warning('RabbitMQ channel unavailable or not open, cannot publish message') + return False + + # build message and publish + try: + with open(criteria_path, 'r', encoding='utf-8') as file_data: + message = json.load(file_data) + except (FileNotFoundError, json.JSONDecodeError): + logger.error('Did not find valid JSON file at path %s', criteria_path) + return False + + logger.debug('Publishing message: %s', message) + try: + self._channel.basic_publish( + exchange=self._params.exchange.name, + routing_key=self._params.queue.route_key, + properties=BasicProperties(content_type='application/json'), + body=json.dumps(message) + ) + except Exception as exc: # pylint: disable=broad-exception-caught + logger.error(exc) + return False + + logger.info('Message publish succeeded') + return True + + def shutdown(self): + """Graceful shutdown of RabbitMQ connection""" + logger.debug('Closing RabbitMQ connection') + if self._channel is not None: + self._channel.close() + if self._connection is not None: + self._connection.close() + + +def main(args: argparse.Namespace | None = None): + """Entry point for script to send criteria message to queue""" + conn = Conn(args.host, args.v_host, args.port, args.username, args.password) + exch = Exch(name=args.criteria_exchange, type=args.criteria_exch_type) + queue = Queue( + name=args.criteria_queue, + route_key='', + durable=args.durable, + auto_delete=args.auto_del, + exclusive=args.exclusive + ) + + logger.info('Args: %s', args) + criteria_path = args.path + + try: + publisher = CriteriaPublisher(conn, RabbitMqParams(exch, queue)) + success = publisher.send_criteria(criteria_path) + logger.warning('Criteria from %s, status: %s', criteria_path, + 'PUBLISHED' if success else 'FAILED_TO_PUBLISH') + except Exception as exc: # pylint: disable=broad-exception-caught + logger.error(exc) + success = False + finally: + publisher.shutdown() + + sys.exit(0 if success else 1) + + +if __name__ == '__main__': # pragma: no cover + logging.config.dictConfig(get_default_log_config('WARN')) + + # parse command line arguments + parser = argparse.ArgumentParser() + + # RabbitMQ host parameters + parser.add_argument('--host', dest='host', default='localhost', + help='The host name or address of the RabbitMQ server to connect to.') + parser.add_argument('--vhost', dest='v_host', default='/', + help='The virtual host name or address of the RabbitMQ server.') + parser.add_argument('--port', dest='port', default=5672, + help='The port of the RabbitMQ server.') + parser.add_argument('--username', dest='username', default="guest", + help='The RabbitMQ server username to use to establish a connection') + parser.add_argument('--password', dest='password', default="guest", + help='The RabbitMQ server password to use to establish a connection') + + parser.add_argument('--durable', dest='durable', default=True, + action=argparse.BooleanOptionalAction, + help='If the queue should be durable') + parser.add_argument('--exclusive', dest='exclusive', default=False, + action=argparse.BooleanOptionalAction, + help='If the queue should be exclusive') + parser.add_argument('--autodelete', dest='auto_del', default=False, + action=argparse.BooleanOptionalAction, + help='If the queue should auto delete') + + # Criteria RabbitMQ parameters + parser.add_argument('--criteria_exchange', dest='criteria_exchange', default='criteria_data', + help='The exchange name to which this service will publish Criteria data.') + parser.add_argument('--criteria_exch_type', dest='criteria_exch_type', default='direct', + help='The exchange type for Criteria data.') + parser.add_argument('--criteria_queue', dest='criteria_queue', default='ims_data', + help='The queue where Criteria data will be published.') + + parser.add_argument('--path', dest='path', + default=('python/risk_processor/test/resources/simple' + '/criteria_single_temp.json'), + help='Path to criteria JSON file.') + main(parser.parse_args()) diff --git a/python/idsse_testing/risk_processor/simple/2022_11_11_TEMP_FAHRENHEIT_SLICE.nc b/python/idsse_testing/risk_processor/simple/2022_11_11_TEMP_FAHRENHEIT_SLICE.nc new file mode 100644 index 0000000..bc64d10 Binary files /dev/null and b/python/idsse_testing/risk_processor/simple/2022_11_11_TEMP_FAHRENHEIT_SLICE.nc differ diff --git a/python/idsse_testing/risk_processor/simple/2022_11_11_TEMP_THREATLEVEL_SLICE.nc b/python/idsse_testing/risk_processor/simple/2022_11_11_TEMP_THREATLEVEL_SLICE.nc new file mode 100644 index 0000000..f81705a Binary files /dev/null and b/python/idsse_testing/risk_processor/simple/2022_11_11_TEMP_THREATLEVEL_SLICE.nc differ diff --git a/python/idsse_testing/risk_processor/simple/criteria_single_temp.json b/python/idsse_testing/risk_processor/simple/criteria_single_temp.json new file mode 100644 index 0000000..d777782 --- /dev/null +++ b/python/idsse_testing/risk_processor/simple/criteria_single_temp.json @@ -0,0 +1,70 @@ +{ + "corrId": { + "originator": "IDSSe", + "uuid": "4899d220-beec-467b-a0e6-9d215b715b97", + "issueDt": "2022-11-11T13:00:00.000Z" + }, + "issueDt": "2022-11-11T13:00:00.000Z", + "location": { + "features": [ + { + "type": "Feature", + "properties": { + "name": "KABQ" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -106.6083, 35.0389 + ] + } + } + ] + }, + "validDt": [ + { + "start": "2022-11-12T00:00:00.000Z", + "end": "2022-11-12T00:00:00.000Z" + } + ], + "conditions": [ + { + "name": "Abq TEMP", + "severity": "MODERATE", + "combined": "A", + "partsUsed": ["A"] + } + ], + "parts": [ + { + "name": "A", + "duration": 0, + "arealPercentage": 0, + "product": { + "fcst": [ + "NBM" + ] + }, + "field": "TEMPERATURE", + "units": "DEG F", + "region": "CONUS", + "relational": "GREATER THAN", + "thresh": 30, + "mapping": { + "min": 0.0, + "max": 75.0, + "clip": "true" + } + } + ], + "tags": { + "values": [ + "Abq TEMP" + ], + "keyValues": { + "name": "Albuquerque International Airport Temp", + "nwsOffice": "BOU" + } + } +} + diff --git a/python/idsse_testing/risk_processor/simple/data_service_condition_request_single_temp.json b/python/idsse_testing/risk_processor/simple/data_service_condition_request_single_temp.json new file mode 100644 index 0000000..f410f3d --- /dev/null +++ b/python/idsse_testing/risk_processor/simple/data_service_condition_request_single_temp.json @@ -0,0 +1,42 @@ +{ + "corrId": { + "originator": "IDSSe", + "uuid": "4899d220-beec-467b-a0e6-9d215b715b97", + "issueDt": "2022-11-11T13:00:00.000Z" + }, + "label": "Abq TEMP", + "sourceType": "join", + "sourceObj": { + "join": "OR", + "sources": [ + { + "sourceType": "condition", + "label": "A:ThreatLevel", + "sourceObj": { + "relational": "GREATER THAN", + "thresh": 30, + "mapping": { + "startWeight": [0, 1, 0], + "endWeight": [0, 1, 0], + "controlPoints": ["-Infinity", 0.0, 75.0, "Infinity"] + }, + "source": { + "label": "A:Raw", + "sourceType": "data", + "sourceObj": { + "product": "NBM", + "field": "TEMPERATURE", + "region": "CONUS", + "units": "DEG F", + "sliceCoords": [[-106.6083, 35.0389]], + "minSize": [400, 300], + "minBuff": 50, + "validDt": "2022-11-12T00:00:00.000Z", + "issueDt": "2022-11-11T13:00:00.000Z" + } + } + } + } + ] + } +} \ No newline at end of file diff --git a/python/idsse_testing/risk_processor/simple/data_service_condition_response_single_temp.json b/python/idsse_testing/risk_processor/simple/data_service_condition_response_single_temp.json new file mode 100644 index 0000000..7d841fa --- /dev/null +++ b/python/idsse_testing/risk_processor/simple/data_service_condition_response_single_temp.json @@ -0,0 +1,97 @@ +{ + "Abq TEMP": { + "filenames": { + "Deterministic": "/share/2022/11/11/NBM.AWS.GRIB/TEMP.Criteria/ThreatLevel/gridstore-1825711489.nc" + }, + "grid_spec": "+dx=2539.703 +dy=2539.703 +w=400 +h=300 +lat_ll=31.177375065798472 +lon_ll=-111.5741153608759", + "issue_dt": "2022-11-11T13:00:00.000Z", + "proj_name": "NBM", + "region": "CONUS", + "slice": "[665:1065,413:813]", + "proj_spec": "+proj=lcc +lat_0=25.0 +lon_0=-95.0 +lat_1=25.0 +a=6371200", + "units": "ThreatLevel", + "data_name": "Temperature: 2m", + "data_loc": "arn:aws:s3:::noaa-nbm-grib2-pds", + "valid_dt": "2022-11-12T00:00:00.000Z" + }, + "A:ThreatLevel": { + "filenames": { + "Deterministic": "/share/2022/11/11/NBM.AWS.GRIB/TEMP.Criteria/ThreatLevel/gridstore-278843281.nc" + }, + "grid_spec": "+dx=2539.703 +dy=2539.703 +w=400 +h=300 +lat_ll=31.177375065798472 +lon_ll=-111.5741153608759", + "issue_dt": "2022-11-11T13:00:00.000Z", + "proj_name": "NBM", + "region": "CONUS", + "slice": "[665:1065,413:813]", + "proj_spec": "+proj=lcc +lat_0=25.0 +lon_0=-95.0 +lat_1=25.0 +a=6371200", + "units": "ThreatLevel", + "data_name": "Temperature: 2m", + "data_loc": "arn:aws:s3:::noaa-nbm-grib2-pds", + "valid_dt": "2022-11-12T00:00:00.000Z" + }, + "A:Raw": { + "filenames": { + "Deterministic": "/share/2022/11/11/NBM.AWS.GRIB/TEMP/Fahrenheit/gridstore765661987.nc" + }, + "grid_spec": "+dx=2539.703 +dy=2539.703 +w=400 +h=300 +lat_ll=31.177375065798472 +lon_ll=-111.5741153608759", + "issue_dt": "2022-11-11T13:00:00.000Z", + "proj_name": "NBM", + "region": "CONUS", + "slice": "[665:1065,413:813]", + "proj_spec": "+proj=lcc +lat_0=25.0 +lon_0=-95.0 +lat_1=25.0 +a=6371200", + "units": "Fahrenheit", + "data_name": "Temperature: 2m", + "data_loc": "arn:aws:s3:::noaa-nbm-grib2-pds", + "valid_dt": "2022-11-12T00:00:00.000Z" + }, + "request": { + "corrId": { + "originator": "IDSSe", + "uuid": "4899d220-beec-467b-a0e6-9d215b715b97", + "issueDt": "2022-11-11T13:00:00.000Z" + }, + "label": "Abq TEMP", + "sourceType": "join", + "sourceObj": { + "join": "OR", + "sources": [ + { + "sourceType": "condition", + "label": "A:ThreatLevel", + "sourceObj": { + "relational": "GREATER THAN", + "thresh": 30, + "mapping": { + "startWeight": [0, 1, 0], + "endWeight": [0, 1, 0], + "controlPoints": ["-Infinity", 0.0, 75.0, "Infinity"] + }, + "source": { + "sourceType": "units", + "label": "A:Raw", + "sourceObj": { + "units": "DEG F", + "source": { + "sourceType": "slice", + "sourceObj": { + "slice": "[665:1065,413:713]", + "source": { + "sourceType": "data", + "sourceObj": { + "product": "NBM", + "field": "TEMPERATURE", + "region": "CONUS", + "validDt": "2022-11-12T00:00:00.000Z", + "issueDt": "2022-11-11T13:00:00.000Z" + } + } + } + } + } + } + } + } + ] + } + } +} \ No newline at end of file diff --git a/python/idsse_testing/risk_processor/simple/event_portfolio_single_temp.json b/python/idsse_testing/risk_processor/simple/event_portfolio_single_temp.json new file mode 100644 index 0000000..b4e5516 --- /dev/null +++ b/python/idsse_testing/risk_processor/simple/event_portfolio_single_temp.json @@ -0,0 +1,170 @@ +{ + "corrId": { + "originator": "IDSSe", + "uuid": "4899d220-beec-467b-a0e6-9d215b715b97", + "issueDt": "2022-11-11T13:00:00.000Z" + }, + "issueDt": "2022-11-11T13:00:00.000Z", + "location": { + "features": [ + { + "type": "Feature", + "properties": { + "name": "KABQ" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -106.6083, + 35.0389 + ] + } + } + ] + }, + "validDt": [ + { + "start": "2022-11-12T00:00:00.000Z", + "end": "2022-11-12T00:00:00.000Z" + } + ], + "conditions": [ + { + "name": "Abq TEMP", + "severity": "MODERATE", + "combined": "A", + "partsUsed": ["A"] + } + ], + "parts": [ + { + "name": "A", + "duration": 0, + "arealPercentage": 0, + "region": "CONUS", + "product": { + "fcst": [ + "NBM" + ] + }, + "field": "TEMPERATURE", + "units": "DEG F", + "relational": "GREATER THAN", + "thresh": 30, + "mapping": { + "min": 0.0, + "max": 75.0, + "clip": "true" + } + } + ], + "tags": { + "values": [ + "Abq TEMP" + ], + "keyValues": { + "name": "Albuquerque International Airport Temp", + "nwsOffice": "BOU" + } + }, + "riskResults": [ + { + "evaluatedAt": "2022-11-11T13:00:01.000Z", + "conditionKey": "Abq TEMP", + "productKey": "NBM", + "locationKey": "Single Location", + "dataSummary": [ + { + "validDt": [ + "2022-11-12T00:00:00.000Z" + ], + "data": [ + { + "name": "Abq TEMP", + "type": "condition", + "singleValue": [ + 0.18964463472366333 + ], + "geoDist": [ + { + "0.18964463472366333": 1 + } + ] + }, + { + "name": "A", + "type": "criteria", + "singleValue": [ + 0.18964463472366333 + ], + "geoDist": [ + { + "0.18964463472366333": 1 + } + ] + }, + { + "name": "A", + "type": "raw", + "singleValue": [ + 38.53400802612305 + ], + "geoDist": [ + { + "38.53400802612305": 1 + } + ] + } + ] + } + ], + "dataDescript": [ + { + "partName": "A", + "productName": "NBM", + "dataName": "Temperature: 2m", + "dataLocation": "arn:aws:s3:::noaa-nbm-grib2-pds", + "issueDt": "2022-11-11T13:00:00.000Z" + } + ], + "metaData": [ + { + "name": "Abq TEMP", + "type": "condition", + "states": [ + { + "durationInMin": 0, + "min": 0.18964463472366333, + "minAt": "2022-11-12T00:00:00.000Z", + "max": 0.18964463472366333, + "startDt": "2022-11-12T00:00:00.000Z", + "endDt": "2022-11-12T00:00:00.000Z", + "maxAt": "2022-11-12T00:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + } + ] + }, + { + "name": "A", + "type": "criteria", + "states": [ + { + "durationInMin": 0, + "min": 0.18964463472366333, + "minAt": "2022-11-12T00:00:00.000Z", + "max": 0.18964463472366333, + "startDt": "2022-11-12T00:00:00.000Z", + "endDt": "2022-11-12T00:00:00.000Z", + "maxAt": "2022-11-12T00:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + } + ] + } + ] + } + ] +} diff --git a/python/idsse_testing/risk_processor/syracuse/2022_12_23_13_00_SYRACUSE_WINDGUST.nc b/python/idsse_testing/risk_processor/syracuse/2022_12_23_13_00_SYRACUSE_WINDGUST.nc new file mode 100644 index 0000000..c06a2e7 Binary files /dev/null and b/python/idsse_testing/risk_processor/syracuse/2022_12_23_13_00_SYRACUSE_WINDGUST.nc differ diff --git a/python/idsse_testing/risk_processor/syracuse/criteria_syracuse_windy.json b/python/idsse_testing/risk_processor/syracuse/criteria_syracuse_windy.json new file mode 100644 index 0000000..cb0d8dd --- /dev/null +++ b/python/idsse_testing/risk_processor/syracuse/criteria_syracuse_windy.json @@ -0,0 +1,477 @@ +{ + "corrId": { + "originator": "IDSSe", + "uuid": "33333333-beec-467b-a0e6-9d215b715b97", + "issueDt": "2022-12-23T12:00:00.000Z" + }, + "issueDt": "2022-12-23T12:00:00.000Z", + "location": { + "features": [ + { + "type": "Feature", + "properties": { + "name": "Syracuse" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [-76.204629, 43.04547], + [-76.2046186, 43.0453175], + [-76.204607, 43.0451462], + [-76.2045836, 43.044802], + [-76.204556, 43.044396], + [-76.204495, 43.044152], + [-76.2044229, 43.0439582], + [-76.204316, 43.043671], + [-76.204285, 43.043509], + [-76.2042594, 43.0431375], + [-76.2042098, 43.0424156], + [-76.2041893, 43.0421184], + [-76.2041721, 43.0418673], + [-76.204149, 43.041532], + [-76.2035625, 43.0415538], + [-76.2029418, 43.0415768], + [-76.2018481, 43.0416174], + [-76.2000031, 43.0416859], + [-76.199327, 43.041711], + [-76.199161, 43.0417189], + [-76.1980887, 43.0417701], + [-76.197405, 43.0418028], + [-76.1968922, 43.0418273], + [-76.1958824, 43.0418755], + [-76.1953027, 43.0419032], + [-76.194931, 43.041921], + [-76.194949, 43.042218], + [-76.1942085, 43.04225], + [-76.193606, 43.042276], + [-76.1928764, 43.0423075], + [-76.1923632, 43.0423297], + [-76.191718, 43.0423576], + [-76.190923, 43.0423919], + [-76.1904086, 43.0424141], + [-76.189809, 43.04244], + [-76.1895646, 43.041631], + [-76.1891134, 43.0401378], + [-76.189044, 43.039908], + [-76.1889026, 43.0395088], + [-76.1887487, 43.0390745], + [-76.1885336, 43.038467], + [-76.188089, 43.037212], + [-76.188891, 43.03713], + [-76.188729, 43.036536], + [-76.189189, 43.036401], + [-76.187627, 43.032383], + [-76.194113, 43.03215], + [-76.195809, 43.031464], + [-76.195732, 43.030633], + [-76.195678, 43.030312], + [-76.195566, 43.028606], + [-76.195588, 43.028477], + [-76.195507, 43.026992], + [-76.196722, 43.026759], + [-76.196976, 43.028355], + [-76.198257, 43.02822], + [-76.199294, 43.028164], + [-76.199546, 43.028166], + [-76.199687, 43.028137], + [-76.199661, 43.027497], + [-76.200885, 43.027432], + [-76.200868, 43.026642], + [-76.203627, 43.026544], + [-76.203347, 43.022604], + [-76.202431, 43.022637], + [-76.201148, 43.023467], + [-76.2003615, 43.0227776], + [-76.200289, 43.022714], + [-76.197483, 43.022811], + [-76.197486, 43.022448], + [-76.19421, 43.022504], + [-76.194315, 43.023639], + [-76.193714, 43.025548], + [-76.185299, 43.025861], + [-76.185264, 43.025356], + [-76.182768, 43.024407], + [-76.182443, 43.024463], + [-76.182391, 43.02385], + [-76.181148, 43.023974], + [-76.180725, 43.021934], + [-76.177726, 43.018686], + [-76.177586, 43.018578], + [-76.177448, 43.018431], + [-76.175812, 43.019126], + [-76.175139, 43.019073], + [-76.174845, 43.018391], + [-76.175162, 43.018106], + [-76.175517, 43.017883], + [-76.175991, 43.017504], + [-76.173187, 43.016469], + [-76.170992, 43.016432], + [-76.1704986, 43.0099297], + [-76.17049, 43.009816], + [-76.169599, 43.01038], + [-76.168469, 43.011134], + [-76.16769, 43.011627], + [-76.167679, 43.011496], + [-76.167309, 43.009813], + [-76.166241, 43.010108], + [-76.166163, 43.010099], + [-76.165956, 43.010807], + [-76.16562, 43.011273], + [-76.165004, 43.011405], + [-76.164559, 43.011443], + [-76.1645426, 43.0112731], + [-76.164535, 43.011195], + [-76.16139, 43.011065], + [-76.160622, 43.009043], + [-76.160049, 43.0074591], + [-76.159719, 43.006547], + [-76.1597, 43.004233], + [-76.160088, 43.003679], + [-76.160611, 43.003944], + [-76.161347, 43.004277], + [-76.162117, 43.004603], + [-76.1622595, 43.0046578], + [-76.162635, 43.004802], + [-76.1632357, 43.0050146], + [-76.1640016, 43.0052856], + [-76.164435, 43.005439], + [-76.164688, 43.005509], + [-76.1649, 43.005547], + [-76.165071, 43.005562], + [-76.165612, 43.005554], + [-76.165057, 42.998224], + [-76.16395, 42.998295], + [-76.163945, 42.997601], + [-76.163849, 42.996727], + [-76.164945, 42.996682], + [-76.1644659, 42.9919606], + [-76.163675, 42.984165], + [-76.150493, 42.984687], + [-76.1500123, 42.9847037], + [-76.146863, 42.984813], + [-76.1436286, 42.9849397], + [-76.14242, 42.984987], + [-76.142188, 42.984991], + [-76.142167, 42.984734], + [-76.142106, 42.984548], + [-76.1415824, 42.9845669], + [-76.1401359, 42.984619], + [-76.1366001, 42.9847463], + [-76.135359, 42.984791], + [-76.135601, 42.987758], + [-76.1338712, 42.9878279], + [-76.12486, 42.988192], + [-76.1254847, 42.9958997], + [-76.125779, 42.999531], + [-76.126158, 43.004697], + [-76.12424, 43.0078], + [-76.12399, 43.008158], + [-76.122232, 43.010415], + [-76.122905, 43.010869], + [-76.124092, 43.011778], + [-76.125267, 43.013395], + [-76.117783, 43.013745], + [-76.11025, 43.014156], + [-76.110983, 43.022441], + [-76.111018, 43.023115], + [-76.111197, 43.0249], + [-76.111373, 43.027198], + [-76.111573, 43.029273], + [-76.107548, 43.029469], + [-76.107937, 43.032771], + [-76.098915, 43.033213], + [-76.096205, 43.033369], + [-76.093005, 43.033468], + [-76.093104, 43.03439], + [-76.093331, 43.037074], + [-76.083831, 43.037473], + [-76.083815, 43.037239], + [-76.082308, 43.036302], + [-76.07837, 43.0365], + [-76.077582, 43.037751], + [-76.07666, 43.037287], + [-76.076325, 43.037132], + [-76.075909, 43.036965], + [-76.075201, 43.036739], + [-76.074273, 43.036535], + [-76.07462, 43.041518], + [-76.075737, 43.041474], + [-76.0769, 43.039139], + [-76.079544, 43.039932], + [-76.079488, 43.040112], + [-76.081234, 43.040873], + [-76.081777, 43.041227], + [-76.081991, 43.043994], + [-76.082078, 43.04406], + [-76.082138, 43.044565], + [-76.082755, 43.044542], + [-76.082757, 43.044571], + [-76.084155, 43.045268], + [-76.0859977, 43.046442], + [-76.087514, 43.047408], + [-76.088917, 43.047983], + [-76.092791, 43.048135], + [-76.090292, 43.050769], + [-76.089437, 43.050817], + [-76.089744, 43.054588], + [-76.087573, 43.054784], + [-76.085753, 43.054523], + [-76.0848539, 43.0544576], + [-76.083567, 43.054364], + [-76.082502, 43.054613], + [-76.083116, 43.05542], + [-76.083156, 43.055488], + [-76.083178, 43.055708], + [-76.0831886, 43.055893], + [-76.083211, 43.056284], + [-76.083308, 43.05688], + [-76.083407, 43.05734], + [-76.083637, 43.058105], + [-76.0837313, 43.0583484], + [-76.083861, 43.058683], + [-76.084098, 43.0591754], + [-76.084171, 43.059327], + [-76.084623, 43.060098], + [-76.084986, 43.0605965], + [-76.085199, 43.060889], + [-76.085463, 43.061181], + [-76.0856732, 43.0614431], + [-76.0858993, 43.061725], + [-76.0863737, 43.0623164], + [-76.08644, 43.062399], + [-76.0865811, 43.062568], + [-76.086861, 43.062903], + [-76.0870958, 43.0631607], + [-76.087231, 43.063309], + [-76.0874768, 43.0636155], + [-76.087535, 43.063688], + [-76.087896, 43.0641501], + [-76.088335, 43.064712], + [-76.0897143, 43.0665471], + [-76.089745, 43.066588], + [-76.090129, 43.067134], + [-76.090251, 43.067386], + [-76.09048, 43.067979], + [-76.0905055, 43.0680656], + [-76.09054, 43.068183], + [-76.09256, 43.068091], + [-76.092569, 43.068201], + [-76.093176, 43.068173], + [-76.093171, 43.068063], + [-76.093919, 43.068026], + [-76.094014, 43.069424], + [-76.096512, 43.069313], + [-76.096571, 43.070336], + [-76.099298, 43.07021], + [-76.099335, 43.070853], + [-76.100065, 43.070809], + [-76.100075, 43.071358], + [-76.1001576, 43.0723227], + [-76.10029, 43.073868], + [-76.100359, 43.074873], + [-76.102889, 43.076376], + [-76.114062, 43.075762], + [-76.114977, 43.075724], + [-76.115025, 43.075793], + [-76.115447, 43.075769], + [-76.115237, 43.07336], + [-76.123182, 43.072959], + [-76.124487, 43.072915], + [-76.124529, 43.073424], + [-76.125778, 43.073363], + [-76.126295, 43.07953], + [-76.13665, 43.079026], + [-76.136703, 43.079911], + [-76.136764, 43.0799712], + [-76.139525, 43.082697], + [-76.142262, 43.081193], + [-76.144211, 43.083113], + [-76.144602, 43.083398], + [-76.144689, 43.083439], + [-76.14479, 43.083463], + [-76.145078, 43.083676], + [-76.145042, 43.083716], + [-76.1473313, 43.0847694], + [-76.147387, 43.084795], + [-76.148663, 43.084383], + [-76.14895, 43.084312], + [-76.149814, 43.083639], + [-76.150657, 43.084223], + [-76.154054, 43.081562], + [-76.155383, 43.082481], + [-76.156071, 43.081707], + [-76.162485, 43.086121], + [-76.162561, 43.08606], + [-76.162733, 43.085858], + [-76.1630438, 43.0855343], + [-76.163167, 43.085406], + [-76.163353, 43.085234], + [-76.163663, 43.084861], + [-76.163776, 43.08469], + [-76.163914, 43.084557], + [-76.16415, 43.084275], + [-76.164328, 43.084025], + [-76.164656, 43.083678], + [-76.1647402, 43.083569], + [-76.164976, 43.083264], + [-76.165184, 43.082924], + [-76.165215, 43.082831], + [-76.165398, 43.082484], + [-76.165646, 43.082326], + [-76.165825, 43.082099], + [-76.16618, 43.081735], + [-76.166324, 43.08161], + [-76.166967, 43.081142], + [-76.167567, 43.080606], + [-76.167713, 43.080451], + [-76.167948, 43.08027], + [-76.168184, 43.080005], + [-76.168452, 43.07975], + [-76.168937, 43.079166], + [-76.169185, 43.078911], + [-76.169423, 43.078584], + [-76.170019, 43.077835], + [-76.170217, 43.077642], + [-76.1704658, 43.0774707], + [-76.1708857, 43.0771814], + [-76.171274, 43.076914], + [-76.1722608, 43.0773093], + [-76.1736272, 43.0778566], + [-76.1746633, 43.0782716], + [-76.174864, 43.078352], + [-76.174893, 43.078312], + [-76.175896, 43.078757], + [-76.176248, 43.079033], + [-76.178342, 43.077597], + [-76.1813459, 43.0753353], + [-76.1825713, 43.0744126], + [-76.185976, 43.071849], + [-76.1901681, 43.0687693], + [-76.19464, 43.065484], + [-76.196125, 43.064857], + [-76.199647, 43.063526], + [-76.19994, 43.063597], + [-76.200378, 43.063674], + [-76.19744, 43.059513], + [-76.197562, 43.059507], + [-76.199583, 43.060032], + [-76.199629, 43.059941], + [-76.200068, 43.060056], + [-76.19964, 43.054683], + [-76.199078, 43.054668], + [-76.197647, 43.052648], + [-76.197337, 43.05217], + [-76.196262, 43.050676], + [-76.195621, 43.049696], + [-76.195598, 43.049386], + [-76.195553, 43.049299], + [-76.195502, 43.04848], + [-76.195239, 43.048585], + [-76.19517, 43.048464], + [-76.1939686, 43.046747], + [-76.193914, 43.046669], + [-76.194911, 43.04628], + [-76.192634, 43.043063], + [-76.192271, 43.042526], + [-76.19315, 43.04248], + [-76.195087, 43.042422], + [-76.195303, 43.042391], + [-76.195487, 43.042344], + [-76.195724, 43.042243], + [-76.19593, 43.042129], + [-76.196187, 43.042054], + [-76.199079, 43.041905], + [-76.199747, 43.041876], + [-76.199523, 43.042228], + [-76.199453, 43.042709], + [-76.199513, 43.043935], + [-76.199466, 43.043939], + [-76.199498, 43.044342], + [-76.199705, 43.044338], + [-76.199868, 43.044359], + [-76.200038, 43.044425], + [-76.200129, 43.044486], + [-76.200422, 43.044845], + [-76.20072, 43.045077], + [-76.200779, 43.04514], + [-76.200873, 43.045277], + [-76.200934, 43.045423], + [-76.20096, 43.045575], + [-76.2009851, 43.0460567], + [-76.200991, 43.04617], + [-76.200981, 43.04635], + [-76.200896, 43.046612], + [-76.200609, 43.047188], + [-76.203226, 43.046989], + [-76.2038, 43.046996], + [-76.204317, 43.047053], + [-76.204265, 43.046602], + [-76.204273, 43.046499], + [-76.2043668, 43.0462771], + [-76.2044907, 43.045984], + [-76.204563, 43.045813], + [-76.204629, 43.04547] + ] + ] + } + } + ] + }, + "validDt": [ + {"start": "2022-12-23T12:00:00.000Z", "end": "2022-12-24T00:00:00.000Z"} + ], + "conditions": [ + { + "name": "Syracuse, Cold and Windy", + "severity": "MODERATE", + "combined": "A AND B", + "partsUsed": ["A", "B"] + } + ], + "parts": [ + { + "name": "A", + "duration": 0, + "arealPercentage": 0, + "region": "CONUS", + "product": { + "fcst": ["NBM"] + }, + "field": "TEMP", + "units": "Fahrenheit", + "relational": "LESS THAN", + "thresh": 30, + "mapping": { + "min": 15.0, + "max": 45.0, + "clip": "true" + } + }, + { + "name": "B", + "duration": 0, + "arealPercentage": 0, + "region": "CONUS", + "product": { + "fcst": ["NBM"] + }, + "field": "WIND GUST", + "units": "MPH", + "relational": "GREATER THAN", + "thresh": 30, + "mapping": { + "min": 25.0, + "max": 35.0, + "clip": "true" + } + } + ], + "tags": { + "values": [], + "keyValues": { + "name": "Syracuse, Cold and Windy", + "nwsOffice": "BGM" + } + } +} diff --git a/python/idsse_testing/risk_processor/syracuse/data_service_response_syracuse.json b/python/idsse_testing/risk_processor/syracuse/data_service_response_syracuse.json new file mode 100644 index 0000000..33a4e53 --- /dev/null +++ b/python/idsse_testing/risk_processor/syracuse/data_service_response_syracuse.json @@ -0,0 +1,173 @@ +{ + "A:Raw": { + "filenames": { + "Deterministic": "/share/2022/12/23/NBM.AWS.GRIB/TEMP/Fahrenheit/gridstore2064195902.nc" + }, + "issue_dt": "2022-12-23T12:00:00.000Z", + "valid_dt": "2022-12-23T13:00:00.000Z", + "proj_name": "NBM CONUS", + "proj_spec": "+proj=lcc +lat_0=25.0 +lon_0=-95.0 +lat_1=25.0 +a=6371200", + "grid_spec": "+dx=2539.703 +dy=2539.703 +w=400 +h=300 +lat_ll=40.295046276641536 +lon_ll=-82.46804206629855", + "units": "Fahrenheit", + "data_name": "Temperature: 2m (Ensemble mean)", + "data_loc": "arn:aws:s3:::noaa-nbm-grib2-pds:", + "region": "CONUS", + "slice": "[1722:2122,802:1102]" + }, + "A:ThreatLevel": { + "filenames": { + "Deterministic": "/share/2022/12/23/NBM.AWS.GRIB/TEMP.Criteria/ThreatLevel/gridstore-811715560.nc" + }, + "issue_dt": "2022-12-23T12:00:00.000Z", + "valid_dt": "2022-12-23T13:00:00.000Z", + "proj_name": "NBM CONUS", + "proj_spec": "+proj=lcc +lat_0=25.0 +lon_0=-95.0 +lat_1=25.0 +a=6371200", + "grid_spec": "+dx=2539.703 +dy=2539.703 +w=400 +h=300 +lat_ll=40.295046276641536 +lon_ll=-82.46804206629855", + "units": "ThreatLevel", + "data_name": "Temperature: 2m (Ensemble mean)", + "data_loc": "arn:aws:s3:::noaa-nbm-grib2-pds:", + "region": "CONUS", + "slice": "[1722:2122,802:1102]" + }, + "B:Raw": { + "filenames": { + "Deterministic": "/share/2022/12/23/NBM.AWS.GRIB/WINDGUST/MilesPerHour/gridstore696460526.nc" + }, + "issue_dt": "2022-12-23T12:00:00.000Z", + "valid_dt": "2022-12-23T13:00:00.000Z", + "proj_name": "NBM CONUS", + "proj_spec": "+proj=lcc +lat_0=25.0 +lon_0=-95.0 +lat_1=25.0 +a=6371200", + "grid_spec": "+dx=2539.703 +dy=2539.703 +w=400 +h=300 +lat_ll=40.295046276641536 +lon_ll=-82.46804206629855", + "units": "MilesPerHour", + "data_name": "Wind guest: 10m", + "data_loc": "arn:aws:s3:::noaa-nbm-grib2-pds:", + "region": "CONUS", + "slice": "[1722:2122,802:1102]" + }, + "B:ThreatLevel": { + "filenames": { + "Deterministic": "/share/2022/12/23/NBM.AWS.GRIB/WINDGUST.Criteria/ThreatLevel/gridstore43167307.nc" + }, + "issue_dt": "2022-12-23T12:00:00.000Z", + "valid_dt": "2022-12-23T13:00:00.000Z", + "proj_name": "NBM CONUS", + "proj_spec": "+proj=lcc +lat_0=25.0 +lon_0=-95.0 +lat_1=25.0 +a=6371200", + "grid_spec": "+dx=2539.703 +dy=2539.703 +w=400 +h=300 +lat_ll=40.295046276641536 +lon_ll=-82.46804206629855", + "units": "ThreatLevel", + "data_name": "Wind guest: 10m", + "data_loc": "arn:aws:s3:::noaa-nbm-grib2-pds:", + "region": "CONUS", + "slice": "[1722:2122,802:1102]" + }, + "Syracuse, Cold and Windy": { + "filenames": { + "Deterministic": "/share/2022/12/23/NBM.AWS.GRIB/Criteria/ThreatLevel/gridstore1303753817.nc" + }, + "issue_dt": "2022-12-23T12:00:00.000Z", + "valid_dt": "2022-12-23T13:00:00.000Z", + "proj_name": "NBM CONUS", + "proj_spec": "+proj=lcc +lat_0=25.0 +lon_0=-95.0 +lat_1=25.0 +a=6371200", + "grid_spec": "+dx=2539.703 +dy=2539.703 +w=400 +h=300 +lat_ll=40.295046276641536 +lon_ll=-82.46804206629855", + "units": "ThreatLevel", + "data_name": "AND(Temperature: 2m (Ensemble mean), Wind guest: 10m)", + "data_loc": "arn:aws:s3:::noaa-nbm-grib2-pds:", + "region": "CONUS", + "slice": "[1722:2122,802:1102]" + }, + "request": { + "corrId": { + "originator": "IDSSe", + "uuid": "33333333-beec-467b-a0e6-9d215b715b97", + "issueDt": "2022-12-23T12:00:00.000Z" + }, + "label": "Syracuse, Cold and Windy", + "sourceType": "join", + "sourceObj": { + "join": "AND", + "sources": [ + { + "sourceType": "condition", + "label": "A:ThreatLevel", + "sourceObj": { + "relational": "LESS THAN", + "thresh": 30, + "mapping": { + "startWeight": [0, 1, 0], + "endWeight": [0, 1, 0], + "controlPoints": ["-Infinity", 15.0, 45.0, "Infinity"] + }, + "source": { + "sourceType": "units", + "label": "A:Raw", + "sourceObj": { + "units": "Fahrenheit", + "source": { + "sourceType": "slice", + "sourceObj": { + "sliceCoords": [ + [-76.204629, 42.984165], + [-76.074273, 43.086121] + ], + "minSize": [400, 300], + "minBuff": 50, + "source": { + "sourceType": "data", + "sourceObj": { + "product": "NBM", + "field": "TEMP", + "region": "CONUS", + "validDt": "2022-12-23T13:00:00.000Z", + "issueDt": "2022-12-23T12:00:00.000Z" + } + } + } + } + } + } + } + }, + { + "sourceType": "condition", + "label": "B:ThreatLevel", + "sourceObj": { + "relational": "GREATER THAN", + "thresh": 30, + "mapping": { + "startWeight": [0, 1, 0], + "endWeight": [0, 1, 0], + "controlPoints": ["-Infinity", 25.0, 35.0, "Infinity"] + }, + "source": { + "sourceType": "units", + "label": "B:Raw", + "sourceObj": { + "units": "MPH", + "source": { + "sourceType": "slice", + "sourceObj": { + "sliceCoords": [ + [-76.204629, 42.984165], + [-76.074273, 43.086121] + ], + "minSize": [400, 300], + "minBuff": 50, + "source": { + "sourceType": "data", + "sourceObj": { + "product": "NBM", + "field": "WIND GUST", + "region": "CONUS", + "validDt": "2022-12-23T13:00:00.000Z", + "issueDt": "2022-12-23T12:00:00.000Z" + } + } + } + } + } + } + } + } + ] + } + } +} diff --git a/python/idsse_testing/risk_processor/syracuse/event_portfolio_syracuse_windy.json b/python/idsse_testing/risk_processor/syracuse/event_portfolio_syracuse_windy.json new file mode 100644 index 0000000..e41d344 --- /dev/null +++ b/python/idsse_testing/risk_processor/syracuse/event_portfolio_syracuse_windy.json @@ -0,0 +1,877 @@ +{ + "corrId": { + "originator": "IDSSe", + "uuid": "33333333-beec-467b-a0e6-9d215b715b97", + "issueDt": "2022-12-23T12:00:00.000Z" + }, + "issueDt": "2022-12-23T12:00:00.000Z", + "location": { + "features": [ + { + "type": "Feature", + "properties": { "name": "Syracuse" }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [-76.204629, 43.04547], + [-76.2046186, 43.0453175], + [-76.204607, 43.0451462], + [-76.2045836, 43.044802], + [-76.204556, 43.044396], + [-76.204495, 43.044152], + [-76.2044229, 43.0439582], + [-76.204316, 43.043671], + [-76.204285, 43.043509], + [-76.2042594, 43.0431375], + [-76.2042098, 43.0424156], + [-76.2041893, 43.0421184], + [-76.2041721, 43.0418673], + [-76.204149, 43.041532], + [-76.2035625, 43.0415538], + [-76.2029418, 43.0415768], + [-76.2018481, 43.0416174], + [-76.2000031, 43.0416859], + [-76.199327, 43.041711], + [-76.199161, 43.0417189], + [-76.1980887, 43.0417701], + [-76.197405, 43.0418028], + [-76.1968922, 43.0418273], + [-76.1958824, 43.0418755], + [-76.1953027, 43.0419032], + [-76.194931, 43.041921], + [-76.194949, 43.042218], + [-76.1942085, 43.04225], + [-76.193606, 43.042276], + [-76.1928764, 43.0423075], + [-76.1923632, 43.0423297], + [-76.191718, 43.0423576], + [-76.190923, 43.0423919], + [-76.1904086, 43.0424141], + [-76.189809, 43.04244], + [-76.1895646, 43.041631], + [-76.1891134, 43.0401378], + [-76.189044, 43.039908], + [-76.1889026, 43.0395088], + [-76.1887487, 43.0390745], + [-76.1885336, 43.038467], + [-76.188089, 43.037212], + [-76.188891, 43.03713], + [-76.188729, 43.036536], + [-76.189189, 43.036401], + [-76.187627, 43.032383], + [-76.194113, 43.03215], + [-76.195809, 43.031464], + [-76.195732, 43.030633], + [-76.195678, 43.030312], + [-76.195566, 43.028606], + [-76.195588, 43.028477], + [-76.195507, 43.026992], + [-76.196722, 43.026759], + [-76.196976, 43.028355], + [-76.198257, 43.02822], + [-76.199294, 43.028164], + [-76.199546, 43.028166], + [-76.199687, 43.028137], + [-76.199661, 43.027497], + [-76.200885, 43.027432], + [-76.200868, 43.026642], + [-76.203627, 43.026544], + [-76.203347, 43.022604], + [-76.202431, 43.022637], + [-76.201148, 43.023467], + [-76.2003615, 43.0227776], + [-76.200289, 43.022714], + [-76.197483, 43.022811], + [-76.197486, 43.022448], + [-76.19421, 43.022504], + [-76.194315, 43.023639], + [-76.193714, 43.025548], + [-76.185299, 43.025861], + [-76.185264, 43.025356], + [-76.182768, 43.024407], + [-76.182443, 43.024463], + [-76.182391, 43.02385], + [-76.181148, 43.023974], + [-76.180725, 43.021934], + [-76.177726, 43.018686], + [-76.177586, 43.018578], + [-76.177448, 43.018431], + [-76.175812, 43.019126], + [-76.175139, 43.019073], + [-76.174845, 43.018391], + [-76.175162, 43.018106], + [-76.175517, 43.017883], + [-76.175991, 43.017504], + [-76.173187, 43.016469], + [-76.170992, 43.016432], + [-76.1704986, 43.0099297], + [-76.17049, 43.009816], + [-76.169599, 43.01038], + [-76.168469, 43.011134], + [-76.16769, 43.011627], + [-76.167679, 43.011496], + [-76.167309, 43.009813], + [-76.166241, 43.010108], + [-76.166163, 43.010099], + [-76.165956, 43.010807], + [-76.16562, 43.011273], + [-76.165004, 43.011405], + [-76.164559, 43.011443], + [-76.1645426, 43.0112731], + [-76.164535, 43.011195], + [-76.16139, 43.011065], + [-76.160622, 43.009043], + [-76.160049, 43.0074591], + [-76.159719, 43.006547], + [-76.1597, 43.004233], + [-76.160088, 43.003679], + [-76.160611, 43.003944], + [-76.161347, 43.004277], + [-76.162117, 43.004603], + [-76.1622595, 43.0046578], + [-76.162635, 43.004802], + [-76.1632357, 43.0050146], + [-76.1640016, 43.0052856], + [-76.164435, 43.005439], + [-76.164688, 43.005509], + [-76.1649, 43.005547], + [-76.165071, 43.005562], + [-76.165612, 43.005554], + [-76.165057, 42.998224], + [-76.16395, 42.998295], + [-76.163945, 42.997601], + [-76.163849, 42.996727], + [-76.164945, 42.996682], + [-76.1644659, 42.9919606], + [-76.163675, 42.984165], + [-76.150493, 42.984687], + [-76.1500123, 42.9847037], + [-76.146863, 42.984813], + [-76.1436286, 42.9849397], + [-76.14242, 42.984987], + [-76.142188, 42.984991], + [-76.142167, 42.984734], + [-76.142106, 42.984548], + [-76.1415824, 42.9845669], + [-76.1401359, 42.984619], + [-76.1366001, 42.9847463], + [-76.135359, 42.984791], + [-76.135601, 42.987758], + [-76.1338712, 42.9878279], + [-76.12486, 42.988192], + [-76.1254847, 42.9958997], + [-76.125779, 42.999531], + [-76.126158, 43.004697], + [-76.12424, 43.0078], + [-76.12399, 43.008158], + [-76.122232, 43.010415], + [-76.122905, 43.010869], + [-76.124092, 43.011778], + [-76.125267, 43.013395], + [-76.117783, 43.013745], + [-76.11025, 43.014156], + [-76.110983, 43.022441], + [-76.111018, 43.023115], + [-76.111197, 43.0249], + [-76.111373, 43.027198], + [-76.111573, 43.029273], + [-76.107548, 43.029469], + [-76.107937, 43.032771], + [-76.098915, 43.033213], + [-76.096205, 43.033369], + [-76.093005, 43.033468], + [-76.093104, 43.03439], + [-76.093331, 43.037074], + [-76.083831, 43.037473], + [-76.083815, 43.037239], + [-76.082308, 43.036302], + [-76.07837, 43.0365], + [-76.077582, 43.037751], + [-76.07666, 43.037287], + [-76.076325, 43.037132], + [-76.075909, 43.036965], + [-76.075201, 43.036739], + [-76.074273, 43.036535], + [-76.07462, 43.041518], + [-76.075737, 43.041474], + [-76.0769, 43.039139], + [-76.079544, 43.039932], + [-76.079488, 43.040112], + [-76.081234, 43.040873], + [-76.081777, 43.041227], + [-76.081991, 43.043994], + [-76.082078, 43.04406], + [-76.082138, 43.044565], + [-76.082755, 43.044542], + [-76.082757, 43.044571], + [-76.084155, 43.045268], + [-76.0859977, 43.046442], + [-76.087514, 43.047408], + [-76.088917, 43.047983], + [-76.092791, 43.048135], + [-76.090292, 43.050769], + [-76.089437, 43.050817], + [-76.089744, 43.054588], + [-76.087573, 43.054784], + [-76.085753, 43.054523], + [-76.0848539, 43.0544576], + [-76.083567, 43.054364], + [-76.082502, 43.054613], + [-76.083116, 43.05542], + [-76.083156, 43.055488], + [-76.083178, 43.055708], + [-76.0831886, 43.055893], + [-76.083211, 43.056284], + [-76.083308, 43.05688], + [-76.083407, 43.05734], + [-76.083637, 43.058105], + [-76.0837313, 43.0583484], + [-76.083861, 43.058683], + [-76.084098, 43.0591754], + [-76.084171, 43.059327], + [-76.084623, 43.060098], + [-76.084986, 43.0605965], + [-76.085199, 43.060889], + [-76.085463, 43.061181], + [-76.0856732, 43.0614431], + [-76.0858993, 43.061725], + [-76.0863737, 43.0623164], + [-76.08644, 43.062399], + [-76.0865811, 43.062568], + [-76.086861, 43.062903], + [-76.0870958, 43.0631607], + [-76.087231, 43.063309], + [-76.0874768, 43.0636155], + [-76.087535, 43.063688], + [-76.087896, 43.0641501], + [-76.088335, 43.064712], + [-76.0897143, 43.0665471], + [-76.089745, 43.066588], + [-76.090129, 43.067134], + [-76.090251, 43.067386], + [-76.09048, 43.067979], + [-76.0905055, 43.0680656], + [-76.09054, 43.068183], + [-76.09256, 43.068091], + [-76.092569, 43.068201], + [-76.093176, 43.068173], + [-76.093171, 43.068063], + [-76.093919, 43.068026], + [-76.094014, 43.069424], + [-76.096512, 43.069313], + [-76.096571, 43.070336], + [-76.099298, 43.07021], + [-76.099335, 43.070853], + [-76.100065, 43.070809], + [-76.100075, 43.071358], + [-76.1001576, 43.0723227], + [-76.10029, 43.073868], + [-76.100359, 43.074873], + [-76.102889, 43.076376], + [-76.114062, 43.075762], + [-76.114977, 43.075724], + [-76.115025, 43.075793], + [-76.115447, 43.075769], + [-76.115237, 43.07336], + [-76.123182, 43.072959], + [-76.124487, 43.072915], + [-76.124529, 43.073424], + [-76.125778, 43.073363], + [-76.126295, 43.07953], + [-76.13665, 43.079026], + [-76.136703, 43.079911], + [-76.136764, 43.0799712], + [-76.139525, 43.082697], + [-76.142262, 43.081193], + [-76.144211, 43.083113], + [-76.144602, 43.083398], + [-76.144689, 43.083439], + [-76.14479, 43.083463], + [-76.145078, 43.083676], + [-76.145042, 43.083716], + [-76.1473313, 43.0847694], + [-76.147387, 43.084795], + [-76.148663, 43.084383], + [-76.14895, 43.084312], + [-76.149814, 43.083639], + [-76.150657, 43.084223], + [-76.154054, 43.081562], + [-76.155383, 43.082481], + [-76.156071, 43.081707], + [-76.162485, 43.086121], + [-76.162561, 43.08606], + [-76.162733, 43.085858], + [-76.1630438, 43.0855343], + [-76.163167, 43.085406], + [-76.163353, 43.085234], + [-76.163663, 43.084861], + [-76.163776, 43.08469], + [-76.163914, 43.084557], + [-76.16415, 43.084275], + [-76.164328, 43.084025], + [-76.164656, 43.083678], + [-76.1647402, 43.083569], + [-76.164976, 43.083264], + [-76.165184, 43.082924], + [-76.165215, 43.082831], + [-76.165398, 43.082484], + [-76.165646, 43.082326], + [-76.165825, 43.082099], + [-76.16618, 43.081735], + [-76.166324, 43.08161], + [-76.166967, 43.081142], + [-76.167567, 43.080606], + [-76.167713, 43.080451], + [-76.167948, 43.08027], + [-76.168184, 43.080005], + [-76.168452, 43.07975], + [-76.168937, 43.079166], + [-76.169185, 43.078911], + [-76.169423, 43.078584], + [-76.170019, 43.077835], + [-76.170217, 43.077642], + [-76.1704658, 43.0774707], + [-76.1708857, 43.0771814], + [-76.171274, 43.076914], + [-76.1722608, 43.0773093], + [-76.1736272, 43.0778566], + [-76.1746633, 43.0782716], + [-76.174864, 43.078352], + [-76.174893, 43.078312], + [-76.175896, 43.078757], + [-76.176248, 43.079033], + [-76.178342, 43.077597], + [-76.1813459, 43.0753353], + [-76.1825713, 43.0744126], + [-76.185976, 43.071849], + [-76.1901681, 43.0687693], + [-76.19464, 43.065484], + [-76.196125, 43.064857], + [-76.199647, 43.063526], + [-76.19994, 43.063597], + [-76.200378, 43.063674], + [-76.19744, 43.059513], + [-76.197562, 43.059507], + [-76.199583, 43.060032], + [-76.199629, 43.059941], + [-76.200068, 43.060056], + [-76.19964, 43.054683], + [-76.199078, 43.054668], + [-76.197647, 43.052648], + [-76.197337, 43.05217], + [-76.196262, 43.050676], + [-76.195621, 43.049696], + [-76.195598, 43.049386], + [-76.195553, 43.049299], + [-76.195502, 43.04848], + [-76.195239, 43.048585], + [-76.19517, 43.048464], + [-76.1939686, 43.046747], + [-76.193914, 43.046669], + [-76.194911, 43.04628], + [-76.192634, 43.043063], + [-76.192271, 43.042526], + [-76.19315, 43.04248], + [-76.195087, 43.042422], + [-76.195303, 43.042391], + [-76.195487, 43.042344], + [-76.195724, 43.042243], + [-76.19593, 43.042129], + [-76.196187, 43.042054], + [-76.199079, 43.041905], + [-76.199747, 43.041876], + [-76.199523, 43.042228], + [-76.199453, 43.042709], + [-76.199513, 43.043935], + [-76.199466, 43.043939], + [-76.199498, 43.044342], + [-76.199705, 43.044338], + [-76.199868, 43.044359], + [-76.200038, 43.044425], + [-76.200129, 43.044486], + [-76.200422, 43.044845], + [-76.20072, 43.045077], + [-76.200779, 43.04514], + [-76.200873, 43.045277], + [-76.200934, 43.045423], + [-76.20096, 43.045575], + [-76.2009851, 43.0460567], + [-76.200991, 43.04617], + [-76.200981, 43.04635], + [-76.200896, 43.046612], + [-76.200609, 43.047188], + [-76.203226, 43.046989], + [-76.2038, 43.046996], + [-76.204317, 43.047053], + [-76.204265, 43.046602], + [-76.204273, 43.046499], + [-76.2043668, 43.0462771], + [-76.2044907, 43.045984], + [-76.204563, 43.045813], + [-76.204629, 43.04547] + ] + ] + } + } + ] + }, + "validDt": [ + {"start": "2022-12-23T12:00:00.000Z", "end": "2022-12-24T00:00:00.000Z"} + ], + "conditions": [ + { + "name": "Syracuse, Cold and Windy", + "severity": "MODERATE", + "combined": "A AND B", + "partsUsed": ["A", "B"] + } + ], + "parts": [ + { + "name": "A", + "duration": 0, + "arealPercentage": 0, + "region": "CONUS", + "product": { "fcst": ["NBM"] }, + "field": "TEMP", + "units": "Fahrenheit", + "relational": "LESS THAN", + "thresh": 30, + "mapping": { "min": 15.0, "max": 45.0, "clip": "true" } + }, + { + "name": "B", + "duration": 0, + "arealPercentage": 0, + "region": "CONUS", + "product": { "fcst": ["NBM"] }, + "field": "WIND GUST", + "units": "MPH", + "relational": "GREATER THAN", + "thresh": 30, + "mapping": { "min": 25.0, "max": 35.0, "clip": "true" } + } + ], + "tags": { + "values": [], + "keyValues": { "name": "Syracuse, Cold and Windy", "nwsOffice": "BGM" } + }, + "riskResults": [ + { + "evaluatedAt": "2024-04-02T21:41:29.586Z", + "conditionKey": "Syracuse, Cold and Windy", + "productKey": "NBM", + "region": "CONUS", + "slice": "[1722:2122,802:1102]", + "locationKey": "Single Location", + "dataSummary": [ + { + "validDt": [ + "2022-12-23T13:00:00.000Z", + "2022-12-23T14:00:00.000Z", + "2022-12-23T15:00:00.000Z", + "2022-12-23T16:00:00.000Z", + "2022-12-23T17:00:00.000Z", + "2022-12-23T18:00:00.000Z", + "2022-12-23T19:00:00.000Z", + "2022-12-23T20:00:00.000Z", + "2022-12-23T21:00:00.000Z", + "2022-12-23T22:00:00.000Z", + "2022-12-23T23:00:00.000Z", + "2022-12-24T00:00:00.000Z" + ], + "data": [ + { + "name": "Syracuse, Cold and Windy", + "type": "condition", + "singleValue": [ + -1.0, -1.0, -1.0, -0.42, 0.71, 0.75, 0.83, 0.93, 1.0, 1.0, 1.0, 1.0 + ], + "geoDist": [ + { "-1.0": 36 }, + { "-1.0": 36 }, + { "-1.0": 36 }, + { + "-0.85": 3, + "-0.82": 13, + "-0.71": 7, + "-0.67": 2, + "-0.63": 2, + "-0.59": 3, + "-0.5": 3, + "-0.47": 2, + "-0.42": 1 + }, + { "-0.17": 3, "-0.12": 21, "-0.08": 5, "0.63": 1, "0.71": 6 }, + { + "0.42": 5, + "0.54": 5, + "0.55": 11, + "0.58": 1, + "0.67": 4, + "0.68": 2, + "0.72": 2, + "0.73": 3, + "0.74": 2, + "0.75": 1 + }, + { + "0.51": 1, + "0.62": 9, + "0.64": 9, + "0.69": 1, + "0.73": 1, + "0.74": 1, + "0.75": 6, + "0.77": 2, + "0.79": 3, + "0.81": 2, + "0.83": 1 + }, + { "0.82": 6, "0.83": 18, "0.85": 5, "0.89": 6, "0.93": 1 }, + { + "0.88": 2, + "0.9": 16, + "0.92": 11, + "0.97": 3, + "0.99": 3, + "1.0": 1 + }, + { "0.99": 8, "1.0": 28 }, + { "1.0": 36 }, + { "1.0": 36 } + ] + }, + { + "name": "A", + "type": "criteria", + "singleValue": [ + -0.74, -0.65, -0.6, -0.37, 0.12, 0.36, 0.61, 0.87, 1.0, 1.0, 1.0, + 1.0 + ], + "geoDist": [ + { "-0.89": 9, "-0.84": 13, "-0.79": 13, "-0.74": 1 }, + { "-0.84": 10, "-0.8": 17, "-0.75": 6, "-0.7": 2, "-0.65": 1 }, + { "-0.84": 3, "-0.79": 18, "-0.75": 8, "-0.7": 6, "-0.6": 1 }, + { + "-0.66": 3, + "-0.61": 20, + "-0.56": 4, + "-0.52": 2, + "-0.47": 6, + "-0.37": 1 + }, + { "-0.17": 3, "-0.12": 21, "-0.08": 5, "0.02": 6, "0.12": 1 }, + { + "0.12": 8, + "0.17": 17, + "0.21": 4, + "0.26": 3, + "0.31": 3, + "0.36": 1 + }, + { + "0.32": 1, + "0.37": 11, + "0.42": 17, + "0.51": 3, + "0.56": 3, + "0.61": 1 + }, + { "0.58": 6, "0.63": 18, "0.67": 5, "0.77": 6, "0.87": 1 }, + { + "0.75": 2, + "0.79": 16, + "0.84": 11, + "0.94": 3, + "0.99": 3, + "1.0": 1 + }, + { "0.98": 8, "1.0": 28 }, + { "1.0": 36 }, + { "1.0": 36 } + ] + }, + { + "name": "A", + "type": "raw", + "singleValue": [ + 41.14, 39.79, 39.04, 35.58, 28.26, 24.64, 20.89, 17.02, 14.5, 11.75, + 9.5, 8.24 + ], + "geoDist": [ + { "41.14": 1, "41.86": 13, "42.58": 13, "43.3": 9 }, + { "39.79": 1, "40.51": 2, "41.23": 6, "41.95": 17, "42.67": 10 }, + { "39.04": 1, "40.48": 6, "41.2": 8, "41.92": 18, "42.64": 3 }, + { + "35.58": 1, + "37.02": 6, + "37.74": 2, + "38.46": 4, + "39.18": 20, + "39.9": 3 + }, + { "28.26": 1, "29.7": 6, "31.14": 5, "31.86": 21, "32.58": 3 }, + { + "24.64": 1, + "25.36": 3, + "26.08": 3, + "26.8": 4, + "27.52": 17, + "28.24": 8 + }, + { + "20.89": 1, + "21.61": 3, + "22.33": 3, + "23.77": 17, + "24.49": 11, + "25.21": 1 + }, + { "17.02": 1, "18.46": 6, "19.9": 5, "20.62": 18, "21.34": 6 }, + { + "14.5": 1, + "15.22": 3, + "15.94": 3, + "17.38": 11, + "18.1": 16, + "18.82": 2 + }, + { "11.75": 1, "12.47": 2, "13.19": 4, "14.63": 21, "15.35": 8 }, + { "9.5": 1, "10.94": 6, "12.38": 11, "13.1": 17, "13.82": 1 }, + { + "8.24": 1, + "8.96": 3, + "9.68": 3, + "10.4": 3, + "11.12": 18, + "11.84": 8 + } + ] + }, + { + "name": "B", + "type": "criteria", + "singleValue": [ + -1.0, -1.0, -1.0, -0.01, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 + ], + "geoDist": [ + { "-1.0": 36 }, + { "-1.0": 36 }, + { "-1.0": 36 }, + { "-0.54": 16, "-0.36": 12, "-0.18": 6, "-0.01": 2 }, + { "0.53": 1, "0.71": 20, "0.89": 7, "1.0": 8 }, + { "0.58": 5, "0.76": 17, "0.93": 6, "1.0": 8 }, + { "0.62": 1, "0.8": 19, "0.98": 8, "1.0": 8 }, + { "1.0": 36 }, + { "1.0": 36 }, + { "1.0": 36 }, + { "1.0": 36 }, + { "1.0": 36 } + ] + }, + { + "name": "B", + "type": "raw", + "singleValue": [ + 19.91, 24.61, 23.71, 29.97, 36.24, 36.46, 35.79, 39.82, 40.49, + 41.38, 42.95, 44.07 + ], + "geoDist": [ + { + "14.54": 2, + "15.43": 3, + "16.33": 4, + "17.22": 8, + "18.12": 11, + "19.01": 7, + "19.91": 1 + }, + { + "18.34": 2, + "19.24": 1, + "20.13": 6, + "21.03": 9, + "21.92": 4, + "22.82": 6, + "23.71": 5, + "24.61": 3 + }, + { "20.13": 4, "21.03": 6, "21.92": 9, "22.82": 6, "23.71": 11 }, + { "27.29": 16, "28.19": 12, "29.08": 6, "29.97": 2 }, + { "32.66": 1, "33.55": 20, "34.45": 7, "35.34": 6, "36.24": 2 }, + { "32.88": 5, "33.78": 17, "34.67": 6, "35.57": 6, "36.46": 2 }, + { "33.11": 1, "34.0": 19, "34.9": 8, "35.79": 8 }, + { + "35.34": 9, + "36.24": 10, + "37.13": 7, + "38.03": 6, + "38.92": 2, + "39.82": 2 + }, + { "36.91": 7, "37.8": 13, "38.7": 8, "39.59": 6, "40.49": 2 }, + { "38.7": 1, "39.59": 20, "40.49": 10, "41.38": 5 }, + { "40.26": 23, "42.05": 9, "42.95": 4 }, + { + "39.59": 4, + "40.49": 9, + "41.38": 8, + "42.28": 7, + "43.17": 5, + "44.07": 3 + } + ] + } + ] + } + ], + "dataDescript": [ + { + "partName": "A", + "dataName": "Temperature: 2m", + "dataLocation": "arn:aws:s3:::noaa-nbm-grib2-pds", + "issueDt": "2022-12-23T12:00:00.000Z" + }, + { + "partName": "B", + "dataName": "Wind 10m Guest", + "dataLocation": "arn:aws:s3:::noaa-nbm-grib2-pds", + "issueDt": "2022-12-23T12:00:00.000Z" + } + ], + "metaData": [ + { + "name": "Syracuse, Cold and Windy", + "type": "condition", + "proximalThresh": -0.5, + "states": [ + { + "durationInMin": 172, + "min": -1.0, + "minAt": "2022-12-23T13:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T13:00:00.000Z", + "endDt": "2022-12-23T15:51:43.448Z", + "maxAt": "2022-12-23T15:51:43.448Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 31, + "min": -0.5, + "minAt": "2022-12-23T15:51:43.448Z", + "max": 0.0, + "startDt": "2022-12-23T15:51:43.448Z", + "endDt": "2022-12-23T16:22:18.053Z", + "maxAt": "2022-12-23T16:22:18.053Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 458, + "min": 0.0, + "minAt": "2022-12-23T16:22:18.053Z", + "max": 1.0, + "startDt": "2022-12-23T16:22:18.053Z", + "endDt": "2022-12-24T00:00:00.000Z", + "maxAt": "2022-12-23T21:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + } + ] + }, + { + "name": "A", + "type": "criteria", + "proximalThresh": -0.5, + "states": [ + { + "durationInMin": 146, + "min": -0.74, + "minAt": "2022-12-23T13:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T13:00:00.000Z", + "endDt": "2022-12-23T15:26:05.217Z", + "maxAt": "2022-12-23T15:26:05.217Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 79, + "min": -0.5, + "minAt": "2022-12-23T15:26:05.217Z", + "max": 0.0, + "startDt": "2022-12-23T15:26:05.217Z", + "endDt": "2022-12-23T16:45:18.367Z", + "maxAt": "2022-12-23T16:45:18.367Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 435, + "min": 0.0, + "minAt": "2022-12-23T16:45:18.367Z", + "max": 1.0, + "startDt": "2022-12-23T16:45:18.367Z", + "endDt": "2022-12-24T00:00:00.000Z", + "maxAt": "2022-12-23T21:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + } + ] + }, + { + "name": "B", + "type": "criteria", + "proximalThresh": -0.5, + "states": [ + { + "durationInMin": 150, + "min": -1.0, + "minAt": "2022-12-23T13:00:00.000Z", + "max": -0.5, + "startDt": "2022-12-23T13:00:00.000Z", + "endDt": "2022-12-23T15:30:18.182Z", + "maxAt": "2022-12-23T15:30:18.182Z", + "empirical": "MISS", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 30, + "min": -0.5, + "minAt": "2022-12-23T15:30:18.182Z", + "max": 0.0, + "startDt": "2022-12-23T15:30:18.182Z", + "endDt": "2022-12-23T16:00:35.644Z", + "maxAt": "2022-12-23T16:00:35.644Z", + "empirical": "PROXIMAL", + "geographical": "HIT", + "temporal": "HIT" + }, + { + "durationInMin": 479, + "min": 0.0, + "minAt": "2022-12-23T16:00:35.644Z", + "max": 1.0, + "startDt": "2022-12-23T16:00:35.644Z", + "endDt": "2022-12-24T00:00:00.000Z", + "maxAt": "2022-12-23T17:00:00.000Z", + "empirical": "HIT", + "geographical": "HIT", + "temporal": "HIT" + } + ] + } + ] + } + ] +} diff --git a/python/idsse_testing/risk_processor/syracuse/raw_data_syracuse_windgust.json b/python/idsse_testing/risk_processor/syracuse/raw_data_syracuse_windgust.json new file mode 100644 index 0000000..a6a9439 --- /dev/null +++ b/python/idsse_testing/risk_processor/syracuse/raw_data_syracuse_windgust.json @@ -0,0 +1,6 @@ +[ + 19.013958, 17.22441, 15.43486, 14.540086, 19.013958, 19.013958, 18.119184, + 16.329636, 14.540086, 19.013958, 18.119184, 17.22441, 16.329636, 15.43486, + 19.908733, 18.119184, 18.119184, 17.22441, 16.329636, 18.119184, 17.22441, + 16.329636 +]