aixweather.core_data_format_2_output_file package

AixWeather core_data_format_2_output_file Package

The ‘core_data_format_2_output_file’ package within AixWeather contains modules for transforming the core_data to the desired output format and actually returning the output file. The Input here is always in the core_data format. Each module is designed to produce a specific output format.

Submodules

aixweather.core_data_format_2_output_file.to_epw_energyplus module

convert core data to epw (EnergyPlus) data

aixweather.core_data_format_2_output_file.to_epw_energyplus.logger = <Logger aixweather.core_data_format_2_output_file.to_epw_energyplus (WARNING)>

format_epw information: for links see readme

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_epw 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.core_data_format_2_output_file.to_epw_energyplus.to_epw(core_df: ~pandas.core.frame.DataFrame, meta: ~aixweather.imports.utils_import.MetaData, start: ~datetime.datetime, stop: ~datetime.datetime, fillna: bool, result_folder: str = None, filename: str = None) -> (<class 'pandas.core.frame.DataFrame'>, <class 'str'>)[source]

Create an EPW file from the core data.

Args:

core_df (pd.DataFrame): DataFrame containing core data. meta (MetaData): Metadata associated with the weather data. start (dt.datetime): Timestamp for the start of the EPW file. stop (dt.datetime): Timestamp for the end of the EPW file. fillna (bool): Boolean indicating whether NaN values should be filled. result_folder (str):

Path to the folder where to save the file. Default will use the results_file_path method.

filename (str): Name of the file to be saved. The default is constructed

based on the meta-data as well as start and stop time

Returns:
pd.DataFrame: DataFrame containing the weather data formatted for EPW export,

excluding metadata.

str: Path to the exported file.

aixweather.core_data_format_2_output_file.to_mos_TMY3 module

Converts core data to modelica TMY3Reader data

aixweather.core_data_format_2_output_file.to_mos_TMY3.logger = <Logger aixweather.core_data_format_2_output_file.to_mos_TMY3 (WARNING)>

format_modelica_TMY3 information:

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 AixLib TMY3 Reader, those values are filled if nan.

All changes here automatically change the calculations. Exception: unit conversions have to be added manually.

time_of_meas_shift´s checked by Martin Rätz (07.08.2023) unit´s checked by Martin Rätz (07.08.2023)

aixweather.core_data_format_2_output_file.to_mos_TMY3.to_mos(core_df: ~pandas.core.frame.DataFrame, meta: ~aixweather.imports.utils_import.MetaData, start: ~datetime.datetime, stop: ~datetime.datetime, fillna: bool, result_folder: str = None, filename: str = None) -> (<class 'pandas.core.frame.DataFrame'>, <class 'str'>)[source]

Create a MOS file from the core data.

Args:

core_df (pd.DataFrame): DataFrame containing core data. meta (MetaData): Metadata associated with the weather data. start (dt.datetime): Timestamp for the start of the MOS file. stop (dt.datetime): Timestamp for the end of the MOS file. fillna (bool): Boolean indicating whether NaN values should be filled. result_folder (str):

Path to the folder where to save the file. Default will use the results_file_path method.

filename (str): Name of the file to be saved. The default is constructed

based on the meta-data as well as start and stop time

Returns:
pd.DataFrame: DataFrame containing the weather data formatted for MOS export,

excluding metadata.

str: Path to the exported file.

aixweather.core_data_format_2_output_file.unconverted_to_x module

converts core data to different simpler formats (currently without any transformation)

aixweather.core_data_format_2_output_file.unconverted_to_x.to_csv(core_df: ~pandas.core.frame.DataFrame, meta: ~aixweather.imports.utils_import.MetaData, result_folder: str = None, filename: str = None) -> (<class 'pandas.core.frame.DataFrame'>, <class 'str'>)[source]

Create and save a csv file from the core data.

Args:

core_df (pd.DataFrame): DataFrame containing core data. meta (MetaData): Metadata associated with the data. result_folder (str):

Path to the folder where to save the file. Default will use the results_file_path method.

filename (str): Name of the file to be saved. The default is constructed

based on the station name.

Returns:

pd.DataFrame: DataFrame containing the weather data formatted as core data. str: Path to the exported file.

aixweather.core_data_format_2_output_file.unconverted_to_x.to_json(core_df: ~pandas.core.frame.DataFrame, meta: ~aixweather.imports.utils_import.MetaData, result_folder: str = None, filename: str = None) -> (<class 'pandas.core.frame.DataFrame'>, <class 'str'>)[source]

Create and save a json file from the core data.

Args:

core_df (pd.DataFrame): DataFrame containing core data. meta (MetaData): Metadata associated with the data. result_folder (str):

Path to the folder where to save the file. Default will use the results_file_path method.

filename (str): Name of the file to be saved. The default is constructed

based on the station name.

Returns:

pd.DataFrame: DataFrame containing the weather data formatted as core data. str: Path to the exported file.

aixweather.core_data_format_2_output_file.unconverted_to_x.to_pickle(core_df: ~pandas.core.frame.DataFrame, meta: ~aixweather.imports.utils_import.MetaData, result_folder: str = None, filename: str = None) -> (<class 'pandas.core.frame.DataFrame'>, <class 'str'>)[source]

Create and save a pickle file from the core data.

Args:

core_df (pd.DataFrame): DataFrame containing core data. meta (MetaData): Metadata associated with the data. result_folder (str):

Path to the folder where to save the file. Default will use the results_file_path method.

filename (str): Name of the file to be saved. The default is constructed

based on the station name.

Returns:

pd.DataFrame: DataFrame containing the weather data formatted as core data. str: Path to the exported file.