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.
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):
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:
It looks as if the function
p2a_impacts.fetch_data.get_variablesis very close to what we need here. Given a suitable representation of the above parameters (yay!), it computes the desired statistic.