docstring
stringlengths
52
499
function
stringlengths
67
35.2k
__index_level_0__
int64
52.6k
1.16M
Corresponds to IDD Field `design_stat_cooling` Args: value (str): value for IDD Field `design_stat_cooling` Accepted values are: - Cooling Default value: Cooling if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def design_stat_cooling(self, value="Cooling"): if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `design_stat_cooling`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `design_stat_cooling`') vals = set() vals.add("Cooling") if value not in vals: raise ValueError('value {} is not an accepted value for ' 'field `design_stat_cooling`'.format(value)) self._design_stat_cooling = value
797,412
Corresponds to IDD Field `hottestmonth` Args: value (int): value for IDD Field `hottestmonth` value >= 1 value <= 12 if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def hottestmonth(self, value=None): if value is not None: try: value = int(value) except ValueError: raise ValueError('value {} need to be of type int ' 'for field `hottestmonth`'.format(value)) if value < 1: raise ValueError('value need to be greater or equal 1 ' 'for field `hottestmonth`') if value > 12: raise ValueError('value need to be smaller 12 ' 'for field `hottestmonth`') self._hottestmonth = value
797,413
Corresponds to IDD Field `db004` Dry-bulb temperature corresponding to 0.4% annual cumulative frequency of occurrence (warm conditions) Args: value (float): value for IDD Field `db004` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def db004(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db004`'.format(value)) self._db004 = value
797,415
Corresponds to IDD Field `db010` Dry-bulb temperature corresponding to 1.0% annual cumulative frequency of occurrence (warm conditions) Args: value (float): value for IDD Field `db010` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def db010(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db010`'.format(value)) self._db010 = value
797,417
Corresponds to IDD Field `db020` mean coincident wet-bulb temperature to Dry-bulb temperature corresponding to 2.0% annual cumulative frequency of occurrence (warm conditions) Args: value (float): value for IDD Field `db020` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def db020(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db020`'.format(value)) self._db020 = value
797,419
Corresponds to IDD Field `wb004` Wet-bulb temperature corresponding to 0.4% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `wb004` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def wb004(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `wb004`'.format(value)) self._wb004 = value
797,421
Corresponds to IDD Field `db_wb004` mean coincident dry-bulb temperature to Wet-bulb temperature corresponding to 0.4% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `db_wb004` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def db_wb004(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_wb004`'.format(value)) self._db_wb004 = value
797,422
Corresponds to IDD Field `wb010` Wet-bulb temperature corresponding to 1.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `wb010` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def wb010(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `wb010`'.format(value)) self._wb010 = value
797,423
Corresponds to IDD Field `db_wb010` mean coincident dry-bulb temperature to Wet-bulb temperature corresponding to 1.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `db_wb010` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def db_wb010(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_wb010`'.format(value)) self._db_wb010 = value
797,424
Corresponds to IDD Field `wb020` Wet-bulb temperature corresponding to 02.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `wb020` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def wb020(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `wb020`'.format(value)) self._wb020 = value
797,425
Corresponds to IDD Field `db_wb020` mean coincident dry-bulb temperature to Wet-bulb temperature corresponding to 2.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `db_wb020` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def db_wb020(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_wb020`'.format(value)) self._db_wb020 = value
797,426
Corresponds to IDD Field `ws_db004` Mean wind speed coincident with 0.4% dry-bulb temperature Args: value (float): value for IDD Field `ws_db004` Unit: m/s if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def ws_db004(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `ws_db004`'.format(value)) self._ws_db004 = value
797,427
Corresponds to IDD Field `dp004` Dew-point temperature corresponding to 0.4% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `dp004` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def dp004(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dp004`'.format(value)) self._dp004 = value
797,429
Corresponds to IDD Field `hr_dp004` humidity ratio corresponding to Dew-point temperature corresponding to 0.4% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `hr_dp004` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def hr_dp004(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `hr_dp004`'.format(value)) self._hr_dp004 = value
797,430
Corresponds to IDD Field `db_dp004` mean coincident dry-bulb temperature to Dew-point temperature corresponding to 0.4% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `db_dp004` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def db_dp004(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_dp004`'.format(value)) self._db_dp004 = value
797,431
Corresponds to IDD Field `dp010` Dew-point temperature corresponding to 1.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `dp010` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def dp010(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dp010`'.format(value)) self._dp010 = value
797,432
Corresponds to IDD Field `db_dp010` mean coincident dry-bulb temperature to Dew-point temperature corresponding to 1.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `db_dp010` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def db_dp010(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_dp010`'.format(value)) self._db_dp010 = value
797,434
Corresponds to IDD Field `dp020` Dew-point temperature corresponding to 2.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `dp020` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def dp020(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dp020`'.format(value)) self._dp020 = value
797,435
Corresponds to IDD Field `db_dp020` mean coincident dry-bulb temperature to Dew-point temperature corresponding to 2.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `db_dp020` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def db_dp020(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_dp020`'.format(value)) self._db_dp020 = value
797,437
Corresponds to IDD Field `en004` mean coincident dry-bulb temperature to Enthalpy corresponding to 0.4% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `en004` Unit: kJ/kg if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def en004(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `en004`'.format(value)) self._en004 = value
797,438
Corresponds to IDD Field `db_en004` mean coincident dry-bulb temperature to Enthalpy corresponding to 0.4% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `db_en004` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def db_en004(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_en004`'.format(value)) self._db_en004 = value
797,439
Corresponds to IDD Field `en010` mean coincident dry-bulb temperature to Enthalpy corresponding to 1.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `en010` Unit: kJ/kg if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def en010(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `en010`'.format(value)) self._en010 = value
797,440
Corresponds to IDD Field `db_en010` mean coincident dry-bulb temperature to Enthalpy corresponding to 1.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `db_en010` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def db_en010(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_en010`'.format(value)) self._db_en010 = value
797,441
Corresponds to IDD Field `en020` mean coincident dry-bulb temperature to Enthalpy corresponding to 2.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `en020` Unit: kJ/kg if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def en020(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `en020`'.format(value)) self._en020 = value
797,442
Corresponds to IDD Field `db_en020` mean coincident dry-bulb temperature to Enthalpy corresponding to 2.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `db_en020` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def db_en020(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_en020`'.format(value)) self._db_en020 = value
797,443
Corresponds to IDD Field `hrs_84_and_db12_8_or_20_6` Number of hours between 8 AM and 4 PM (inclusive) with dry-bulb temperature between 12.8 and 20.6 C Args: value (float): value for IDD Field `hrs_84_and_db12_8_or_20_6` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def hrs_84_and_db12_8_or_20_6(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `hrs_84_and_db12_8_or_20_6`'.format(value)) self._hrs_84_and_db12_8_or_20_6 = value
797,444
Corresponds to IDD Field `design_stat_extremes` Args: value (str): value for IDD Field `design_stat_extremes` Accepted values are: - Extremes Default value: Extremes if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def design_stat_extremes(self, value="Extremes"): if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `design_stat_extremes`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `design_stat_extremes`') vals = set() vals.add("Extremes") if value not in vals: raise ValueError('value {} is not an accepted value for ' 'field `design_stat_extremes`'.format(value)) self._design_stat_extremes = value
797,445
Corresponds to IDD Field `ws010` Wind speed corresponding to 1.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `ws010` Unit: m/s if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def ws010(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `ws010`'.format(value)) self._ws010 = value
797,446
Corresponds to IDD Field `ws025` Wind speed corresponding to 2.5% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `ws025` Unit: m/s if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def ws025(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `ws025`'.format(value)) self._ws025 = value
797,447
Corresponds to IDD Field `ws050` Wind speed corresponding 5.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `ws050` Unit: m/s if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def ws050(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `ws050`'.format(value)) self._ws050 = value
797,448
Corresponds to IDD Field `wbmax` Extreme maximum wet-bulb temperature Args: value (float): value for IDD Field `wbmax` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def wbmax(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `wbmax`'.format(value)) self._wbmax = value
797,449
Corresponds to IDD Field `dbmin_mean` Mean of extreme annual minimum dry-bulb temperature Args: value (float): value for IDD Field `dbmin_mean` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def dbmin_mean(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmin_mean`'.format(value)) self._dbmin_mean = value
797,450
Corresponds to IDD Field `dbmax_mean` Mean of extreme annual maximum dry-bulb temperature Args: value (float): value for IDD Field `dbmax_mean` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def dbmax_mean(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmax_mean`'.format(value)) self._dbmax_mean = value
797,451
Corresponds to IDD Field `dbmin_stddev` Standard deviation of extreme annual minimum dry-bulb temperature Args: value (float): value for IDD Field `dbmin_stddev` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def dbmin_stddev(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmin_stddev`'.format(value)) self._dbmin_stddev = value
797,452
Corresponds to IDD Field `dbmax_stddev` Standard deviation of extreme annual maximum dry-bulb temperature Args: value (float): value for IDD Field `dbmax_stddev` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def dbmax_stddev(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmax_stddev`'.format(value)) self._dbmax_stddev = value
797,453
Corresponds to IDD Field `dbmin05years` 5-year return period values for minimum extreme dry-bulb temperature Args: value (float): value for IDD Field `dbmin05years` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def dbmin05years(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmin05years`'.format(value)) self._dbmin05years = value
797,454
Corresponds to IDD Field `dbmax05years` 5-year return period values for maximum extreme dry-bulb temperature Args: value (float): value for IDD Field `dbmax05years` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def dbmax05years(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmax05years`'.format(value)) self._dbmax05years = value
797,455
Corresponds to IDD Field `dbmin10years` 10-year return period values for minimum extreme dry-bulb temperature Args: value (float): value for IDD Field `dbmin10years` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def dbmin10years(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmin10years`'.format(value)) self._dbmin10years = value
797,456
Corresponds to IDD Field `dbmax10years` 10-year return period values for maximum extreme dry-bulb temperature Args: value (float): value for IDD Field `dbmax10years` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def dbmax10years(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmax10years`'.format(value)) self._dbmax10years = value
797,457
Corresponds to IDD Field `dbmin20years` 20-year return period values for minimum extreme dry-bulb temperature Args: value (float): value for IDD Field `dbmin20years` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def dbmin20years(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmin20years`'.format(value)) self._dbmin20years = value
797,458
Corresponds to IDD Field `dbmax20years` 20-year return period values for maximum extreme dry-bulb temperature Args: value (float): value for IDD Field `dbmax20years` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def dbmax20years(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmax20years`'.format(value)) self._dbmax20years = value
797,459
Corresponds to IDD Field `dbmin50years` 50-year return period values for minimum extreme dry-bulb temperature Args: value (float): value for IDD Field `dbmin50years` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def dbmin50years(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmin50years`'.format(value)) self._dbmin50years = value
797,460
Corresponds to IDD Field `dbmax50years` 50-year return period values for maximum extreme dry-bulb temperature Args: value (float): value for IDD Field `dbmax50years` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def dbmax50years(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmax50years`'.format(value)) self._dbmax50years = value
797,461
Exports object to its string representation. Args: top (bool): if True appends `internal_name` before values. All non list objects should be exported with value top=True, all list objects, that are embedded in as fields inlist objects should be exported with `top`=False Returns: str: The objects string representation
def export(self, top=True): out = [] if top: out.append(self._internal_name) out.append(self._to_str(self.title_of_design_condition)) out.append(self._to_str(self.unkown_field)) out.append(self._to_str(self.design_stat_heating)) out.append(self._to_str(self.coldestmonth)) out.append(self._to_str(self.db996)) out.append(self._to_str(self.db990)) out.append(self._to_str(self.dp996)) out.append(self._to_str(self.hr_dp996)) out.append(self._to_str(self.db_dp996)) out.append(self._to_str(self.dp990)) out.append(self._to_str(self.hr_dp990)) out.append(self._to_str(self.db_dp990)) out.append(self._to_str(self.ws004c)) out.append(self._to_str(self.db_ws004c)) out.append(self._to_str(self.ws010c)) out.append(self._to_str(self.db_ws010c)) out.append(self._to_str(self.ws_db996)) out.append(self._to_str(self.wd_db996)) out.append(self._to_str(self.design_stat_cooling)) out.append(self._to_str(self.hottestmonth)) out.append(self._to_str(self.dbr)) out.append(self._to_str(self.db004)) out.append(self._to_str(self.wb_db004)) out.append(self._to_str(self.db010)) out.append(self._to_str(self.wb_db010)) out.append(self._to_str(self.db020)) out.append(self._to_str(self.wb_db020)) out.append(self._to_str(self.wb004)) out.append(self._to_str(self.db_wb004)) out.append(self._to_str(self.wb010)) out.append(self._to_str(self.db_wb010)) out.append(self._to_str(self.wb020)) out.append(self._to_str(self.db_wb020)) out.append(self._to_str(self.ws_db004)) out.append(self._to_str(self.wd_db004)) out.append(self._to_str(self.dp004)) out.append(self._to_str(self.hr_dp004)) out.append(self._to_str(self.db_dp004)) out.append(self._to_str(self.dp010)) out.append(self._to_str(self.hr_dp010)) out.append(self._to_str(self.db_dp010)) out.append(self._to_str(self.dp020)) out.append(self._to_str(self.hr_dp020)) out.append(self._to_str(self.db_dp020)) out.append(self._to_str(self.en004)) out.append(self._to_str(self.db_en004)) out.append(self._to_str(self.en010)) out.append(self._to_str(self.db_en010)) out.append(self._to_str(self.en020)) out.append(self._to_str(self.db_en020)) out.append(self._to_str(self.hrs_84_and_db12_8_or_20_6)) out.append(self._to_str(self.design_stat_extremes)) out.append(self._to_str(self.ws010)) out.append(self._to_str(self.ws025)) out.append(self._to_str(self.ws050)) out.append(self._to_str(self.wbmax)) out.append(self._to_str(self.dbmin_mean)) out.append(self._to_str(self.dbmax_mean)) out.append(self._to_str(self.dbmin_stddev)) out.append(self._to_str(self.dbmax_stddev)) out.append(self._to_str(self.dbmin05years)) out.append(self._to_str(self.dbmax05years)) out.append(self._to_str(self.dbmin10years)) out.append(self._to_str(self.dbmax10years)) out.append(self._to_str(self.dbmin20years)) out.append(self._to_str(self.dbmax20years)) out.append(self._to_str(self.dbmin50years)) out.append(self._to_str(self.dbmax50years)) return ",".join(out)
797,462
Read values. Args: vals (list): list of strings representing values
def read(self, vals): i = 0 count = int(vals[i]) i += 1 for _ in range(count): obj = DesignCondition() obj.read(vals[i:i + obj.field_count]) self.add_design_condition(obj) i += obj.field_count
797,463
Read values. Args: vals (list): list of strings representing values
def read(self, vals): i = 0 if len(vals[i]) == 0: self.typical_or_extreme_period_name = None else: self.typical_or_extreme_period_name = vals[i] i += 1 if len(vals[i]) == 0: self.typical_or_extreme_period_type = None else: self.typical_or_extreme_period_type = vals[i] i += 1 if len(vals[i]) == 0: self.period_start_day = None else: self.period_start_day = vals[i] i += 1 if len(vals[i]) == 0: self.period_end_day = None else: self.period_end_day = vals[i] i += 1
797,465
Corresponds to IDD Field `typical_or_extreme_period_name` Args: value (str): value for IDD Field `typical_or_extreme_period_name` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def typical_or_extreme_period_name(self, value=None): if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `typical_or_extreme_period_name`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `typical_or_extreme_period_name`') self._typical_or_extreme_period_name = value
797,466
Corresponds to IDD Field `typical_or_extreme_period_type` Args: value (str): value for IDD Field `typical_or_extreme_period_type` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def typical_or_extreme_period_type(self, value=None): if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `typical_or_extreme_period_type`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `typical_or_extreme_period_type`') self._typical_or_extreme_period_type = value
797,467
Corresponds to IDD Field `period_start_day` Args: value (str): value for IDD Field `period_start_day` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def period_start_day(self, value=None): if value is not None: try: value = str(value) except ValueError: raise ValueError('value {} need to be of type str ' 'for field `period_start_day`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `period_start_day`') self._period_start_day = value
797,468
Corresponds to IDD Field `period_end_day` Args: value (str): value for IDD Field `period_end_day` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def period_end_day(self, value=None): if value is not None: try: value = str(value) except ValueError: raise ValueError('value {} need to be of type str ' 'for field `period_end_day`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `period_end_day`') self._period_end_day = value
797,469
Exports object to its string representation. Args: top (bool): if True appends `internal_name` before values. All non list objects should be exported with value top=True, all list objects, that are embedded in as fields inlist objects should be exported with `top`=False Returns: str: The objects string representation
def export(self, top=True): out = [] if top: out.append(self._internal_name) out.append(self._to_str(self.typical_or_extreme_period_name)) out.append(self._to_str(self.typical_or_extreme_period_type)) out.append(self._to_str(self.period_start_day)) out.append(self._to_str(self.period_end_day)) return ",".join(out)
797,470
Read values. Args: vals (list): list of strings representing values
def read(self, vals): i = 0 count = int(vals[i]) i += 1 for _ in range(count): obj = TypicalOrExtremePeriod() obj.read(vals[i:i + obj.field_count]) self.add_typical_or_extreme_period(obj) i += obj.field_count
797,471
Exports object to its string representation. Args: top (bool): if True appends `internal_name` before values. All non list objects should be exported with value top=True, all list objects, that are embedded in as fields inlist objects should be exported with `top`=False Returns: str: The objects string representation
def export(self, top=True): out = [] if top: out.append(self._internal_name) out.append(str(len(self.typical_or_extreme_periods))) for obj in self.typical_or_extreme_periods: out.append(obj.export(top=False)) return ",".join(out)
797,472
Read values. Args: vals (list): list of strings representing values
def read(self, vals): i = 0 if len(vals[i]) == 0: self.ground_temperature_depth = None else: self.ground_temperature_depth = vals[i] i += 1 if len(vals[i]) == 0: self.depth_soil_conductivity = None else: self.depth_soil_conductivity = vals[i] i += 1 if len(vals[i]) == 0: self.depth_soil_density = None else: self.depth_soil_density = vals[i] i += 1 if len(vals[i]) == 0: self.depth_soil_specific_heat = None else: self.depth_soil_specific_heat = vals[i] i += 1 if len(vals[i]) == 0: self.depth_january_average_ground_temperature = None else: self.depth_january_average_ground_temperature = vals[i] i += 1 if len(vals[i]) == 0: self.depth_february_average_ground_temperature = None else: self.depth_february_average_ground_temperature = vals[i] i += 1 if len(vals[i]) == 0: self.depth_march_average_ground_temperature = None else: self.depth_march_average_ground_temperature = vals[i] i += 1 if len(vals[i]) == 0: self.depth_april_average_ground_temperature = None else: self.depth_april_average_ground_temperature = vals[i] i += 1 if len(vals[i]) == 0: self.depth_may_average_ground_temperature = None else: self.depth_may_average_ground_temperature = vals[i] i += 1 if len(vals[i]) == 0: self.depth_june_average_ground_temperature = None else: self.depth_june_average_ground_temperature = vals[i] i += 1 if len(vals[i]) == 0: self.depth_july_average_ground_temperature = None else: self.depth_july_average_ground_temperature = vals[i] i += 1 if len(vals[i]) == 0: self.depth_august_average_ground_temperature = None else: self.depth_august_average_ground_temperature = vals[i] i += 1 if len(vals[i]) == 0: self.depth_september_average_ground_temperature = None else: self.depth_september_average_ground_temperature = vals[i] i += 1 if len(vals[i]) == 0: self.depth_october_average_ground_temperature = None else: self.depth_october_average_ground_temperature = vals[i] i += 1 if len(vals[i]) == 0: self.depth_november_average_ground_temperature = None else: self.depth_november_average_ground_temperature = vals[i] i += 1 if len(vals[i]) == 0: self.depth_december_average_ground_temperature = None else: self.depth_december_average_ground_temperature = vals[i] i += 1
797,474
Corresponds to IDD Field `ground_temperature_depth` Args: value (float): value for IDD Field `ground_temperature_depth` Unit: m if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def ground_temperature_depth(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `ground_temperature_depth`'.format(value)) self._ground_temperature_depth = value
797,475
Corresponds to IDD Field `depth_soil_conductivity` Args: value (float): value for IDD Field `depth_soil_conductivity` Unit: W/m-K, if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def depth_soil_conductivity(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_soil_conductivity`'.format(value)) self._depth_soil_conductivity = value
797,476
Corresponds to IDD Field `depth_soil_density` Args: value (float): value for IDD Field `depth_soil_density` Unit: kg/m3 if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def depth_soil_density(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_soil_density`'.format(value)) self._depth_soil_density = value
797,477
Corresponds to IDD Field `depth_soil_specific_heat` Args: value (float): value for IDD Field `depth_soil_specific_heat` Unit: J/kg-K, if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def depth_soil_specific_heat(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_soil_specific_heat`'.format(value)) self._depth_soil_specific_heat = value
797,478
Corresponds to IDD Field `depth_january_average_ground_temperature` Args: value (float): value for IDD Field `depth_january_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def depth_january_average_ground_temperature(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_january_average_ground_temperature`'.format(value)) self._depth_january_average_ground_temperature = value
797,479
Corresponds to IDD Field `depth_february_average_ground_temperature` Args: value (float): value for IDD Field `depth_february_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def depth_february_average_ground_temperature(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_february_average_ground_temperature`'.format(value)) self._depth_february_average_ground_temperature = value
797,480
Corresponds to IDD Field `depth_march_average_ground_temperature` Args: value (float): value for IDD Field `depth_march_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def depth_march_average_ground_temperature(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_march_average_ground_temperature`'.format(value)) self._depth_march_average_ground_temperature = value
797,481
Corresponds to IDD Field `depth_april_average_ground_temperature` Args: value (float): value for IDD Field `depth_april_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def depth_april_average_ground_temperature(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_april_average_ground_temperature`'.format(value)) self._depth_april_average_ground_temperature = value
797,482
Corresponds to IDD Field `depth_may_average_ground_temperature` Args: value (float): value for IDD Field `depth_may_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def depth_may_average_ground_temperature(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_may_average_ground_temperature`'.format(value)) self._depth_may_average_ground_temperature = value
797,483
Corresponds to IDD Field `depth_june_average_ground_temperature` Args: value (float): value for IDD Field `depth_june_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def depth_june_average_ground_temperature(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_june_average_ground_temperature`'.format(value)) self._depth_june_average_ground_temperature = value
797,484
Corresponds to IDD Field `depth_july_average_ground_temperature` Args: value (float): value for IDD Field `depth_july_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def depth_july_average_ground_temperature(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_july_average_ground_temperature`'.format(value)) self._depth_july_average_ground_temperature = value
797,485
Corresponds to IDD Field `depth_august_average_ground_temperature` Args: value (float): value for IDD Field `depth_august_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def depth_august_average_ground_temperature(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_august_average_ground_temperature`'.format(value)) self._depth_august_average_ground_temperature = value
797,486
Corresponds to IDD Field `depth_september_average_ground_temperature` Args: value (float): value for IDD Field `depth_september_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def depth_september_average_ground_temperature(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_september_average_ground_temperature`'.format(value)) self._depth_september_average_ground_temperature = value
797,487
Corresponds to IDD Field `depth_october_average_ground_temperature` Args: value (float): value for IDD Field `depth_october_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def depth_october_average_ground_temperature(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_october_average_ground_temperature`'.format(value)) self._depth_october_average_ground_temperature = value
797,488
Corresponds to IDD Field `depth_november_average_ground_temperature` Args: value (float): value for IDD Field `depth_november_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def depth_november_average_ground_temperature(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_november_average_ground_temperature`'.format(value)) self._depth_november_average_ground_temperature = value
797,489
Corresponds to IDD Field `depth_december_average_ground_temperature` Args: value (float): value for IDD Field `depth_december_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def depth_december_average_ground_temperature(self, value=None): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_december_average_ground_temperature`'.format(value)) self._depth_december_average_ground_temperature = value
797,490
Exports object to its string representation. Args: top (bool): if True appends `internal_name` before values. All non list objects should be exported with value top=True, all list objects, that are embedded in as fields inlist objects should be exported with `top`=False Returns: str: The objects string representation
def export(self, top=True): out = [] if top: out.append(self._internal_name) out.append(self._to_str(self.ground_temperature_depth)) out.append(self._to_str(self.depth_soil_conductivity)) out.append(self._to_str(self.depth_soil_density)) out.append(self._to_str(self.depth_soil_specific_heat)) out.append(self._to_str(self.depth_january_average_ground_temperature)) out.append( self._to_str( self.depth_february_average_ground_temperature)) out.append(self._to_str(self.depth_march_average_ground_temperature)) out.append(self._to_str(self.depth_april_average_ground_temperature)) out.append(self._to_str(self.depth_may_average_ground_temperature)) out.append(self._to_str(self.depth_june_average_ground_temperature)) out.append(self._to_str(self.depth_july_average_ground_temperature)) out.append(self._to_str(self.depth_august_average_ground_temperature)) out.append( self._to_str( self.depth_september_average_ground_temperature)) out.append(self._to_str(self.depth_october_average_ground_temperature)) out.append( self._to_str( self.depth_november_average_ground_temperature)) out.append( self._to_str( self.depth_december_average_ground_temperature)) return ",".join(out)
797,491
Read values. Args: vals (list): list of strings representing values
def read(self, vals): i = 0 count = int(vals[i]) i += 1 for _ in range(count): obj = GroundTemperature() obj.read(vals[i:i + obj.field_count]) self.add_ground_temperature(obj) i += obj.field_count
797,492
Read values. Args: vals (list): list of strings representing values
def read(self, vals): i = 0 if len(vals[i]) == 0: self.holiday_name = None else: self.holiday_name = vals[i] i += 1 if len(vals[i]) == 0: self.holiday_day = None else: self.holiday_day = vals[i] i += 1
797,493
Corresponds to IDD Field `holiday_name` Args: value (str): value for IDD Field `holiday_name` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def holiday_name(self, value=None): if value is not None: try: value = str(value) except ValueError: raise ValueError('value {} need to be of type str ' 'for field `holiday_name`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `holiday_name`') self._holiday_name = value
797,494
Corresponds to IDD Field `holiday_day` Args: value (str): value for IDD Field `holiday_day` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def holiday_day(self, value=None): if value is not None: try: value = str(value) except ValueError: raise ValueError('value {} need to be of type str ' 'for field `holiday_day`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `holiday_day`') self._holiday_day = value
797,495
Exports object to its string representation. Args: top (bool): if True appends `internal_name` before values. All non list objects should be exported with value top=True, all list objects, that are embedded in as fields inlist objects should be exported with `top`=False Returns: str: The objects string representation
def export(self, top=True): out = [] if top: out.append(self._internal_name) out.append(self._to_str(self.holiday_name)) out.append(self._to_str(self.holiday_day)) return ",".join(out)
797,496
Read values. Args: vals (list): list of strings representing values
def read(self, vals): i = 0 if len(vals[i]) == 0: self.leapyear_observed = None else: self.leapyear_observed = vals[i] i += 1 if len(vals[i]) == 0: self.daylight_saving_start_day = None else: self.daylight_saving_start_day = vals[i] i += 1 if len(vals[i]) == 0: self.daylight_saving_end_day = None else: self.daylight_saving_end_day = vals[i] i += 1 count = int(vals[i]) i += 1 for _ in range(count): obj = Holiday() obj.read(vals[i:i + obj.field_count]) self.add_holiday(obj) i += obj.field_count
797,498
Corresponds to IDD Field `daylight_saving_start_day` Args: value (str): value for IDD Field `daylight_saving_start_day` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def daylight_saving_start_day(self, value=None): if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `daylight_saving_start_day`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `daylight_saving_start_day`') self._daylight_saving_start_day = value
797,500
Corresponds to IDD Field `daylight_saving_end_day` Args: value (str): value for IDD Field `daylight_saving_end_day` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def daylight_saving_end_day(self, value=None): if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `daylight_saving_end_day`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `daylight_saving_end_day`') self._daylight_saving_end_day = value
797,501
Exports object to its string representation. Args: top (bool): if True appends `internal_name` before values. All non list objects should be exported with value top=True, all list objects, that are embedded in as fields inlist objects should be exported with `top`=False Returns: str: The objects string representation
def export(self, top=True): out = [] if top: out.append(self._internal_name) out.append(self._to_str(self.leapyear_observed)) out.append(self._to_str(self.daylight_saving_start_day)) out.append(self._to_str(self.daylight_saving_end_day)) out.append(str(len(self.holidays))) for obj in self.holidays: out.append(obj.export(top=False)) return ",".join(out)
797,502
Read values. Args: vals (list): list of strings representing values
def read(self, vals): i = 0 if len(vals[i]) == 0: self.comments_1 = None else: self.comments_1 = vals[i] i += 1
797,503
Corresponds to IDD Field `comments_1` Args: value (str): value for IDD Field `comments_1` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def comments_1(self, value=None): if value is not None: try: value = str(value) except ValueError: raise ValueError('value {} need to be of type str ' 'for field `comments_1`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `comments_1`') self._comments_1 = value
797,504
Read values. Args: vals (list): list of strings representing values
def read(self, vals): i = 0 if len(vals[i]) == 0: self.comments_2 = None else: self.comments_2 = vals[i] i += 1
797,505
Corresponds to IDD Field `comments_2` Args: value (str): value for IDD Field `comments_2` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def comments_2(self, value=None): if value is not None: try: value = str(value) except ValueError: raise ValueError('value {} need to be of type str ' 'for field `comments_2`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `comments_2`') self._comments_2 = value
797,506
Exports object to its string representation. Args: top (bool): if True appends `internal_name` before values. All non list objects should be exported with value top=True, all list objects, that are embedded in as fields inlist objects should be exported with `top`=False Returns: str: The objects string representation
def export(self, top=True): out = [] if top: out.append(self._internal_name) out.append(self._to_str(self.comments_2)) return ",".join(out)
797,507
Read values. Args: vals (list): list of strings representing values
def read(self, vals): i = 0 if len(vals[i]) == 0: self.number_of_records_per_hour = None else: self.number_of_records_per_hour = vals[i] i += 1 if len(vals[i]) == 0: self.data_period_name_or_description = None else: self.data_period_name_or_description = vals[i] i += 1 if len(vals[i]) == 0: self.data_period_start_day_of_week = None else: self.data_period_start_day_of_week = vals[i] i += 1 if len(vals[i]) == 0: self.data_period_start_day = None else: self.data_period_start_day = vals[i] i += 1 if len(vals[i]) == 0: self.data_period_end_day = None else: self.data_period_end_day = vals[i] i += 1
797,509
Corresponds to IDD Field `number_of_records_per_hour` Args: value (int): value for IDD Field `number_of_records_per_hour` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def number_of_records_per_hour(self, value=None): if value is not None: try: value = int(value) except ValueError: raise ValueError( 'value {} need to be of type int ' 'for field `number_of_records_per_hour`'.format(value)) self._number_of_records_per_hour = value
797,510
Corresponds to IDD Field `data_period_name_or_description` Args: value (str): value for IDD Field `data_period_name_or_description` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def data_period_name_or_description(self, value=None): if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `data_period_name_or_description`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `data_period_name_or_description`') self._data_period_name_or_description = value
797,511
Corresponds to IDD Field `data_period_start_day` Args: value (str): value for IDD Field `data_period_start_day` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def data_period_start_day(self, value=None): if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `data_period_start_day`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `data_period_start_day`') self._data_period_start_day = value
797,513
Corresponds to IDD Field `data_period_end_day` Args: value (str): value for IDD Field `data_period_end_day` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def data_period_end_day(self, value=None): if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `data_period_end_day`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `data_period_end_day`') self._data_period_end_day = value
797,514
Exports object to its string representation. Args: top (bool): if True appends `internal_name` before values. All non list objects should be exported with value top=True, all list objects, that are embedded in as fields inlist objects should be exported with `top`=False Returns: str: The objects string representation
def export(self, top=True): out = [] if top: out.append(self._internal_name) out.append(self._to_str(self.number_of_records_per_hour)) out.append(self._to_str(self.data_period_name_or_description)) out.append(self._to_str(self.data_period_start_day_of_week)) out.append(self._to_str(self.data_period_start_day)) out.append(self._to_str(self.data_period_end_day)) return ",".join(out)
797,515
Read values. Args: vals (list): list of strings representing values
def read(self, vals): i = 0 count = int(vals[i]) i += 1 for _ in range(count): obj = DataPeriod() obj.read(vals[i:i + obj.field_count]) self.add_data_period(obj) i += obj.field_count
797,516
Read values. Args: vals (list): list of strings representing values
def read(self, vals): i = 0 if len(vals[i]) == 0: self.year = None else: self.year = vals[i] i += 1 if len(vals[i]) == 0: self.month = None else: self.month = vals[i] i += 1 if len(vals[i]) == 0: self.day = None else: self.day = vals[i] i += 1 if len(vals[i]) == 0: self.hour = None else: self.hour = vals[i] i += 1 if len(vals[i]) == 0: self.minute = None else: self.minute = vals[i] i += 1 if len(vals[i]) == 0: self.data_source_and_uncertainty_flags = None else: self.data_source_and_uncertainty_flags = vals[i] i += 1 if len(vals[i]) == 0: self.dry_bulb_temperature = None else: self.dry_bulb_temperature = vals[i] i += 1 if len(vals[i]) == 0: self.dew_point_temperature = None else: self.dew_point_temperature = vals[i] i += 1 if len(vals[i]) == 0: self.relative_humidity = None else: self.relative_humidity = vals[i] i += 1 if len(vals[i]) == 0: self.atmospheric_station_pressure = None else: self.atmospheric_station_pressure = vals[i] i += 1 if len(vals[i]) == 0: self.extraterrestrial_horizontal_radiation = None else: self.extraterrestrial_horizontal_radiation = vals[i] i += 1 if len(vals[i]) == 0: self.extraterrestrial_direct_normal_radiation = None else: self.extraterrestrial_direct_normal_radiation = vals[i] i += 1 if len(vals[i]) == 0: self.horizontal_infrared_radiation_intensity = None else: self.horizontal_infrared_radiation_intensity = vals[i] i += 1 if len(vals[i]) == 0: self.global_horizontal_radiation = None else: self.global_horizontal_radiation = vals[i] i += 1 if len(vals[i]) == 0: self.direct_normal_radiation = None else: self.direct_normal_radiation = vals[i] i += 1 if len(vals[i]) == 0: self.diffuse_horizontal_radiation = None else: self.diffuse_horizontal_radiation = vals[i] i += 1 if len(vals[i]) == 0: self.global_horizontal_illuminance = None else: self.global_horizontal_illuminance = vals[i] i += 1 if len(vals[i]) == 0: self.direct_normal_illuminance = None else: self.direct_normal_illuminance = vals[i] i += 1 if len(vals[i]) == 0: self.diffuse_horizontal_illuminance = None else: self.diffuse_horizontal_illuminance = vals[i] i += 1 if len(vals[i]) == 0: self.zenith_luminance = None else: self.zenith_luminance = vals[i] i += 1 if len(vals[i]) == 0: self.wind_direction = None else: self.wind_direction = vals[i] i += 1 if len(vals[i]) == 0: self.wind_speed = None else: self.wind_speed = vals[i] i += 1 if len(vals[i]) == 0: self.total_sky_cover = None else: self.total_sky_cover = vals[i] i += 1 if len(vals[i]) == 0: self.opaque_sky_cover = None else: self.opaque_sky_cover = vals[i] i += 1 if len(vals[i]) == 0: self.visibility = None else: self.visibility = vals[i] i += 1 if len(vals[i]) == 0: self.ceiling_height = None else: self.ceiling_height = vals[i] i += 1 if len(vals[i]) == 0: self.present_weather_observation = None else: self.present_weather_observation = vals[i] i += 1 if len(vals[i]) == 0: self.present_weather_codes = None else: self.present_weather_codes = vals[i] i += 1 if len(vals[i]) == 0: self.precipitable_water = None else: self.precipitable_water = vals[i] i += 1 if len(vals[i]) == 0: self.aerosol_optical_depth = None else: self.aerosol_optical_depth = vals[i] i += 1 if len(vals[i]) == 0: self.snow_depth = None else: self.snow_depth = vals[i] i += 1 if len(vals[i]) == 0: self.days_since_last_snowfall = None else: self.days_since_last_snowfall = vals[i] i += 1 if len(vals[i]) == 0: self.albedo = None else: self.albedo = vals[i] i += 1 if len(vals[i]) == 0: self.liquid_precipitation_depth = None else: self.liquid_precipitation_depth = vals[i] i += 1 if len(vals[i]) == 0: self.liquid_precipitation_quantity = None else: self.liquid_precipitation_quantity = vals[i] i += 1
797,518
Corresponds to IDD Field `year` Args: value (int): value for IDD Field `year` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def year(self, value=None): if value is not None: try: value = int(value) except ValueError: raise ValueError('value {} need to be of type int ' 'for field `year`'.format(value)) self._year = value
797,519
Corresponds to IDD Field `month` Args: value (int): value for IDD Field `month` value >= 1 value <= 12 if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def month(self, value=None): if value is not None: try: value = int(value) except ValueError: raise ValueError('value {} need to be of type int ' 'for field `month`'.format(value)) if value < 1: raise ValueError('value need to be greater or equal 1 ' 'for field `month`') if value > 12: raise ValueError('value need to be smaller 12 ' 'for field `month`') self._month = value
797,520
Corresponds to IDD Field `day` Args: value (int): value for IDD Field `day` value >= 1 value <= 31 if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def day(self, value=None): if value is not None: try: value = int(value) except ValueError: raise ValueError('value {} need to be of type int ' 'for field `day`'.format(value)) if value < 1: raise ValueError('value need to be greater or equal 1 ' 'for field `day`') if value > 31: raise ValueError('value need to be smaller 31 ' 'for field `day`') self._day = value
797,521
Corresponds to IDD Field `hour` Args: value (int): value for IDD Field `hour` value >= 1 value <= 24 if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def hour(self, value=None): if value is not None: try: value = int(value) except ValueError: raise ValueError('value {} need to be of type int ' 'for field `hour`'.format(value)) if value < 1: raise ValueError('value need to be greater or equal 1 ' 'for field `hour`') if value > 24: raise ValueError('value need to be smaller 24 ' 'for field `hour`') self._hour = value
797,522
Corresponds to IDD Field `minute` Args: value (int): value for IDD Field `minute` value >= 0 value <= 60 if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def minute(self, value=None): if value is not None: try: value = int(value) except ValueError: raise ValueError('value {} need to be of type int ' 'for field `minute`'.format(value)) if value < 0: raise ValueError('value need to be greater or equal 0 ' 'for field `minute`') if value > 60: raise ValueError('value need to be smaller 60 ' 'for field `minute`') self._minute = value
797,523
Corresponds to IDD Field `dry_bulb_temperature` Args: value (float): value for IDD Field `dry_bulb_temperature` Unit: C value > -70.0 value < 70.0 Missing value: 99.9 if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def dry_bulb_temperature(self, value=99.9): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `dry_bulb_temperature`'.format(value)) if value <= -70.0: raise ValueError('value need to be greater -70.0 ' 'for field `dry_bulb_temperature`') if value >= 70.0: raise ValueError('value need to be smaller 70.0 ' 'for field `dry_bulb_temperature`') self._dry_bulb_temperature = value
797,525
Corresponds to IDD Field `dew_point_temperature` Args: value (float): value for IDD Field `dew_point_temperature` Unit: C value > -70.0 value < 70.0 Missing value: 99.9 if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
def dew_point_temperature(self, value=99.9): if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `dew_point_temperature`'.format(value)) if value <= -70.0: raise ValueError('value need to be greater -70.0 ' 'for field `dew_point_temperature`') if value >= 70.0: raise ValueError('value need to be smaller 70.0 ' 'for field `dew_point_temperature`') self._dew_point_temperature = value
797,526