def test_wind_height_adjust_2m(uz=2.5, zw=2.0, u2=2.5): assert float(calcs._wind_height_adjust(uz, zw)) == pytest.approx(u2, abs=0.001)
save(fig) print("\nSystem: Composite bokeh graph has been generated.") ######################### # Generate output file # Create any final variables, then create panda dataframes to save all the data # Includes the following sheets: # Corrected Data : Actual corrected values # Delta : Magnitude of difference between original data and corrected data # Filled Data : Tracks which data points have been filled by script generated values instead of being provided # Data that is provided and subsequently corrected by the script do not count as filled values. print("\nSystem: Saving corrected data to .xslx file.") # Create any individually-requested output data ws_2m = _wind_height_adjust(uz=data_ws, zw=ws_anemometer_height) # Create corrected-original delta numpy arrays diff_tavg = np.array(data_tavg - original_df.tavg) diff_tmax = np.array(data_tmax - original_df.tmax) diff_tmin = np.array(data_tmin - original_df.tmin) diff_tdew = np.array(data_tdew - original_df.tdew) diff_ea = np.array(data_ea - original_df.ea) diff_rhavg = np.array(data_rhavg - original_df.rhavg) diff_rhmax = np.array(data_rhmax - original_df.rhmax) diff_rhmin = np.array(data_rhmin - original_df.rhmin) diff_rs = np.array(data_rs - original_df.rs) diff_rs_tr = np.array(opt_rs_tr - orig_rs_tr) diff_rso = np.array(rso - original_df.rso) diff_ws = np.array(data_ws - original_df.ws) diff_precip = np.array(data_precip - original_df.precip)
def test_wind_height_adjust(uz, zw, u2): assert float(calcs._wind_height_adjust(uz, zw)) == pytest.approx(u2)