Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
4e4c1db
First attempt, not clean
sloosvel Jan 30, 2020
a27abeb
Compute ensemble stats, pending to test exclude
sloosvel Jan 31, 2020
b405759
Deal with excluded datasets
sloosvel Feb 3, 2020
e835ebf
Compute stats of ensemble stats, pending to clean
sloosvel Feb 4, 2020
e4163d0
Move ensemble means to separate functions
sloosvel Feb 5, 2020
de0ee76
Merge remote-tracking branch 'origin/master' into dev_multimodel_ense…
sloosvel Jun 10, 2020
bafe50c
Update after merging
sloosvel Jun 10, 2020
8e914e7
Fix calendar units to 'days since 1850-01-01' on a standard calendar
Peter9192 Jun 23, 2020
d6b9947
More thorough check on source time frequency; align behaviour with re…
Peter9192 Jun 23, 2020
12f9aa4
Simplify _get_overlap
Peter9192 Jun 23, 2020
bf82085
Align behaviour for union (full) and intersection (overlap) of time a…
Peter9192 Jun 23, 2020
3bd1e82
Add function to make all cubes use the same calendar.
Peter9192 Jun 23, 2020
7841a5f
Remove _datetime_to_int_days, as we can just use the time points
Peter9192 Jun 23, 2020
f95aa7c
Simplify and rename _slice_cube
Peter9192 Jun 23, 2020
db47522
Align _assemble_overlap_data more with _assemble_full_data
Peter9192 Jun 23, 2020
127c69b
Align _assemble_full_data more with _assemble_overlap_data
Peter9192 Jun 23, 2020
f873ea5
Futher align assemble full and overlap data
Peter9192 Jun 24, 2020
3b7b55b
Merge assemble full and overlap data.
Peter9192 Jun 24, 2020
168a701
Further simplify
Peter9192 Jun 24, 2020
629a9d6
Remove stuff about bounds and aux coords as it is not used anyway
Peter9192 Jun 24, 2020
f538fa8
Remove stuff about bounds and aux coords as it is not used anyway
Peter9192 Jun 24, 2020
b0cc1ae
Clean up tests and add tests for new functions
Peter9192 Jun 24, 2020
aef2578
Valeriu's suggestions
Peter9192 Jun 29, 2020
24294df
fix tests
Peter9192 Jun 29, 2020
d3a4ddd
Merge remote-tracking branch 'origin/master' into mmstats_simplify_time
Peter9192 Jul 2, 2020
35210a5
Realize data before making time slices
Peter9192 Jul 2, 2020
d2fddeb
Avoid codacy 'pointless-statement' message
Peter9192 Jul 2, 2020
d028b28
Merge remote-tracking branch 'origin/master' into mmstats_simplify_time
Peter9192 Aug 4, 2020
cc51e15
Address Bouwe's comments
Peter9192 Aug 4, 2020
7c182a2
Update esmvalcore/preprocessor/_multimodel.py
Peter9192 Aug 5, 2020
a663ea6
Don't change the calendar if not necessary
Peter9192 Aug 7, 2020
2e363c9
Merge branch 'mmstats_simplify_time' of github.com:ESMValGroup/ESMVal…
Peter9192 Aug 7, 2020
c8b5f4b
Use template cube's calendar and don't slice by time
Peter9192 Aug 7, 2020
fcb9955
Use num2date rather than cells() method
Peter9192 Aug 10, 2020
46337f7
Apply suggestions from code review
Peter9192 Aug 10, 2020
4e78224
Merge branch 'mmstats_simplify_time' of github.com:ESMValGroup/ESMVal…
Peter9192 Aug 10, 2020
a77b1eb
Refactor provenance initialization code
stefsmeets Sep 1, 2020
816fbc2
Refactor code to update ensemble settings
stefsmeets Sep 1, 2020
3f2e126
Avoid double dictionary lookup
stefsmeets Sep 1, 2020
9686643
Clean ensemble statistics code
stefsmeets Sep 1, 2020
798d7dc
Merge branch 'master' into dev_multimodel_ensemble
stefsmeets Sep 1, 2020
c5c71cd
Merge remote-tracking branch 'origin/mmstats_simplify_time' into dev_…
Peter9192 Sep 1, 2020
8b7f076
Clarify error
stefsmeets Sep 1, 2020
851e0ec
Fix PickleError (lambdas cannot be pickled)
stefsmeets Sep 1, 2020
1bffc76
Fix crash when exp is a list
stefsmeets Sep 1, 2020
8d319b0
Rename variable
stefsmeets Sep 1, 2020
98c2592
Add missing parentheses
stefsmeets Sep 1, 2020
5be9d9b
Don't return the union after a multimodel function
Peter9192 Sep 3, 2020
2912372
remove breakpoint
Peter9192 Sep 3, 2020
0a587fc
Return all statistics products
Peter9192 Sep 3, 2020
d3b1b7f
Clarify code
stefsmeets Sep 3, 2020
a3a5f3b
Identify problem with deepcopy
Peter9192 Sep 3, 2020
e27954e
Remove debug statements
Peter9192 Sep 3, 2020
9824f6c
Merge branch 'dev_multimodel_ensemble' of github.com:ESMValGroup/ESMV…
Peter9192 Sep 3, 2020
dcf97f8
Refactor multi_model_statistics
Peter9192 Sep 4, 2020
e1005bd
Refactor ensemble_statistics as a 'grouped multi-model_statistics'
Peter9192 Sep 4, 2020
af90767
First attempt at dedicated ensemble means function using iris instead…
Peter9192 Sep 4, 2020
8244c85
Lookup of supported operators in iris.analysis
Peter9192 Sep 4, 2020
d78c34e
Refactor (grouped) multimodel statistics flow
Peter9192 Sep 4, 2020
cc2ebe0
Implement group function on PreprocessorFile
stefsmeets Sep 4, 2020
8a2b628
Fix and clean up refactored _multimodel.py
Peter9192 Sep 4, 2020
3187700
Merge branch 'dev_multimodel_ensemble' of github.com:ESMValGroup/ESMV…
Peter9192 Sep 4, 2020
cc5f61c
Move group keywords to ensemble_stats function
Peter9192 Sep 4, 2020
4b31147
Tweak group method
stefsmeets Sep 4, 2020
6523e05
Rename _update_statistic_settings -> _update_multi_model_settings
stefsmeets Sep 4, 2020
21989a4
Refactor product grouping (groupby func)
stefsmeets Sep 4, 2020
73d5afd
Homogenize multi_model/ensemble recipe functions
stefsmeets Sep 4, 2020
42a52b1
Make multimodel-statistics accept a groupby keyword as well
Peter9192 Sep 4, 2020
62689bf
Refactor multi model/ensemble settings
stefsmeets Sep 4, 2020
aee20ea
Return default value for None argument
stefsmeets Sep 4, 2020
559fcf3
Remove redundant function
stefsmeets Sep 4, 2020
5689953
Fix typo
stefsmeets Sep 4, 2020
9d20217
Use groupby keyword from product settings for ensemble_statistics
Peter9192 Sep 4, 2020
74c55f3
Add docstrings
stefsmeets Sep 4, 2020
612f83f
Merge branch 'dev_multimodel_ensemble' of https://www.github.com/ESMV…
stefsmeets Sep 4, 2020
e0f3c5a
idea for bypassing update order issue
Peter9192 Sep 7, 2020
5d7585c
Fix duplicate filenames when multi-model/ensemble statistics are both…
stefsmeets Sep 7, 2020
a643241
Remove unused argument and tweak codestyle
stefsmeets Sep 7, 2020
339ec1e
Change order, improve ancestry updating, better filenaming
Peter9192 Sep 8, 2020
6d27aff
Merge branch 'dev_multimodel_ensemble' of https://www.github.com/ESMV…
stefsmeets Sep 8, 2020
85d0bb8
Fix output filenames and pretty print PreprocessorFile
Peter9192 Sep 8, 2020
d8ff56a
two typos
Peter9192 Sep 8, 2020
09929cd
Make groupby argument work for multi-model statistics preprocessor
Peter9192 Sep 8, 2020
1e8762a
Some code formatting
Peter9192 Sep 8, 2020
9018c1f
Merge remote-tracking branch 'origin/master' into dev_multimodel_ense…
Peter9192 Sep 8, 2020
f4728d1
Make clearer string representation for TrackedFile/PreprocessorFile
stefsmeets Sep 8, 2020
1c3d52c
Fix crash when `exp` is a list
stefsmeets Sep 8, 2020
7ac0827
Make multimodel groupby work for difficult combinations of groups; ad…
Peter9192 Sep 8, 2020
46a99d4
Merge branch 'dev_multimodel_ensemble' of github.com:ESMValGroup/ESMV…
Peter9192 Sep 8, 2020
1541dd3
tick off todo's
Peter9192 Sep 8, 2020
1b081cc
fix bug for monthly data in unify time
Peter9192 Sep 8, 2020
c35c530
Remove invalid pytest command
stefsmeets Sep 8, 2020
7d9d855
Pass pytest->test_simple_recipe
stefsmeets Sep 8, 2020
2f2e354
Pass pytest->test_custom_preproc_order
stefsmeets Sep 8, 2020
3b2fe4c
Merge branch 'dev_multimodel_ensemble' of https://www.github.com/ESMV…
stefsmeets Sep 8, 2020
068a628
Fix pytest multimodel errors
stefsmeets Sep 9, 2020
276112a
Remove flatten, it is no longer necessary since the nested loop has b…
Peter9192 Sep 9, 2020
d262f0b
Add documentation to _multimodel.py; expose multicube functions to pu…
Peter9192 Sep 9, 2020
3d531b9
Add to RTD, improve docstrings, add multicube stats to public API
Peter9192 Sep 10, 2020
3a72d58
Raise Exception instead of logging it
stefsmeets Sep 11, 2020
d8f4675
Avoid cubes being updated in-place
stefsmeets Sep 11, 2020
92f8c7a
Add tests for multi-model statistics
stefsmeets Sep 11, 2020
14c1baa
Add integration test for ensemble statistics
stefsmeets Sep 11, 2020
40fabbb
Add integration test for multi model statistics
stefsmeets Sep 11, 2020
e2db416
Refactor multi_model/ensemble statistics
stefsmeets Sep 11, 2020
9a6bfc2
Fix bugs in tests
stefsmeets Sep 11, 2020
14531d7
Refactor output consistency check
stefsmeets Sep 11, 2020
c8a208b
Fix typo
stefsmeets Sep 11, 2020
72f5cc9
Add multi model integration test using groupby
stefsmeets Sep 11, 2020
3d1b7b4
Remove redundant function
stefsmeets Sep 11, 2020
f7e7b7b
Refactor groupby function
stefsmeets Sep 11, 2020
bbb2e9b
Merge branch 'master' into dev_multimodel_ensemble
stefsmeets Sep 14, 2020
8e21e06
Rename function
stefsmeets Sep 14, 2020
96988c0
Clean function
stefsmeets Sep 14, 2020
8ea0bce
Fix Codacy issues
stefsmeets Sep 14, 2020
d16836d
Fix Codacy issues
stefsmeets Sep 14, 2020
22286d4
Fix Codacy issues
stefsmeets Sep 14, 2020
3be28ed
Fix problems with tests
stefsmeets Sep 14, 2020
becb7b7
Add `input_products` as valid itype for test
stefsmeets Sep 14, 2020
d226a21
Add preprocessor argument checks for multimode/ensemble statistics
stefsmeets Sep 14, 2020
aad34bf
Merge branch 'master' into dev_multimodel_ensemble
stefsmeets Sep 14, 2020
8815943
Code formatting
stefsmeets Sep 14, 2020
d04e65d
Refactor grouping function
stefsmeets Sep 15, 2020
87f5028
Refactor _match_products
stefsmeets Sep 15, 2020
b6fe30b
Update function names
stefsmeets Sep 15, 2020
0d447cf
Tweak error output and make error variable 3 letters
stefsmeets Sep 15, 2020
d1125a4
Return empty dict in case products is None or empty
stefsmeets Sep 17, 2020
6400270
add time bounds to output cube
Peter9192 Sep 30, 2020
f78c4ff
Merge remote-tracking branch 'origin/master' into dev_multimodel_ense…
Peter9192 Jan 14, 2021
2d37a01
Formatting
Peter9192 Jan 14, 2021
d7fb1d5
Merge remote-tracking branch 'origin/main' into dev_multimodel_ensemble
sloosvel Jan 19, 2022
95ab23b
Add number of input cubes as cell method comment
sloosvel Jan 19, 2022
43d37c4
Fix test
sloosvel Jan 19, 2022
e44dd55
Include sub_exp in ensemble grouping
sloosvel Jan 19, 2022
238ccac
Move ensemble stats to end of chain
sloosvel Jan 20, 2022
75bf641
Allow to exclude datasets
sloosvel Jan 20, 2022
2a4272c
Fix style issues
sloosvel Jan 20, 2022
59aa0fa
Add check for keep_input_datasets
sloosvel Jan 20, 2022
0b670b8
Fix test
sloosvel Jan 20, 2022
a558e6d
Fix more tests
sloosvel Jan 20, 2022
4312d3d
Fix flake
sloosvel Jan 20, 2022
b93686c
Remove unused import
sloosvel Jan 21, 2022
765a154
Improve test coverage in recipe checks
sloosvel Jan 21, 2022
121b5bd
Improve coverage in multimodel
sloosvel Jan 21, 2022
e50e6a2
Remove space
sloosvel Jan 21, 2022
2a1dd49
Generalise check
sloosvel Jan 23, 2022
718e76b
Add more tests in recipe
sloosvel Jan 23, 2022
a819525
Improve test coverage of PreprocessorFile
sloosvel Jan 23, 2022
509b116
Improve test coverage of PreprocessorTask
sloosvel Jan 23, 2022
915a3a4
Merge remote-tracking branch 'origin/main' into dev_multimodel_ensemble
sloosvel Jan 24, 2022
78b4187
Merge remote-tracking branch 'origin/main' into dev_multimodel_ensemble
sloosvel Jan 24, 2022
6eb8534
Fix doc
sloosvel Jan 24, 2022
24e467a
Change argument name
sloosvel Jan 26, 2022
0567d25
Change name of variable
sloosvel Jan 26, 2022
a1c83f7
Update esmvalcore/preprocessor/_multimodel.py
sloosvel Jan 28, 2022
d09412b
Update esmvalcore/preprocessor/_multimodel.py
sloosvel Jan 28, 2022
2d62b2a
Improve docstring
sloosvel Jan 28, 2022
6e52fc7
Apply suggestions from code review
sloosvel Jan 28, 2022
3aaec4e
Apply suggestions from code review
sloosvel Jan 28, 2022
3539019
Change function name
sloosvel Jan 28, 2022
9eaeea4
Merge branch 'dev_multimodel_ensemble' of https://github.com/ESMValGr…
sloosvel Jan 28, 2022
7d39a12
Change name of the function
sloosvel Jan 28, 2022
fa11745
Add test for exclude
sloosvel Jan 28, 2022
6471d00
Add docstrings to ensemble stats
sloosvel Feb 1, 2022
f17faca
Add documentation about groupby tag
sloosvel Feb 1, 2022
d1de891
Update doc/recipe/preprocessor.rst
sloosvel Feb 3, 2022
42d7050
Improve docstrings
sloosvel Feb 3, 2022
ffe9e44
Merge branch 'dev_multimodel_ensemble' of https://github.com/ESMValGr…
sloosvel Feb 3, 2022
f29c3d9
Merge branch 'main' into dev_multimodel_ensemble
valeriupredoi Feb 3, 2022
3f11033
Apply suggestions from code review
sloosvel Feb 4, 2022
effa0ad
Remove keep_input..., add span in ensemble stats
sloosvel Feb 4, 2022
4ed2780
Improve doc
sloosvel Feb 4, 2022
901a47d
Improve doc
sloosvel Feb 4, 2022
89d0ee3
Apply suggestions from code review
sloosvel Feb 4, 2022
149c671
Update doc/recipe/preprocessor.rst
sloosvel Feb 4, 2022
a389240
Reorder doc
sloosvel Feb 4, 2022
5ec1a3e
Merge branch 'dev_multimodel_ensemble' of https://github.com/ESMValGr…
sloosvel Feb 4, 2022
6419137
Fix identations
sloosvel Feb 4, 2022
b78a84d
Missed one space
sloosvel Feb 4, 2022
d43c473
...
sloosvel Feb 4, 2022
448dc12
Merge remote-tracking branch 'origin/main' into dev_multimodel_ensemble
sloosvel Feb 4, 2022
2665374
Adapted docstring of multi_model_statistic functions
schlunma Feb 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 118 additions & 12 deletions doc/recipe/preprocessor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ roughly following the default order in which preprocessor functions are applied:
* :ref:`Land/Sea/Ice masking`
* :ref:`Horizontal regridding`
* :ref:`Masking of missing values`
* :ref:`Ensemble statistics`
* :ref:`Multi-model statistics`
* :ref:`Time operations`
* :ref:`Area operations`
Expand Down Expand Up @@ -864,6 +865,65 @@ See also :func:`esmvalcore.preprocessor.regrid`
for resolutions of ``< 0.5`` degrees the regridding becomes very slow and
will use a lot of memory.

.. _ensemble statistics:

Ensemble statistics
===================
For certain use cases it may be desirable to compute ensemble statistics. For
example to prevent models with many ensemble members getting excessive weight in
the multi-model statistics functions.

Theoretically, ensemble statistics are a special case (grouped) multi-model
statistics. This grouping is performed taking into account the dataset tags
`project`, `dataset`, `experiment`, and (if present) `sub_experiment`.
However, they should typically be computed earlier in the workflow.
Moreover, because multiple ensemble members of the same model are typically more
consistent/homogeneous than datasets from different models, the implementation
is more straigtforward and can benefit from lazy evaluation and more efficient
computation.

The preprocessor takes a list of statistics as input:

.. code-block:: yaml

preprocessors:
example_preprocessor:
ensemble_statistics:
statistics: [mean, median]

This preprocessor function exposes the iris analysis package, and works with all
(capitalized) statistics from the :mod:`iris.analysis` package
that can be executed without additional arguments (e.g. percentiles are not
supported because it requires additional keywords: percentile.).

Note that ``ensemble_statistics`` will not return the single model and ensemble files,
only the requested ensemble statistics results.

In case of wanting to save both individual ensemble members as well as the statistic results,
the preprocessor chains could be defined as:

.. code-block:: yaml

preprocessors:
everything_else: &everything_else
area_statistics: ...
regrid_time: ...
multimodel:
<<: *everything_else
ensemble_statistics:

variables:
tas_datasets:
short_name: tas
preprocessor: everything_else
...
tas_multimodel:
short_name: tas
preprocessor: multimodel
...


See also :func:`esmvalcore.preprocessor.ensemble_statistics`.

.. _multi-model statistics:

Expand Down Expand Up @@ -893,32 +953,78 @@ across overlapping times only (``span: overlap``) or across the full time span
of the combined models (``span: full``). The preprocessor sets a common time
coordinate on all datasets. As the number of days in a year may vary between
calendars, (sub-)daily data with different calendars are not supported.
The preprocessor saves both the input single model files as well as the multi-model
results. In case you do not want to keep the single model files, set the
parameter ``keep_input_datasets`` to ``false`` (default value is ``true``).

.. code-block:: yaml

preprocessors:
multi_model_save_input:
multi_model_statistics:
span: overlap
statistics: [mean, median]
exclude: [NCEP]
multi_model_without_saving_input:
multi_model_statistics:
span: overlap
statistics: [mean, median]
exclude: [NCEP]
keep_input_datasets: false

Input datasets may have different time coordinates. The multi-model statistics
preprocessor sets a common time coordinate on all datasets. As the number of
days in a year may vary between calendars, (sub-)daily data are not supported.

Multi-model statistics also supports a ``groupby`` argument. You can group by
any dataset key (``project``, ``experiment``, etc.) or a combination of keys in a list. You can
also add an arbitrary tag to a dataset definition and then group by that tag. When
using this preprocessor in conjunction with `ensemble statistics`_ preprocessor, you
can group by ``ensemble_statistics`` as well. For example:

.. code-block:: yaml

datasets:
- {dataset: CanESM2, exp: historical, ensemble: "r(1:2)i1p1"}
- {dataset: CCSM4, exp: historical, ensemble: "r(1:2)i1p1"}

preprocessors:
multi_model_preprocessor:
example_preprocessor:
ensemble_statistics:
statistics: [median, mean]
multi_model_statistics:
span: overlap
statistics: [mean, median]
statistics: [min, max]
groupby: [ensemble_statistics]
exclude: [NCEP]

see also :func:`esmvalcore.preprocessor.multi_model_statistics`.
This will first compute ensemble mean and median, and then compute the multi-model
min and max separately for the ensemble means and medians. Note that this combination
will not save the individual ensemble members, only the ensemble and multimodel statistics results.

When calling the module inside diagnostic scripts, the input must be given
as a list of cubes. The output will be saved in a dictionary where each
entry contains the resulting cube with the requested statistic operations.
When grouping by a tag not defined in all datasets, the datasets missing the tag will
be grouped together. In the example below, datasets `UKESM` and `ERA5` would belong to the same
group, while the other datasets would belong to either ``group1`` or ``group2``

.. code-block::
.. code-block:: yaml

datasets:
- {dataset: CanESM2, exp: historical, ensemble: "r(1:2)i1p1", tag: 'group1'}
- {dataset: CanESM5, exp: historical, ensemble: "r(1:2)i1p1", tag: 'group2'}
- {dataset: CCSM4, exp: historical, ensemble: "r(1:2)i1p1", tag: 'group2'}
- {dataset: UKESM, exp: historical, ensemble: "r(1:2)i1p1"}
- {dataset: ERA5}

preprocessors:
example_preprocessor:
multi_model_statistics:
span: overlap
statistics: [min, max]
groupby: [tag]

from esmvalcore.preprocessor import multi_model_statistics
statistics = multi_model_statistics([cube1,...,cubeN], 'overlap', ['mean', 'median'])
mean_cube = statistics['mean']
median_cube = statistics['median']
Note that those datasets can be excluded if listed in the ``exclude`` option.

See also :func:`esmvalcore.preprocessor.multi_model_statistics`.

.. note::

Expand Down Expand Up @@ -1481,7 +1587,7 @@ Parameters:
be an array of floating point values.
* ``scheme``: interpolation scheme: either ``'linear'`` or
``'nearest'``. There is no default.

See also :func:`esmvalcore.preprocessor.extract_point`.


Expand Down
37 changes: 26 additions & 11 deletions esmvalcore/_data_finder.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Data finder module for the ESMValTool."""
import copy
import glob
import logging
import os
Expand Down Expand Up @@ -484,17 +483,33 @@ def get_output_file(variable, preproc_dir):
return outfile


def get_statistic_output_file(variable, preproc_dir):
"""Get multi model statistic filename depending on settings."""
updated_var = copy.deepcopy(variable)
updated_var['timerange'] = updated_var['timerange'].replace('/', '-')
template = os.path.join(
def get_multiproduct_filename(attributes, preproc_dir):
"""Get ensemble/multi-model filename depending on settings."""
relevant_keys = [
'project', 'dataset', 'exp', 'ensemble_statistics',
'multi_model_statistics', 'mip', 'short_name'
]

filename_segments = []
for key in relevant_keys:
if key in attributes:
attribute = attributes[key]
if isinstance(attribute, (list, tuple)):
attribute = '-'.join(attribute)
filename_segments.extend(attribute.split('_'))

# Remove duplicate segments:
filename_segments = list(dict.fromkeys(filename_segments))

# Add period and extension
filename_segments.append(
f"{attributes['timerange'].replace('/', '-')}.nc")

outfile = os.path.join(
preproc_dir,
'{diagnostic}',
'{variable_group}',
'{dataset}_{mip}_{short_name}_{timerange}.nc',
attributes['diagnostic'],
attributes['variable_group'],
'_'.join(filename_segments),
)

outfile = template.format(**updated_var)

return outfile
7 changes: 3 additions & 4 deletions esmvalcore/_provenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def get_esmvaltool_provenance():
namespace = 'software'
create_namespace(provenance, namespace)
attributes = {} # TODO: add dependencies with versions here
activity = provenance.activity(
namespace + ':esmvaltool==' + __version__, other_attributes=attributes)
activity = provenance.activity(namespace + ':esmvaltool==' + __version__,
other_attributes=attributes)

return activity

Expand Down Expand Up @@ -71,8 +71,7 @@ def get_recipe_provenance(documentation, filename):
entity = provenance.entity(
'recipe:{}'.format(filename), {
'attribute:description': documentation.get('description', ''),
'attribute:references': str(
documentation.get('references', [])),
'attribute:references': str(documentation.get('references', [])),
})

attribute_to_authors(entity, documentation.get('authors', []))
Expand Down
Loading