Hi Beni,
There's an issue with the correction to filter out negative values in calc_ftemp_kphio in version 1.1.2 . The max() function finds the global maximum of the inputs, which of course collapses matrix and array inputs down to a scalar (and gets hung up on missing values and NaN).
> tc <- array(c(NA, -9:28, NaN), dim=c(4,5,2))
> calc_ftemp_kphio(tc)
[1] NA
Substituting pmax(ftemp, 0) preserves the shape of ftemp and calculates maxima for each matrix/array entry.
Hi Beni,
There's an issue with the correction to filter out negative values in
calc_ftemp_kphioin version 1.1.2 . Themax()function finds the global maximum of the inputs, which of course collapses matrix and array inputs down to a scalar (and gets hung up on missing values and NaN).Substituting
pmax(ftemp, 0)preserves the shape of ftemp and calculates maxima for each matrix/array entry.