energy_data_retrieval.sources.dwd.client#
Bounded DWD CDC hourly solar archives with native units, times and metadata.
MESS_DATUM is retained at its published UTC minute, and MESS_DATUM_WOZ is retained separately as local true solar time. Hourly energy totals remain in J/cm²: the adapter does not infer interval boundaries or round times to an hourly UTC grid. Station history and instrument metadata remain in the ZIP.
- energy_data_retrieval.sources.dwd.client.normalize_stations(raw, *, bbox=None, maximum_stations=10000)[source]#
Decode the documented fixed-width station list without losing German names.
- Parameters:
raw (bytes)
bbox (tuple[float, float, float, float] | None)
maximum_stations (int)
- Return type:
DataFrame
- energy_data_retrieval.sources.dwd.client.normalize_solar(raw, station_id, start, end, *, maximum_rows=1000000, maximum_archive_members=128, maximum_uncompressed_bytes=536870912)[source]#
Preserve hourly J/cm² sums and exact UTC/true-solar-time labels and QN codes.
- Parameters:
raw (bytes)
station_id (str)
start (date)
end (date)
maximum_rows (int)
maximum_archive_members (int)
maximum_uncompressed_bytes (int)
- Return type:
DataFrame
- class energy_data_retrieval.sources.dwd.client.DWDStations(frame: 'pd.DataFrame', request: 'RequestRecord', raw_bytes: 'bytes', bbox: 'tuple[float, float, float, float] | None' = None, maximum_stations: 'int' = 10000)[source]#
Bases:
object- Parameters:
frame (DataFrame)
request (RequestRecord)
raw_bytes (bytes)
bbox (tuple[float, float, float, float] | None)
maximum_stations (int)
- frame: DataFrame#
- request: RequestRecord#
- raw_bytes: bytes#
- bbox: tuple[float, float, float, float] | None#
- maximum_stations: int#
- class energy_data_retrieval.sources.dwd.client.DWDSolar(station_id: 'str', start: 'date', end: 'date', frame: 'pd.DataFrame', request: 'RequestRecord', raw_bytes: 'bytes', maximum_rows: 'int' = 1000000, maximum_archive_members: 'int' = 128, maximum_uncompressed_bytes: 'int' = 536870912)[source]#
Bases:
object- Parameters:
station_id (str)
start (date)
end (date)
frame (DataFrame)
request (RequestRecord)
raw_bytes (bytes)
maximum_rows (int)
maximum_archive_members (int)
maximum_uncompressed_bytes (int)
- station_id: str#
- start: date#
- end: date#
- frame: DataFrame#
- request: RequestRecord#
- raw_bytes: bytes#
- maximum_rows: int#
- maximum_archive_members: int#
- maximum_uncompressed_bytes: int#
- energy_data_retrieval.sources.dwd.client.save_stations(result, output)[source]#
- Parameters:
result (DWDStations)
output (Path)
- Return type:
- class energy_data_retrieval.sources.dwd.client.DWDClient(http: 'HTTPClient', maximum_rows: 'int' = 1000000, maximum_stations: 'int' = 10000, maximum_archive_members: 'int' = 128, maximum_uncompressed_bytes: 'int' = 536870912)[source]#
Bases:
object- Parameters:
http (HTTPClient)
maximum_rows (int)
maximum_stations (int)
maximum_archive_members (int)
maximum_uncompressed_bytes (int)
- http: HTTPClient#
- maximum_rows: int#
- maximum_stations: int#
- maximum_archive_members: int#
- maximum_uncompressed_bytes: int#
- stations(*, bbox=None)[source]#
- Parameters:
bbox (tuple[float, float, float, float] | None)
- Return type:
- retrieve_stations(output, *, bbox=None)[source]#
- Parameters:
output (Path)
bbox (tuple[float, float, float, float] | None)
- Return type: