p = (1 - (2.25577 * (10 ** -5) * z)) air_p_pa = 101325 * (p ** 5.25588) # give air pressure value weather_df['AirPr(Pa)'] = air_p_pa # print weather_df.head() # raise SystemExit(0) """ Half hourly Extraterrestrial Radiation Calculation(J/m2/30min) """ sc_default = 1367.0 # Solar constant in W/m^2 is 1367.0. ch_591_lat = 13.260196 ch_591_long = 77.512085 weather_df['Rext (MJ/m2/30min)'] = 0.000 for i in weather_df.index: weather_df['Rext (MJ/m2/30min)'][i.strftime(date_format)] = (cd.extraterrestrial_irrad(local_datetime=i, latitude_deg=ch_591_lat, longitude_deg=ch_591_long)) """ wind speed from km/h to m/s 1 kmph = 0.277778 m/s """ # weather_df['Wind Speed (mps)'] = weather_df['Wind Speed (kmph)'] * 0.277778 """ Radiation unit conversion """ weather_df['Solar Radiation (MJ/m2/30min)'] = (weather_df['Solar Radiation (Wpm2)'] * 1800) / (10 ** 6) """ Average Temperature Calculation """ # weather_df['Average Temp (C)'] = 0.5 * (weather_df['Min Air Temperature (C)'] + weather_df['Max Air Temperature (C)'])
z = 830 p = (1 - (2.25577 * (10 ** -5) * z)) air_p_pa = 101325 * (p ** 5.25588) # give air pressure value weather_df['AirPr(Pa)'] = air_p_pa """ Half hourly Extraterrestrial Radiation Calculation(J/m2/30min) """ sc_default = 1367.0 # Solar constant in W/m^2 is 1367.0. ch_625_lat = 13.364112 ch_625_long = 77.556057 weather_df['Rext (MJ/m2/30min)'] = 0.000 for i in weather_df.index: weather_df['Rext (MJ/m2/30min)'][i.strftime(date_format)] = ( cd.extraterrestrial_irrad(local_datetime=i, latitude_deg=ch_625_lat, longitude_deg=ch_625_long)) """ wind speed from km/h to m/s 1 kmph = 0.277778 m/s """ # weather_df['Wind Speed (mps)'] = weather_df['Wind Speed (kmph)'] * 0.277778 """ Radiation unit conversion """ weather_df['Solar Radiation (MJ/m2/30min)'] = (weather_df['Solar Radiation (Wpm2)'] * 1800) / (10 ** 6) """ Average Temperature Calculation """ # weather_df['Average Temp (C)'] = 0.5 * (weather_df['Min Air Temperature (C)'] + weather_df['Max Air Temperature (C)'])
z = 838 p = (1 - (2.25577 * (10**-5) * z)) air_p_pa = 101325 * (p**5.25588) # give air pressure value weather_df['AirPr(Pa)'] = air_p_pa """ Half hourly Extraterrestrial Radiation Calculation(J/m2/30min) """ sc_default = 1367.0 # Solar constant in W/m^2 is 1367.0. ch_634_lat = 13.365621 ch_634_long = 77.559051 weather_df['Rext (MJ/m2/30min)'] = 0.000 for i in weather_df.index: weather_df.loc[i.strftime('%Y-%m-%d %H:%M:%S'), 'Rext (MJ/m2/30min)'] = (cd.extraterrestrial_irrad( local_datetime=i, latitude_deg=ch_634_lat, longitude_deg=ch_634_long)) """ wind speed from km/h to m/s 1 kmph = 0.277778 m/s """ # weather_df['Wind Speed (mps)'] = weather_df['Wind Speed (kmph)'] * 0.277778 """ Radiation unit conversion """ weather_df['Solar Radiation (MJ/m2/30min)'] = ( weather_df['Solar Radiation (Wpm2)'] * 1800) / (10**6) """ Average Temperature Calculation """ # weather_df['Average Temp (C)'] = 0.5 * (weather_df['Min Air Temperature (C)'] + weather_df['Max Air Temperature (C)'])
""" z = 838 p = (1 - (2.25577 * (10 ** -5) * z)) air_p_pa = 101325 * (p ** 5.25588) # give air pressure value weather_df['AirPr(Pa)'] = air_p_pa """ Half hourly Extraterrestrial Radiation Calculation(J/m2/30min) """ sc_default = 1367.0 # Solar constant in W/m^2 is 1367.0. ch_634_lat = 13.365621 ch_634_long = 77.559051 weather_df['Rext (MJ/m2/30min)'] = 0.000 for i in weather_df.index: weather_df.loc[i.strftime('%Y-%m-%d %H:%M:%S'),'Rext (MJ/m2/30min)'] = (cd.extraterrestrial_irrad(local_datetime=i, latitude_deg=ch_634_lat, longitude_deg=ch_634_long)) """ wind speed from km/h to m/s 1 kmph = 0.277778 m/s """ # weather_df['Wind Speed (mps)'] = weather_df['Wind Speed (kmph)'] * 0.277778 """ Radiation unit conversion """ weather_df['Solar Radiation (MJ/m2/30min)'] = (weather_df['Solar Radiation (Wpm2)'] * 1800) / (10 ** 6) """ Average Temperature Calculation """ # weather_df['Average Temp (C)'] = 0.5 * (weather_df['Min Air Temperature (C)'] + weather_df['Max Air Temperature (C)'])
z = 799 p = (1 - (2.25577 * (10**-5) * z)) air_p_pa = 101325 * (p**5.25588) # give air pressure value weather_df['AirPr(Pa)'] = air_p_pa """ Half hourly Extraterrestrial Radiation Calculation(J/m2/30min) """ sc_default = 1367.0 # Solar constant in W/m^2 is 1367.0. ch_591_lat = 13.260196 ch_591_long = 77.512085 weather_df['Rext (MJ/m2/30min)'] = 0.000 for i in weather_df.index: weather_df['Rext (MJ/m2/30min)'][i.strftime('%Y-%m-%d %H:%M:%S')] = ( cd.extraterrestrial_irrad(local_datetime=i, latitude_deg=ch_591_lat, longitude_deg=ch_591_long)) """ wind speed from km/h to m/s 1 kmph = 0.277778 m/s """ weather_df['Wind Speed (mps)'] = weather_df['Wind Speed (kmph)'] * 0.277778 """ Radiation unit conversion """ weather_df['Solar Radiation (MJ/m2/30min)'] = ( weather_df['Solar Radiation (Wpm2)'] * 1800) / (10**6) """ Average Temperature Calculation """ weather_df['Average Temp (C)'] = 0.5 * (weather_df['Min Air Temperature (C)'] +
p = (1 - (2.25577 * (10 ** -5) * z)) air_p_pa = 101325 * (p ** 5.25588) # give air pressure value weather_df['AirPr(Pa)'] = air_p_pa # print weather_df.head() # raise SystemExit(0) """ Half hourly Extraterrestrial Radiation Calculation(J/m2/30min) """ sc_default = 1367.0 # Solar constant in W/m^2 is 1367.0. ch_591_lat = 13.260196 ch_591_long = 77.512085 weather_df['Rext (MJ/m2/30min)'] = 0.000 for i in weather_df.index: weather_df['Rext (MJ/m2/30min)'][i.strftime(date_format)] = (cd.extraterrestrial_irrad(local_datetime=i, latitude_deg=ch_591_lat, longitude_deg=ch_591_long)) """ wind speed from km/h to m/s 1 kmph = 0.277778 m/s """ # weather_df['Wind Speed (mps)'] = weather_df['Wind Speed (kmph)'] * 0.277778202.142681 """ Radiation unit conversion """ weather_df['Solar Radiation (MJ/m2/30min)'] = (weather_df['Solar Radiation (Wpm2)'] * 1800) / (10 ** 6) """ Average Temperature Calculation """ # weather_df['Average Temp (C)'] = 0.5 * (weather_df['Min Air Temperature (C)'] + weather_df['Max Air Temperature (C)'])
""" z = 838 p = (1 - (2.25577 * (10 ** -5) * z)) air_p_pa = 101325 * (p ** 5.25588) # give air pressure value weather_df['AirPr(Pa)'] = air_p_pa """ Half hourly Extraterrestrial Radiation Calculation(J/m2/30min) """ sc_default = 1367.0 # Solar constant in W/m^2 is 1367.0. ch_634_lat = 13.365621 ch_634_long = 77.559051 weather_df['Rext (MJ/m2/30min)'] = 0.000 for i in weather_df.index: weather_df['Rext (MJ/m2/30min)'][i.strftime('%Y-%m-%d %H:%M:%S')] = (cd.extraterrestrial_irrad(local_datetime=i, latitude_deg=ch_634_lat, longitude_deg=ch_634_long)) """ wind speed from km/h to m/s 1 kmph = 0.277778 m/s """ weather_df['Wind Speed (mps)'] = weather_df['Wind Speed (kmph)'] * 0.277778 """ Radiation unit conversion """ weather_df['Solar Radiation (MJ/m2/30min)'] = (weather_df['Solar Radiation (Wpm2)'] * 1800) / (10 ** 6) """ Average Temperature Calculation """ weather_df['Average Temp (C)'] = 0.5 * (weather_df['Min Air Temperature (C)'] + weather_df['Max Air Temperature (C)']) """