pytrnsys_process.read.readers.PrtReader#
- class pytrnsys_process.read.readers.PrtReader(SKIPFOOTER: int = 24, HEADER: int = 1, DELIMITER: str = '\\s+')[source]#
-
Methods
__init__([SKIPFOOTER, HEADER, DELIMITER])read(file_path[, skipfooter, header, delimiter])Common read function for all readers
read_hourly(hourly_file[, starting_year, logger])Read hourly TRNSYS output data from a file.
read_monthly(monthly_file[, starting_year, ...])Read monthly TRNSYS output data from a file.
read_step(step_file[, starting_year, ...])Attributes
DELIMITERHEADERSKIPFOOTER- read_hourly(hourly_file: ~pathlib.Path, starting_year: int = 1990, logger: ~logging.Logger = <Logger default_pytrnsys_process (WARNING)>) DataFrame[source]#
Read hourly TRNSYS output data from a file.
- Parameters:
hourly_file – Path to the hourly TRNSYS output file
starting_year – Year to use as the start of the simulation (default: 1990)
- Returns:
df – DataFrame with hourly data indexed by timestamp, with ‘Period’ and ‘time’ columns removed
- Return type:
- Raises:
ValueError – If the timestamps are not exactly on the hour (minutes or seconds != 0):
- read_monthly(monthly_file: ~pathlib.Path, starting_year: int = 1990, logger: ~logging.Logger = <Logger default_pytrnsys_process (WARNING)>) DataFrame[source]#
Read monthly TRNSYS output data from a file.
- Parameters:
monthly_file – Path to the monthly TRNSYS output file
starting_year – Year to use as the start of the simulation (default: 1990)
- Returns:
df – DataFrame with monthly data indexed by timestamp, with ‘Month’ and ‘time’ columns removed
- Return type:
- Raises:
ValueError – If the timestamps are not at the start of each month at midnight: (not month start or hours/minutes/seconds != 0)