diff --git a/pvdeg/design.py b/pvdeg/design.py index af462848..754d2c4e 100644 --- a/pvdeg/design.py +++ b/pvdeg/design.py @@ -48,7 +48,7 @@ def edge_seal_width(weather_df, meta, k=None, years=25, from_dew_point=False): Parameters ---------- weather_df : pd.DataFrame - must be datetime indexed and contain at least temp_air, Dew Point + must be datetime indexed and contain at least temp_air, temp_dew meta : dict location meta-data (from weather file) k: float @@ -58,7 +58,7 @@ def edge_seal_width(weather_df, meta, k=None, years=25, from_dew_point=False): years : integer, default = 25 Integer number of years under water ingress from_dew_point : boolean, optional - If true, will compute the edge seal width from Dew Point instead of dry bulb air temp + If true, will compute the edge seal width from temp_dew instead of dry bulb air temp Returns ---------- diff --git a/pvdeg/humidity.py b/pvdeg/humidity.py index 44d3dc21..2372f649 100644 --- a/pvdeg/humidity.py +++ b/pvdeg/humidity.py @@ -30,7 +30,7 @@ def _ambient(weather_df): ----------- weather_df : pd.DataFrame Datetime-indexed weather dataframe which contains (at minimum) Ambient temperature - ('temp_air') and dew point ('Dew Point') in units [C] + ('temp_air') and dew point ('temp_dew') in units [C] Returns: -------- @@ -39,7 +39,8 @@ def _ambient(weather_df): ambient relative humidity [%] """ temp_air = weather_df["temp_air"] - dew_point = weather_df["Dew Point"] + # "Dew Point" fallback handles key-name bug in pvlib < v0.10.3. + dew_point = weather_df.get("temp_dew", weather_df.get("Dew Point")) num = np.exp(17.625 * dew_point / (243.04 + dew_point)) den = np.exp(17.625 * temp_air / (243.04 + temp_air))