Skip to content

Wildcards in timerange no longer work #2906

@bouweandela

Description

@bouweandela

Describe the bug

If timerange: "*" in the recipe, or a variation thereof, the recipe run fails with a message like:

2025-11-21 15:32:08,634 UTC [244433] ERROR   Unable to replace timerange=* by a value for Dataset:
{'dataset': 'BCC-ESM1',
 'project': 'CMIP6',
 'mip': 'Amon',
 'short_name': 'tas',
 'caption': 'Annual mean {long_name} in Amsterdam according to {dataset}.',
 'ensemble': 'r1i1p1f1',
 'exp': 'historical',
 'grid': 'gn',
 'preprocessor': 'annual_mean_amsterdam',
 'timerange': '*'}
session: 'recipe_python_20251121_153207'
Please check why the files:
/home/bandela/.esgf/CMIP6/CMIP/BCC/BCC-ESM1/historical/r1i1p1f1/Amon/tas/gn/v20181214/tas_Amon_BCC-ESM1_historical_r1i1p1f1_gn_185001-201412.nc with facets: {'project': 'CMIP6', 'activity': 'CMIP', 'institute': 'BCC', 'dataset': 'BCC-ESM1', 'exp': 'historical', 'ensemble': 'r1i1p1f1', 'mip': 'Amon', 'short_name': 'tas', 'grid': 'gn', 'version': 'v20181214'}
do not provide the missing facet values. This will depend on the data source they come from, e.g. can they be extracted from the path for local files, or are they available from ESGF when when searching ESGF for files?

This issue was introduced in #2765

Please attach

Example recipe (adapted from examples/recipe_python.yml):

# ESMValTool
# recipe_python.yml
#
# See https://docs.esmvaltool.org/en/latest/recipes/recipe_examples.html
# for a description of this recipe.
#
# See https://docs.esmvaltool.org/projects/esmvalcore/en/latest/recipe/overview.html
# for a description of the recipe format.
---
documentation:
  description: |
    Example recipe that plots a map and timeseries of temperature.

  title: Recipe that runs an example diagnostic written in Python.

  authors:
    - andela_bouwe
    - righi_mattia

  maintainer:
    - schlund_manuel

  references:
    - acknow_project

  projects:
    - esmval
    - c3s-magic

datasets:
  - dataset: BCC-ESM1
    project: CMIP6
    exp: historical
    ensemble: r1i1p1f1
    grid: gn

preprocessors:
  annual_mean_amsterdam:
    extract_location:
      location: Amsterdam
      scheme: linear
    annual_statistics:
      operator: mean
    multi_model_statistics:
      statistics:
        - mean
      span: overlap
    convert_units:
      units: degrees_C

diagnostics:
  timeseries:
    description: Annual mean temperature in Amsterdam and global mean since 1850.
    themes:
      - phys
    realms:
      - atmos
    variables:
      tas_amsterdam:
        short_name: tas
        mip: Amon
        preprocessor: annual_mean_amsterdam
        timerange: "*"
        caption: Annual mean {long_name} in Amsterdam according to {dataset}.
    scripts:
      script1:
        script: examples/diagnostic.py
        quickplot:
          plot_type: plot

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions