Skip to content

Negative value corrections in calc_ftemp_kphio #6

Description

@davidorme

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions