roe-dl / weewx-DWD

Darstellung von Wettersymbolen in WeeWX sowie Vorhersage- und Warndaten herunterladen und für WeeWX und Web-Darstellung aufbereiten
GNU General Public License v3.0
19 stars 4 forks source link

dwd-mosmix - airquality - UBA #41

Closed hoetzgit closed 1 year ago

hoetzgit commented 1 year ago

Hallo,

wenn ich für die Luftqualität eine UBA Station verwende, kann es zu folgendem Verhalten kommen. Voraussetzung für meine Rückmeldung ist hier, dass ich dwd-mosmix Zeile 1765 richtig interpretiert habe und immer das letzte Element aus data für die jeweilige Station im UBA JSON benutzt wird.

Es ist tatsächlich so, dass der data Teil nicht (immer) aufsteigend nach Messdatum sortiert ist. Unten ein konkretes Beispiel von heute. Es werden dann durch dwd-mosmix "falsche" Ergebnisse erzeugt.

Abfrage:

https://www.umweltbundesamt.de/api/air_data/v2/airquality/json?date_from=2023-02-06&date_to=2023-02-07&lang=de&station=509

Result (erst aufsteigend, im unteren Teil jedoch 2 Elemente mit vorhergehendem Zeitstempel):

{
  "request": {
    "station": "509",
    "date_from": "2023-02-06",
    "date_to": "2023-02-07",
    "lang": "de",
    "index": "id",
    "time_from": "12:00:00",
    "datetime_from": "2023-02-06 11:00:00",
    "time_to": "12:00:00",
    "datetime_to": "2023-02-07 11:00:00"
  },
  "data": {
    "509": {
      "2023-02-06 11:00:00": [
        "2023-02-06 12:00:00",
        1,
        1,
        [
          3,
          5,
          0,
          "0.083"
        ],
        [
          5,
          28,
          1,
          "1.368"
        ]
      ],
      "2023-02-06 12:00:00": [
        "2023-02-06 13:00:00",
        1,
        1,
        [
          3,
          9,
          0,
          "0.150"
        ],
        [
          5,
          29,
          1,
          "1.421"
        ]
      ],
      "2023-02-06 13:00:00": [
        "2023-02-06 14:00:00",
        1,
        1,
        [
          3,
          20,
          0,
          "0.333"
        ],
        [
          5,
          23,
          1,
          "1.105"
        ]
      ],
      "2023-02-06 14:00:00": [
        "2023-02-06 15:00:00",
        1,
        1,
        [
          3,
          15,
          0,
          "0.250"
        ],
        [
          5,
          31,
          1,
          "1.526"
        ]
      ],
      "2023-02-06 15:00:00": [
        "2023-02-06 16:00:00",
        1,
        1,
        [
          3,
          11,
          0,
          "0.183"
        ],
        [
          5,
          38,
          1,
          "1.895"
        ]
      ],
      "2023-02-06 16:00:00": [
        "2023-02-06 17:00:00",
        2,
        1,
        [
          3,
          6,
          0,
          "0.100"
        ],
        [
          5,
          44,
          2,
          "2.051"
        ]
      ],
      "2023-02-06 17:00:00": [
        "2023-02-06 18:00:00",
        1,
        1,
        [
          3,
          16,
          0,
          "0.267"
        ],
        [
          5,
          39,
          1,
          "1.947"
        ]
      ],
      "2023-02-06 18:00:00": [
        "2023-02-06 19:00:00",
        2,
        1,
        [
          3,
          15,
          0,
          "0.250"
        ],
        [
          5,
          43,
          2,
          "2.034"
        ]
      ],
      "2023-02-06 19:00:00": [
        "2023-02-06 20:00:00",
        1,
        1,
        [
          3,
          19,
          0,
          "0.317"
        ],
        [
          5,
          33,
          1,
          "1.632"
        ]
      ],
      "2023-02-06 20:00:00": [
        "2023-02-06 21:00:00",
        1,
        1,
        [
          3,
          20,
          0,
          "0.333"
        ],
        [
          5,
          31,
          1,
          "1.526"
        ]
      ],
      "2023-02-06 21:00:00": [
        "2023-02-06 22:00:00",
        1,
        1,
        [
          3,
          10,
          0,
          "0.167"
        ],
        [
          5,
          39,
          1,
          "1.947"
        ]
      ],
      "2023-02-06 22:00:00": [
        "2023-02-06 23:00:00",
        1,
        1,
        [
          3,
          13,
          0,
          "0.217"
        ],
        [
          5,
          36,
          1,
          "1.789"
        ]
      ],
      "2023-02-06 23:00:00": [
        "2023-02-06 24:00:00",
        1,
        1,
        [
          3,
          6,
          0,
          "0.100"
        ],
        [
          5,
          38,
          1,
          "1.895"
        ]
      ],
      "2023-02-07 00:00:00": [
        "2023-02-07 01:00:00",
        1,
        1,
        [
          3,
          24,
          0,
          "0.400"
        ],
        [
          5,
          23,
          1,
          "1.105"
        ]
      ],
      "2023-02-07 01:00:00": [
        "2023-02-07 02:00:00",
        1,
        1,
        [
          3,
          19,
          0,
          "0.317"
        ],
        [
          5,
          27,
          1,
          "1.316"
        ]
      ],
      "2023-02-07 02:00:00": [
        "2023-02-07 03:00:00",
        1,
        1,
        [
          3,
          15,
          0,
          "0.250"
        ],
        [
          5,
          29,
          1,
          "1.421"
        ]
      ],
      "2023-02-07 03:00:00": [
        "2023-02-07 04:00:00",
        1,
        1,
        [
          3,
          13,
          0,
          "0.217"
        ],
        [
          5,
          29,
          1,
          "1.421"
        ]
      ],
      "2023-02-07 04:00:00": [
        "2023-02-07 05:00:00",
        1,
        1,
        [
          3,
          3,
          0,
          "0.050"
        ],
        [
          5,
          39,
          1,
          "1.947"
        ]
      ],
      "2023-02-07 05:00:00": [
        "2023-02-07 06:00:00",
        2,
        1,
        [
          3,
          1,
          0,
          "0.017"
        ],
        [
          5,
          41,
          2,
          "2.000"
        ]
      ],
      "2023-02-07 08:00:00": [
        "2023-02-07 09:00:00",
        2,
        1,
        [
          3,
          4,
          0,
          "0.067"
        ],
        [
          5,
          41,
          2,
          "2.000"
        ]
      ],
      "2023-02-07 09:00:00": [
        "2023-02-07 10:00:00",
        1,
        1,
        [
          3,
          15,
          0,
          "0.250"
        ],
        [
          5,
          30,
          1,
          "1.474"
        ]
      ],
      "2023-02-07 10:00:00": [
        "2023-02-07 11:00:00",
        1,
        1,
        [
          3,
          14,
          0,
          "0.233"
        ],
        [
          5,
          26,
          1,
          "1.263"
        ]
      ],
      "2023-02-07 06:00:00": [
        "2023-02-07 07:00:00",
        2,
        1,
        [
          5,
          45,
          2,
          "2.068"
        ]
      ],
      "2023-02-07 07:00:00": [
        "2023-02-07 08:00:00",
        2,
        1,
        [
          5,
          51,
          2,
          "2.169"
        ]
      ]
    }
  },
  "indices": {
    "data": {
      "station id": {
        "date start (CET)": [
          "date end (CET)"
        ],
        "date start": {
          "1": "total index",
          "2": "data incomplete",
          "3": [
            "component id",
            "value",
            "index",
            "y-value"
          ]
        }
      }
    }
  },
  "count": 1
}
roe-dl commented 1 year ago

@hoetzgit Bitte prüfen.

hoetzgit commented 1 year ago

@hoetzgit Bitte prüfen.

das passt, bei mir wieder alles ok. Besten Dank!