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.fill_full_first_day(df)[source]
aixweather.core_data_format_2_output_file.to_epw_energyplus.fill_full_last_day(df)[source]
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, export_in_utc: bool = False) -> (<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

export_in_utc (bool): Timezone to be used for the export.

True (default) to use the core_df timezone, UTC+0, False (default) to use timezone from metadata

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

class aixweather.core_data_format_2_output_file.to_mos_TMY3.ModelicaTMY3Format[source]

Bases: object

Information on Modelicas TMY3 reader:

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)

classmethod export_format() dict[source]
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, export_in_utc: bool = False) -> (<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 in UTC. stop (dt.datetime): Timestamp for the end of the MOS file in UTC. 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

export_in_utc (bool): Timezone to be used for the export.

True (default) to use the core_df timezone, UTC+0, False (default) to use timezone from metadata

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.