feat: add WeatherV2 wind canonical converter

This commit is contained in:
OpenAI Codex
2026-09-04 21:08:07 +08:00
parent 5fc922785d
commit 79d4aa6385
17 changed files with 965 additions and 0 deletions

View File

@@ -0,0 +1,124 @@
{
"source": {
"format": "weather-v2-particle-bin-v1",
"magic": "WVECBIN1",
"targetTime": "2026080700",
"width": 513,
"height": 769,
"bounds": {
"west": 112.5,
"south": 0.0,
"east": 157.5,
"north": 55.77657301866769
},
"dtype": "float32 little-endian u plane, v plane, speed plane; uint8 valid plane",
"arrayOrder": "row-major; WeatherV2 tile y increases southward, so rows are north-to-south",
"uVUnit": "m/s",
"validCount": 394497,
"invalidCount": 0,
"bytes": 5128989
},
"output": {
"width": 513,
"height": 769,
"bounds": {
"west": 112.5,
"south": 0.0,
"east": 157.5,
"north": 55.77657301866769
},
"bytes": 3155976,
"sha256": "363e2cd2e77501f6bceecbb4aaa68c4f9ef46998a60319ae5b7aba3548995283",
"validCount": 394497,
"invalidCount": 0,
"resampled": false
},
"statistics": {
"u": {
"min": -35.172367095947266,
"max": 22.501087188720703,
"mean": 0.7285217046737671
},
"v": {
"min": -25.472291946411133,
"max": 28.200902938842773,
"mean": 1.1300384998321533
},
"speed": {
"min": 0.0036890381015837193,
"max": 35.27834701538086,
"mean": 6.401810169219971
}
},
"sourceToCanonical": {
"lossless": true,
"maxAbsErrorU": 0.0,
"maxAbsErrorV": 0.0,
"samples": [
{
"row": 384,
"column": 256,
"sourceU": -10.921929359436035,
"sourceV": 4.515348434448242,
"canonicalU": -10.921929359436035,
"canonicalV": 4.515348434448242
},
{
"row": 1,
"column": 1,
"sourceU": -0.980097770690918,
"sourceV": 0.4984455108642578,
"canonicalU": -0.980097770690918,
"canonicalV": 0.4984455108642578
},
{
"row": 1,
"column": 511,
"sourceU": 1.2943105697631836,
"sourceV": -0.6254873275756836,
"canonicalU": 1.2943105697631836,
"canonicalV": -0.6254873275756836
},
{
"row": 767,
"column": 1,
"sourceU": -2.738156318664551,
"sourceV": 1.1959524154663086,
"canonicalU": -2.738156318664551,
"canonicalV": 1.1959524154663086
},
{
"row": 767,
"column": 511,
"sourceU": -5.0848894119262695,
"sourceV": -0.26341915130615234,
"canonicalU": -5.0848894119262695,
"canonicalV": -0.26341915130615234
},
{
"row": 0,
"column": 0,
"sourceU": -1.1939868927001953,
"sourceV": 1.7741403579711914,
"canonicalU": -1.1939868927001953,
"canonicalV": 1.7741403579711914
},
{
"row": 0,
"column": 1,
"sourceU": -1.051393985748291,
"sourceV": 1.4262237548828125,
"canonicalU": -1.051393985748291,
"canonicalV": 1.4262237548828125
},
{
"row": 0,
"column": 2,
"sourceU": -0.6949124336242676,
"sourceV": 0.9043483734130859,
"canonicalU": -0.6949124336242676,
"canonicalV": 0.9043483734130859
}
]
}
}

View File

@@ -0,0 +1,41 @@
{
"schema": "maplibre-particle-field/v1",
"fieldId": "ecmwf-hres-wind-2026080700",
"fieldType": "WIND",
"displayDomain": "GLOBAL",
"generation": 1786060800000,
"validTime": 1786060800000,
"dataVersion": 1786060800000,
"bounds": {
"west": 112.5,
"south": 0.0,
"east": 157.5,
"north": 55.77657301866769
},
"grid": {
"width": 513,
"height": 769
},
"vector": {
"layout": "interleaved-uv",
"encoding": "float32-le",
"noData": -9999.0,
"unit": "m/s",
"origin": "north-west",
"rowOrder": "north-to-south",
"columnOrder": "west-to-east",
"uPositive": "east",
"vPositive": "north"
},
"payload": {
"byteLength": 3155976,
"sha256": "363e2cd2e77501f6bceecbb4aaa68c4f9ef46998a60319ae5b7aba3548995283"
},
"source": {
"kind": "WeatherV2 ECMWF HRES WVECBIN1",
"referenceTime": "2026080600",
"targetTime": "2026080700",
"sourceBytes": 5128989,
"resampled": false
}
}

View File

@@ -0,0 +1,124 @@
{
"source": {
"format": "weather-v2-particle-bin-v1",
"magic": "WVECBIN1",
"targetTime": "2026080706",
"width": 513,
"height": 769,
"bounds": {
"west": 112.5,
"south": 0.0,
"east": 157.5,
"north": 55.77657301866769
},
"dtype": "float32 little-endian u plane, v plane, speed plane; uint8 valid plane",
"arrayOrder": "row-major; WeatherV2 tile y increases southward, so rows are north-to-south",
"uVUnit": "m/s",
"validCount": 394497,
"invalidCount": 0,
"bytes": 5128989
},
"output": {
"width": 513,
"height": 769,
"bounds": {
"west": 112.5,
"south": 0.0,
"east": 157.5,
"north": 55.77657301866769
},
"bytes": 3155976,
"sha256": "ef7a8e4b1c47f652f8f7012de16a87c16e3b25556a8f4686629f80514426c451",
"validCount": 394497,
"invalidCount": 0,
"resampled": false
},
"statistics": {
"u": {
"min": -37.18255615234375,
"max": 24.125526428222656,
"mean": 0.9443698525428772
},
"v": {
"min": -28.227636337280273,
"max": 25.05806541442871,
"mean": 1.0168105363845825
},
"speed": {
"min": 0.010480343364179134,
"max": 37.76322555541992,
"mean": 6.7594804763793945
}
},
"sourceToCanonical": {
"lossless": true,
"maxAbsErrorU": 0.0,
"maxAbsErrorV": 0.0,
"samples": [
{
"row": 384,
"column": 256,
"sourceU": -10.2057466506958,
"sourceV": 4.789729118347168,
"canonicalU": -10.2057466506958,
"canonicalV": 4.789729118347168
},
{
"row": 1,
"column": 1,
"sourceU": -0.45672082901000977,
"sourceV": 3.2181167602539062,
"canonicalU": -0.45672082901000977,
"canonicalV": 3.2181167602539062
},
{
"row": 1,
"column": 511,
"sourceU": 2.235017776489258,
"sourceV": -0.7363739013671875,
"canonicalU": 2.235017776489258,
"canonicalV": -0.7363739013671875
},
{
"row": 767,
"column": 1,
"sourceU": -1.2302308082580566,
"sourceV": 1.5909242630004883,
"canonicalU": -1.2302308082580566,
"canonicalV": 1.5909242630004883
},
{
"row": 767,
"column": 511,
"sourceU": -5.034683704376221,
"sourceV": -0.15012121200561523,
"canonicalU": -5.034683704376221,
"canonicalV": -0.15012121200561523
},
{
"row": 0,
"column": 0,
"sourceU": -0.15583133697509766,
"sourceV": 3.617917060852051,
"canonicalU": -0.15583133697509766,
"canonicalV": 3.617917060852051
},
{
"row": 0,
"column": 1,
"sourceU": -0.45672082901000977,
"sourceV": 3.551283836364746,
"canonicalU": -0.45672082901000977,
"canonicalV": 3.551283836364746
},
{
"row": 0,
"column": 2,
"sourceU": -0.6974325180053711,
"sourceV": 3.2181167602539062,
"canonicalU": -0.6974325180053711,
"canonicalV": 3.2181167602539062
}
]
}
}

View File

@@ -0,0 +1,41 @@
{
"schema": "maplibre-particle-field/v1",
"fieldId": "ecmwf-hres-wind-2026080706",
"fieldType": "WIND",
"displayDomain": "GLOBAL",
"generation": 1786082400000,
"validTime": 1786082400000,
"dataVersion": 1786082400000,
"bounds": {
"west": 112.5,
"south": 0.0,
"east": 157.5,
"north": 55.77657301866769
},
"grid": {
"width": 513,
"height": 769
},
"vector": {
"layout": "interleaved-uv",
"encoding": "float32-le",
"noData": -9999.0,
"unit": "m/s",
"origin": "north-west",
"rowOrder": "north-to-south",
"columnOrder": "west-to-east",
"uPositive": "east",
"vPositive": "north"
},
"payload": {
"byteLength": 3155976,
"sha256": "ef7a8e4b1c47f652f8f7012de16a87c16e3b25556a8f4686629f80514426c451"
},
"source": {
"kind": "WeatherV2 ECMWF HRES WVECBIN1",
"referenceTime": "2026080600",
"targetTime": "2026080706",
"sourceBytes": 5128989,
"resampled": false
}
}

View File

@@ -0,0 +1,124 @@
{
"source": {
"format": "weather-v2-particle-bin-v1",
"magic": "WVECBIN1",
"targetTime": "2026080712",
"width": 513,
"height": 769,
"bounds": {
"west": 112.5,
"south": 0.0,
"east": 157.5,
"north": 55.77657301866769
},
"dtype": "float32 little-endian u plane, v plane, speed plane; uint8 valid plane",
"arrayOrder": "row-major; WeatherV2 tile y increases southward, so rows are north-to-south",
"uVUnit": "m/s",
"validCount": 394497,
"invalidCount": 0,
"bytes": 5128989
},
"output": {
"width": 513,
"height": 769,
"bounds": {
"west": 112.5,
"south": 0.0,
"east": 157.5,
"north": 55.77657301866769
},
"bytes": 3155976,
"sha256": "d86a6a51fd5216cf9368756962a5366fd32a627afd40cfde235ba7358c02c5a0",
"validCount": 394497,
"invalidCount": 0,
"resampled": false
},
"statistics": {
"u": {
"min": -37.39310836791992,
"max": 24.769317626953125,
"mean": 0.7698453664779663
},
"v": {
"min": -28.266582489013672,
"max": 27.809932708740234,
"mean": 1.1808899641036987
},
"speed": {
"min": 0.024363698437809944,
"max": 37.42909240722656,
"mean": 6.384326934814453
}
},
"sourceToCanonical": {
"lossless": true,
"maxAbsErrorU": 0.0,
"maxAbsErrorV": 0.0,
"samples": [
{
"row": 384,
"column": 256,
"sourceU": -10.180034637451172,
"sourceV": 4.663511276245117,
"canonicalU": -10.180034637451172,
"canonicalV": 4.663511276245117
},
{
"row": 1,
"column": 1,
"sourceU": -0.5417494773864746,
"sourceV": 0.767613410949707,
"canonicalU": -0.5417494773864746,
"canonicalV": 0.767613410949707
},
{
"row": 1,
"column": 511,
"sourceU": -0.5780353546142578,
"sourceV": 0.26222801208496094,
"canonicalU": -0.5780353546142578,
"canonicalV": 0.26222801208496094
},
{
"row": 767,
"column": 1,
"sourceU": -1.8420743942260742,
"sourceV": 0.3505821228027344,
"canonicalU": -1.8420743942260742,
"canonicalV": 0.3505821228027344
},
{
"row": 767,
"column": 511,
"sourceU": -4.581581115722656,
"sourceV": -1.1498479843139648,
"canonicalU": -4.581581115722656,
"canonicalV": -1.1498479843139648
},
{
"row": 0,
"column": 0,
"sourceU": -0.5939555168151855,
"sourceV": 1.1400480270385742,
"canonicalU": -0.5939555168151855,
"canonicalV": 1.1400480270385742
},
{
"row": 0,
"column": 1,
"sourceU": -0.48954296112060547,
"sourceV": 1.0159034729003906,
"canonicalU": -0.48954296112060547,
"canonicalV": 1.0159034729003906
},
{
"row": 0,
"column": 2,
"sourceU": -0.48954296112060547,
"sourceV": 0.767613410949707,
"canonicalU": -0.48954296112060547,
"canonicalV": 0.767613410949707
}
]
}
}

View File

@@ -0,0 +1,41 @@
{
"schema": "maplibre-particle-field/v1",
"fieldId": "ecmwf-hres-wind-2026080712",
"fieldType": "WIND",
"displayDomain": "GLOBAL",
"generation": 1786104000000,
"validTime": 1786104000000,
"dataVersion": 1786104000000,
"bounds": {
"west": 112.5,
"south": 0.0,
"east": 157.5,
"north": 55.77657301866769
},
"grid": {
"width": 513,
"height": 769
},
"vector": {
"layout": "interleaved-uv",
"encoding": "float32-le",
"noData": -9999.0,
"unit": "m/s",
"origin": "north-west",
"rowOrder": "north-to-south",
"columnOrder": "west-to-east",
"uPositive": "east",
"vPositive": "north"
},
"payload": {
"byteLength": 3155976,
"sha256": "d86a6a51fd5216cf9368756962a5366fd32a627afd40cfde235ba7358c02c5a0"
},
"source": {
"kind": "WeatherV2 ECMWF HRES WVECBIN1",
"referenceTime": "2026080600",
"targetTime": "2026080712",
"sourceBytes": 5128989,
"resampled": false
}
}

View File

@@ -0,0 +1,124 @@
{
"source": {
"format": "weather-v2-particle-bin-v1",
"magic": "WVECBIN1",
"targetTime": "2026080718",
"width": 513,
"height": 769,
"bounds": {
"west": 112.5,
"south": 0.0,
"east": 157.5,
"north": 55.77657301866769
},
"dtype": "float32 little-endian u plane, v plane, speed plane; uint8 valid plane",
"arrayOrder": "row-major; WeatherV2 tile y increases southward, so rows are north-to-south",
"uVUnit": "m/s",
"validCount": 394497,
"invalidCount": 0,
"bytes": 5128989
},
"output": {
"width": 513,
"height": 769,
"bounds": {
"west": 112.5,
"south": 0.0,
"east": 157.5,
"north": 55.77657301866769
},
"bytes": 3155976,
"sha256": "970785b0334a9d1511b8897874a81f681814a32b1e0b90e37cf64b77ca9fa39b",
"validCount": 394497,
"invalidCount": 0,
"resampled": false
},
"statistics": {
"u": {
"min": -31.956016540527344,
"max": 28.557456970214844,
"mean": 1.212062120437622
},
"v": {
"min": -26.13941192626953,
"max": 27.131576538085938,
"mean": 1.1284888982772827
},
"speed": {
"min": 0.0210099034011364,
"max": 33.67807388305664,
"mean": 6.403453826904297
}
},
"sourceToCanonical": {
"lossless": true,
"maxAbsErrorU": 0.0,
"maxAbsErrorV": 0.0,
"samples": [
{
"row": 384,
"column": 256,
"sourceU": -10.21538257598877,
"sourceV": 2.3842287063598633,
"canonicalU": -10.21538257598877,
"canonicalV": 2.3842287063598633
},
{
"row": 1,
"column": 1,
"sourceU": -0.18732452392578125,
"sourceV": 0.2720670700073242,
"canonicalU": -0.18732452392578125,
"canonicalV": 0.2720670700073242
},
{
"row": 1,
"column": 511,
"sourceU": 0.460113525390625,
"sourceV": 0.4729623794555664,
"canonicalU": 0.460113525390625,
"canonicalV": 0.4729623794555664
},
{
"row": 767,
"column": 1,
"sourceU": -1.4576325416564941,
"sourceV": -0.03371381759643555,
"canonicalU": -1.4576325416564941,
"canonicalV": -0.03371381759643555
},
{
"row": 767,
"column": 511,
"sourceU": -2.9916043281555176,
"sourceV": 0.8597030639648438,
"canonicalU": -2.9916043281555176,
"canonicalV": 0.8597030639648438
},
{
"row": 0,
"column": 0,
"sourceU": -1.020096778869629,
"sourceV": 0.9125776290893555,
"canonicalU": -1.020096778869629,
"canonicalV": 0.9125776290893555
},
{
"row": 0,
"column": 1,
"sourceU": -0.49961376190185547,
"sourceV": 0.6990737915039062,
"canonicalU": -0.49961376190185547,
"canonicalV": 0.6990737915039062
},
{
"row": 0,
"column": 2,
"sourceU": -0.08322811126708984,
"sourceV": 0.41440296173095703,
"canonicalU": -0.08322811126708984,
"canonicalV": 0.41440296173095703
}
]
}
}

View File

@@ -0,0 +1,41 @@
{
"schema": "maplibre-particle-field/v1",
"fieldId": "ecmwf-hres-wind-2026080718",
"fieldType": "WIND",
"displayDomain": "GLOBAL",
"generation": 1786125600000,
"validTime": 1786125600000,
"dataVersion": 1786125600000,
"bounds": {
"west": 112.5,
"south": 0.0,
"east": 157.5,
"north": 55.77657301866769
},
"grid": {
"width": 513,
"height": 769
},
"vector": {
"layout": "interleaved-uv",
"encoding": "float32-le",
"noData": -9999.0,
"unit": "m/s",
"origin": "north-west",
"rowOrder": "north-to-south",
"columnOrder": "west-to-east",
"uPositive": "east",
"vPositive": "north"
},
"payload": {
"byteLength": 3155976,
"sha256": "970785b0334a9d1511b8897874a81f681814a32b1e0b90e37cf64b77ca9fa39b"
},
"source": {
"kind": "WeatherV2 ECMWF HRES WVECBIN1",
"referenceTime": "2026080600",
"targetTime": "2026080718",
"sourceBytes": 5128989,
"resampled": false
}
}

View File

@@ -0,0 +1,14 @@
{
"schema": "maplibre-particle-test-dataset/v1",
"datasetId": "ecmwf-hres-wind-20260807",
"source": "WeatherV2 ECMWF HRES WVECBIN1",
"referenceTime": "2026080600",
"validTimes": [
"2026080700",
"2026080706",
"2026080712",
"2026080718"
],
"snapshotLayout": "<validTime>/metadata.json + <validTime>/field.f32",
"notes": "开发期离线 canonical 测试索引;不是 Weather Manifest,也不进入 ParticleFieldSnapshot。"
}