aixweather.transformation_to_core_data package
AixWeather Transformation to Core Data
The ‘transformation_to_core_data’ module contains functions to transform imported weather data to a standardized core data format within the AixWeather package (see auxiliary.py).
This core data format adheres to specific guidelines:
Timezone: UTC
Hourly data
Index is a datetime index (DatetimeIndex complete and monotonic)
Measurement at the indicated time (not as average for the following or preceding hour)
Always the same set of variables names (see core_data)
Missing values are displayed as ‘nan’
These transformation functions take imported_data as input and convert it to the specified core data format, ensuring uniformity and adherence to the core data guidelines.
Each module is designed to handle data from a specific source or format.
Submodules
aixweather.transformation_to_core_data.DWD module
- class aixweather.transformation_to_core_data.DWD.DWDForecast[source]
Bases:
objectInformation on DWD forecast:
Variable definitions: https://opendata.dwd.de/weather/lib/MetElementDefinition.xml or https://wetterdienst.readthedocs.io/en/latest/data/coverage/dwd/mosmix/hourly.html (in origin unit)
checked by Martin Rätz 18.08.2023
- class aixweather.transformation_to_core_data.DWD.DWDHistoricalFormat[source]
Bases:
objectInformation on DWD historical data: see readme
Format info: key = raw data point name core_name = corresponding name matching the format_core_data time_of_meas_shift = desired 30min shifting+interpolation to convert a value that is e.g. the “average of preceding hour” to “indicated time” (prec2ind). unit = unit of the raw data following the naming convention of format_core_data
All changes here automatically change the calculations. Exception: unit conversions have to be added manually.
checked by Martin Rätz (08.08.2023)
- aixweather.transformation_to_core_data.DWD.DWD_forecast_2_core_data(df_import: DataFrame, meta: MetaData) DataFrame[source]
Transform imported weather forecast data from DWD into core data format.
- Args:
df_import (pd.DataFrame): The DataFrame containing imported weather forecast data from DWD. meta (MetaData): Metadata associated with the data.
- Returns:
pd.DataFrame: The transformed DataFrame in the core data format.
- aixweather.transformation_to_core_data.DWD.DWD_historical_to_core_data(df_import: DataFrame, start: datetime, stop: datetime, meta: MetaData) DataFrame[source]
Transform imported weather data from DWD historical format into core data format.
- Args:
df_import (pd.DataFrame): The DataFrame containing imported weather data from DWD. start (datetime): The timestamp for the start of the desired data range (will be extended for interpolation). stop (datetime): The timestamp for the end of the desired data range (will be extended for interpolation). meta (MetaData): Metadata associated with the data.
- Returns:
pd.DataFrame: The transformed DataFrame in the core data format.
aixweather.transformation_to_core_data.EPW module
This module includes a function to transform EPW data to core data format.
- class aixweather.transformation_to_core_data.EPW.EPWFormat[source]
Bases:
objectInformation on EPW format: Online sources for EPW data: https://climate.onebuilding.org/default.html and https://www.ladybug.tools/epwmap/
- Format info:
key = output data point name
core_name = corresponding name matching the format_core_data
time_of_meas_shift = desired 30min shifting+interpolation to convert the value that is “at indicated time” to “average of preceding hour” (ind2prec).
unit = unit of the output data following the naming convention of format_core_data
nan = The default values stated from the format information, those values are filled if nan.
All changes here automatically change the calculations. Exception: unit conversions have to be added manually.
- Information for shifting:
Hour: This is the hour of the data. (1 - 24). Hour 1 is 00:01 to 01:00. Cannot be missing. but e.g.: DryBulbTemp: This is the dry bulb temperature in C at the time indicated. and: GlobHorRad: received on a horizontal surface during the hour preceding the time indicated. —-> Hence, we assume that hour 1 should show the DryBulbTemp from 0:30 to 1:30, i.e. the Temp at indicated time.
time of measurement checked by Martin Rätz (07.08.2023) units checked by Martin Rätz (07.08.2023)
- aixweather.transformation_to_core_data.EPW.EPW_to_core_data(df_import: DataFrame, meta: MetaData) DataFrame[source]
Transform imported EPW (EnergyPlus Weather) data into core data format.
- Args:
df_import (pd.DataFrame): The DataFrame containing imported EPW weather data. meta (MetaData): Metadata associated with the data.
- Returns:
pd.DataFrame: The transformed DataFrame in the core data format.
aixweather.transformation_to_core_data.ERC module
This module includes functions to transform ERC data to core data format.
- class aixweather.transformation_to_core_data.ERC.ERCFormat[source]
Bases:
objectInformation on ERC format
Format info: key = raw data point name core_name = corresponding name matching the format_core_data time_of_meas_shift = desired 30min shifting+interpolation to convert a value that is e.g. the “average of preceding hour” to “indicated time” (prec2ind). unit = unit of the raw data following the naming convention of format_core_data
All changes here automatically change the calculations. Exception: unit conversions have to be added manually.
checked by Martin Rätz 01.09.2023 Radiation checks 12.12.2023: https://github.com/RWTH-EBC/AixWeather/issues/27
- aixweather.transformation_to_core_data.ERC.ERC_to_core_data(df_import: DataFrame, meta: MetaData) DataFrame[source]
Transform imported ERC (Energy Research Center) weather data into core data format.
- Args:
df_import (pd.DataFrame): The DataFrame containing imported ERC weather data. meta (MetaData): Metadata associated with the data.
- Returns:
pd.DataFrame: The transformed DataFrame in the core data format.
aixweather.transformation_to_core_data.TRY module
- class aixweather.transformation_to_core_data.TRY.TRYFormat[source]
Bases:
objectInformation on TRY 2015 and 2045 format
Format info: key = raw data point name core_name = corresponding name matching the format_core_data time_of_meas_shift = desired 30min shifting+interpolation to convert a value that is e.g. the “average of preceding hour” to “indicated time” (prec2ind). unit = unit of the raw data following the naming convention of format_core_data
All changes here automatically change the calculations. Exception: unit conversions have to be added manually.
checked by Martin Rätz (08.08.2023)
https://www.bbsr.bund.de/BBSR/DE/forschung/programme/zb/Auftragsforschung/5EnergieKlimaBauen/2013/testreferenzjahre/try-handbuch.pdf;jsessionid=9F928CDB6862224B04073332C2B1B620.live21301?__blob=publicationFile&v=1 Der erste Eintrag im Datensatz bezieht sich auf den 1. Januar 01 Uhr MEZ und der letzte Eintrag auf den 31. Dezember 24 Uhr MEZ. Also UTC+1. The data is in MEZ or UTC+1 the whole year, which was specified by DWD upon request.
- aixweather.transformation_to_core_data.TRY.TRY_to_core_data(df_import: DataFrame, meta: MetaData) DataFrame[source]
Transform imported TRY data of the formats 2015 and 2045 into the core data format.
- Args:
df_import (pd.DataFrame): The DataFrame containing imported TRY weather data. meta (MetaData): Metadata associated with the data.
- Returns:
pd.DataFrame: The transformed DataFrame in the core data format.
aixweather.transformation_to_core_data.custom_file module
Change this file to your custom requirements. See the info file in the same directory for requirements of the returned df.