Skip to content

Commit

Permalink
Use native iris functions in multi-model statistics (#1150)
Browse files Browse the repository at this point in the history
* Branch off lazy mmstats PR

* Remove code related to lazy evaluation

* Turn off tests for lazy data

* Enforce dtype float32 in test cubes

* Fix dtype issue

* Better note on dtype fix

* improve warning about std_dev

* Catch errors in cube alignment with nice error message

* Catch concat errors in compute_eager

* Remove doc statement about lazy evaluation

* Regenerate sample data for failing regression tests
  • Loading branch information
Peter9192 authored Jun 7, 2021
1 parent b713e9f commit 9e27908
Show file tree
Hide file tree
Showing 6 changed files with 491 additions and 322 deletions.
5 changes: 3 additions & 2 deletions esmvalcore/_recipe_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
import yamale

from ._data_finder import get_start_end_year
from .preprocessor import PreprocessingTask, TIME_PREPROCESSORS
from .preprocessor import TIME_PREPROCESSORS, PreprocessingTask
from .preprocessor._multimodel import STATISTIC_MAPPING

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -191,7 +192,7 @@ def extract_shape(settings):

def valid_multimodel_statistic(statistic):
"""Check that `statistic` is a valid argument for multimodel stats."""
valid_names = ["mean", "median", "std", "min", "max"]
valid_names = ['std'] + list(STATISTIC_MAPPING.keys())
valid_patterns = [r"^(p\d{1,2})(\.\d*)?$"]
if not (statistic in valid_names
or re.match(r'|'.join(valid_patterns), statistic)):
Expand Down
Loading

0 comments on commit 9e27908

Please sign in to comment.