Skip to content

Precompute statistics #6

@rod-glover

Description

@rod-glover

P2A needs values for its Summary tab, which are ensemble statistics for each of several variables (mean temp, precip, snowfall, gdd, hdd, ffd) and a small assortment of sub-annual periods (annual, seasons):

  • Ensemble median
  • 10th percentile
  • 90th percentile

The precise combinations of variable and periods is defined by the P2A classic Summary tab.

The rules engine computes similar (but not exactly the same) statistics for evaluating the rules. We would like to use the machinery in place here to compute the Summary statistics also. This would not be part of the rules engine proper, but a script for using its tools for this purpose.

The parameters for each precomputation will be:

  • variable
  • period (e.g., annual, winter)
  • statistic (percentile)
  • spatial region

It looks as if the function p2a_impacts.fetch_data.get_variables is very close to what we need here. Given a suitable representation of the above parameters (yay!), it computes the desired statistic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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