Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhamer-noaa committed Sep 5, 2024
2 parents ec2184c + 45985a7 commit 7d68a48
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 144 deletions.
Binary file not shown.
32 changes: 11 additions & 21 deletions python/idsse/testing/data_access/request_with_bad_units.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
{
"label": "data_requested",
"sourceType": "units",
"sourceObj": {
"units": "MilesPerDecade",
"source": {
"sourceType": "slice",
"sourceObj": {
"slice": "[910:1010,829:929]",
"source": {
"sourceType": "data",
"sourceObj": {
"product": "NBM",
"field": "WINDSPEED",
"issueDt": "2023-01-10T08:00:00Z",
"validDt": "2023-01-11T06:00:00Z"
}
}
}
}
}
}
"label": "data_requested",
"sourceType": "data",
"sourceObj": {
"product": "NBM",
"field": "WINDSPEED",
"slice": "[910:1010,829:929]",
"issueDt": "2023-01-10T08:00:00Z",
"validDt": "2023-01-11T06:00:00Z",
"units": "MilesPerDecade"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,24 @@
"label": "data_requested",
"sourceType": "condition",
"sourceObj": {
"mapping": {
"controlPoints": [
"-Infinity",
30.00,
60.00,
"Infinity"
],
"startWeight": [
0,
1,
0
],
"endWeight": [
0,
1,
0
]
},
"relational": "GT",
"thresh": 45.0,
"source": {
"sourceType": "units",
"sourceObj": {
"units": "MilesPerHour",
"source": {
"sourceType": "slice",
"sourceObj": {
"slice": "[910:1010,829:929]",
"source": {
"sourceType": "data",
"sourceObj": {
"product": "NBM",
"field": "WINDSPEED",
"region": "CONUS",
"issueDt": "2023-01-10T08:00:00.000Z",
"validDt": "2023-01-11T06:00:00.000Z"
}
}
}
}
}
"mapping": {
"controlPoints": ["-Infinity", 30.0, 60.0, "Infinity"],
"startWeight": [0, 1, 0],
"endWeight": [0, 1, 0]
},
"relational": "GT",
"thresh": 45.0,
"source": {
"sourceType": "data",
"sourceObj": {
"product": "NBM",
"field": "WINDSPEED",
"region": "CONUS",
"slice": "[910:1010,829:929]",
"issueDt": "2023-01-10T08:00:00.000Z",
"validDt": "2023-01-11T06:00:00.000Z",
"units": "MilesPerHour"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,95 +7,59 @@
{
"sourceType": "condition",
"sourceObj": {
"mapping": {
"controlPoints": [
"-Infinity",
"30.000",
"60.000",
"Infinity"
],
"startWeight": [
0,
1,
0
],
"endWeight": [
0,
1,
0
]
},
"relational": "GT",
"thresh": 45.0,
"source": {
"sourceType": "units",
"sourceObj": {
"units": "MilesPerHour",
"source": {
"sourceType": "slice",
"sourceObj": {
"slice": "[910:1010,829:929]",
"source": {
"sourceType": "data",
"sourceObj": {
"product": "NBM",
"field": "WINDSPEED",
"region": "CONUS",
"issueDt": "2023-01-10T08:00:00.000Z",
"validDt": "2023-01-11T06:00:00.000Z"
}
}
}
}
}
"mapping": {
"controlPoints": [
"-Infinity",
"30.000",
"60.000",
"Infinity"
],
"startWeight": [0, 1, 0],
"endWeight": [0, 1, 0]
},
"relational": "GT",
"thresh": 45.0,
"source": {
"sourceType": "data",
"sourceObj": {
"product": "NBM",
"field": "WINDSPEED",
"region": "CONUS",
"slice": "[910:1010,829:929]",
"issueDt": "2023-01-10T08:00:00.000Z",
"validDt": "2023-01-11T06:00:00.000Z",
"units": "MilesPerHour"
}
}
}
},
{
"sourceType": "condition",
"sourceObj": {
"mapping": {
"controlPoints": [
"-Infinity",
"15.000",
"45.000",
"Infinity"
],
"startWeight": [
0,
1,
0
],
"endWeight": [
0,
1,
0
]
},
"relational": "LTE",
"thresh": 30.0,
"source": {
"sourceType": "units",
"sourceObj": {
"units": "Fahrenheit",
"source": {
"sourceType": "slice",
"sourceObj": {
"slice": "[829:929,910:1010]",
"source": {
"sourceType": "data",
"sourceObj": {
"product": "NBM",
"field": "TEMP",
"region": "CONUS",
"issueDt": "2023-01-10T08:00:00Z",
"validDt": "2023-01-11T06:00:00Z"
}
}
}
}
}
"mapping": {
"controlPoints": [
"-Infinity",
"15.000",
"45.000",
"Infinity"
],
"startWeight": [0, 1, 0],
"endWeight": [0, 1, 0]
},
"relational": "LTE",
"thresh": 30.0,
"source": {
"sourceType": "data",
"sourceObj": {
"product": "NBM",
"field": "TEMP",
"region": "CONUS",
"slice": "[829:929,910:1010]",
"issueDt": "2023-01-10T08:00:00Z",
"validDt": "2023-01-11T06:00:00Z",
"units": "Fahrenheit"
}
}
}
}
]
Expand Down

0 comments on commit 7d68a48

Please sign in to comment.