Close the energy balance of flux measurements. Takes a netcdf input file as generated by dfk_process_lsm() which calls fdk_correct_fluxes()

fdk_balance_energy(qle, qle_qc, qh, qh_qc, rnet, qg, qg_qc, time, tstepsize)

Arguments

qle

latent heat

qle_qc

latent heat quality control

qh

sensible heat

qh_qc

sensible heat quality control

rnet

respiration rate

qg

not sure check

qg_qc

quality control parameter

time

a date/time field (vector)

tstepsize

time step length

Value

sensible and latent heat values with the energy balance closed

Details

This is an almost verbatim copy of the routine as used to generate the PLUMBER-2 data. For transparency reasons this part was split out into a function to provide easier debugging and processing options.