This script fills the gaps in meteorological data with different cases of friction velocity using REddyProc package
Reichstein, M., Falge, E., Baldocchi, D., Papale, D., Aubinet, M., Berbigier, P., ... & Valentini, R. (2005). On the separation of net ecosystem exchange into assimilation and ecosystem respiration: review and improved algorithm. Global change biology, 11(9), 1424-1439. https://doi.org/10.1111/j.1365-2486.2005.001002.x
Wutzler, T., Lucas-Moffat, A., Migliavacca, M., Knauer, J., Sickel, K., Šigut, L., ... & Reichstein, M. (2018). Basic and extensible post-processing of eddy covariance flux data with REddyProc. Biogeosciences, 15(16), 5015-5030. https://doi.org/10.5194/bg-15-5015-2018