buds-lab / psychrometric-chart-makeover

Adding more dimension to the psychrometric chart
MIT License
8 stars 1 forks source link

Fix following runtime warnings #5

Open pjayathissa opened 5 years ago

pjayathissa commented 5 years ago
calculate_chart.py:134: RuntimeWarning: divide by zero encountered in log
  dew_point_compare_forced[i][k]=243.04*(np.log(RH_psy[k])+((17.625*temp_air[i])/(243.04+temp_air[i])))/(17.625-np.log(RH_psy[k])-((17.625*temp_air[i])/(243.04+temp_air[i])))-T_MRT_forced_psy[i][k]

calculate_chart.py:134: RuntimeWarning: invalid value encountered in double_scalars
  dew_point_compare_forced[i][k]=243.04*(np.log(RH_psy[k])+((17.625*temp_air[i])/(243.04+temp_air[i])))/(17.625-np.log(RH_psy[k])-((17.625*temp_air[i])/(243.04+temp_air[i])))-T_MRT_forced_psy[i][k]

calculate_chart.py:155: RuntimeWarning: invalid value encountered in power
  v_forced_v[i][k] = np.power(((MR-Q_rad_forced_v[i][k])/(10.1*(LR*w*(P_sat_skin_psy[i]-P_sat_air_psy[i][k])+(temp_skin[i]-temp_air[i])))),(1/0.61))
eteitelb commented 5 years ago

i think this is fixed now with the numpy arrays

pjayathissa commented 5 years ago

@eteitelb Just one last runtime warning

Warning: The following kwargs were not used by contour: 'interpolation', 'fontsize', 'dpi'
  CS3=plt.contourf(Y, psy_sat, T_MRT_psy, cmap = 'jet', levels=levels_contour,interpolation='sinc', fontsize = 20, dpi = 1200, alpha = 0.6)