Skip to content

Expand rmean_type for other aggregation metrics #1408

@mpaiao

Description

@mpaiao

Task description

I am working on implementing a btran-based metric for drought deciduous phenology (main issue #1385), and I think for it to really work and avoid hydraulic failure mortality, we need to track the minimum daily btran instead of the daily average. I imagine at some point we may want a similar capability for maximum daily value, so I will likely implement it as well.

This is how I plan to implement this in FatesRunningMeanMod:

  1. Edit rmean_type class to add four more variables (c_minimum, l_minimum, c_maximum, l_maximum.
  2. Add functions GetMin and GetMax to retrieve the minimum and maximum.
  3. Edit functions InitRMean, UpdateRMean, FuseRMean and CopyFromDonor so they handle the new variables too.
  4. Existing flag moving_ema_window will be applied to the mean only, not the minima and maxima, which will always use the fixed windows.

With this, it may make sense to rename the module, structure names and functions. I am thinking of FatesRunningSummaryMod, rsummary_def_type and rsummary_type, InitRSummary, etc. but I am open to other suggestions (including not changing it at all). Also, I suppose I should make this a separate pull request before bringing in the btran-based phenology, what do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    ❕Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions