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
preprocessors:
  to_degrees_c:
    convert_units:
      units: degrees_C
  annual_mean_bergen:
    extract_location:
      location: Bergen
      scheme: linear
    annual_statistics:
      operator: mean
    multi_model_statistics:
      statistics:
      - mean
      span: overlap
    convert_units:
      units: degrees_C
  annual_mean_global:
    area_statistics:
      operator: mean
    annual_statistics:
      operator: mean
    convert_units:
      units: degrees_C
  default: {}
diagnostics:
  map:
    description: Global map of temperature in January 2000.
    themes:
    - phys
    realms:
    - atmos
    variables:
      tas:
        caption: 'Global map of {long_name} in January 2000 according to {dataset}.

          '
        exp: historical
        mip: Amon
        preprocessor: to_degrees_c
        timerange: 2000/P1M
    scripts:
      script1:
        script: examples/diagnostic.py
        quickplot:
          plot_type: pcolormesh
          cmap: Reds
    additional_datasets:
    - dataset: NorESM2-LM
      grid: gn
      project: CMIP6
      version: v20190815
      ensemble: r1i1p1f1
    - dataset: NorESM1-ME
      project: CMIP5
      version: v20140327
      ensemble: r1i1p1
  timeseries:
    description: Annual mean temperature in Bergen and global mean since 1850.
    themes:
    - phys
    realms:
    - atmos
    variables:
      tas_bergen:
        caption: Annual mean {long_name} in Bergen according to {dataset}.
        exp: historical
        mip: Amon
        preprocessor: annual_mean_bergen
        short_name: tas
        timerange: 1850/2000
        additional_datasets:
        - dataset: NorESM2-LM
          grid: gn
          project: CMIP6
          version: v20190815
          ensemble: r1i1p1f1
        - dataset: NorESM1-ME
          project: CMIP5
          version: v20140327
          ensemble: r1i1p1
      tas_global:
        caption: Annual global mean {long_name} according to {dataset}.
        exp: historical
        mip: Amon
        preprocessor: annual_mean_global
        short_name: tas
        timerange: 1850/2000
        additional_datasets:
        - dataset: NorESM2-LM
          grid: gn
          project: CMIP6
          supplementary_variables:
          - short_name: areacella
            mip: fx
            activity: CMIP
            institute: NCC
          version: v20190815
          ensemble: r1i1p1f1
        - dataset: NorESM1-ME
          project: CMIP5
          supplementary_variables:
          - short_name: areacella
            mip: fx
            ensemble: r0i0p0
            institute: NCC
            product:
            - output1
            - output2
          version: v20140327
          ensemble: r1i1p1
    scripts:
      script1:
        script: ocean/diagnostic_timeseries.py
        quickplot:
          plot_type: plot
datasets: []
