pycontrails currently converts accumulated radiative fluxes to averages using a simple differencing scheme that shifts the first and last times when radiation data is available forward and backward half a step, respectively. This has caused confusion in the past (e.g., #153) and complicates logic for determining whether a specific forecast can support a specific CoCiP or CoCiP-grid prediction (e.g., https://github.com/contrailcirrus/api-preprocessor/pull/23).
Alternatives
differentiate could be used in place of diff to avoid shifting the time coordinate of radiation data during differencing.
Description
pycontrails
currently converts accumulated radiative fluxes to averages using a simple differencing scheme that shifts the first and last times when radiation data is available forward and backward half a step, respectively. This has caused confusion in the past (e.g., #153) and complicates logic for determining whether a specific forecast can support a specific CoCiP or CoCiP-grid prediction (e.g., https://github.com/contrailcirrus/api-preprocessor/pull/23).Alternatives
differentiate
could be used in place ofdiff
to avoid shifting the time coordinate of radiation data during differencing.