diff --git a/.zenodo.json b/.zenodo.json index 8c63ee1..233162f 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -72,6 +72,11 @@ "affiliation": "Netherlands eScience Center", "name": "Verhoeven, Stefan", "orcid": "0000-0002-5821-2060" + }, + { + "affiliation": "Environment and Climate Change Canada", + "name": "Malinina, Elizaveta", + "orcid": "0000-0002-4102-2877" } ], "description": "A command line interface to download ERA5 data from the Climate Data Store.\n", diff --git a/CITATION.cff b/CITATION.cff index dc47990..1df530f 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -77,6 +77,11 @@ authors: family-names: Verhoeven given-names: Stefan orcid: https://orcid.org/0000-0002-5821-2060 + - + affiliation: "Environment and Climate Change Canada" + family-names: Malinina + given-names: Elizaveta + orcid: https://orcid.org/0000-0002-4102-2877 cff-version: 1.2.0 date-released: 2021-11-30 diff --git a/era5cli/cli.py b/era5cli/cli.py index f7cb0d7..13f6c23 100644 --- a/era5cli/cli.py +++ b/era5cli/cli.py @@ -148,7 +148,8 @@ def _build_parser(): Whether to download the preliminary back extension (1950-1978). Note that when `--prelimbe` is used, `--startyear` and `--endyear` should be set - between 1950 and 1978. + between 1950 and 1978. Please, be aware that + ERA5 data is available from 1959. `--prelimbe` is incompatible with `--land`. ''') @@ -159,7 +160,7 @@ def _build_parser(): help=textwrap.dedent('''\ Whether to download data from the ERA5-Land dataset. Note that the ERA5-Land dataset starts in - 1981. + 1950. `--land` is incompatible with the use of `--prelimbe` and `--ensemble`. @@ -343,12 +344,12 @@ def _construct_year_list(args): 'year should be between 1950 and 1978' ) elif args.land: - assert 1981 <= year <= datetime.now().year, ( - 'for ERA5-Land, year should be between 1981 and present' + assert 1950 <= year <= datetime.now().year, ( + 'for ERA5-Land, year should be between 1950 and present' ) else: - assert 1979 <= year <= datetime.now().year, ( - 'year should be between 1979 and present' + assert 1959 <= year <= datetime.now().year, ( + 'year should be between 1959 and present' ) assert endyear >= args.startyear, ( diff --git a/era5cli/fetch.py b/era5cli/fetch.py index ad3883c..57d0198 100644 --- a/era5cli/fetch.py +++ b/era5cli/fetch.py @@ -387,7 +387,8 @@ def _build_name(self, variable): if self.prelimbe: if self.land: raise ValueError( - "Back extension not (yet) available for ERA5-Land.") + "Back extension not available for ERA5-Land. " + "ERA5-Land data is available from 1950 on.") name += "-preliminary-back-extension" return name, variable diff --git a/tests/test_cli.py b/tests/test_cli.py index 1184ed1..e4e5155 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -138,7 +138,7 @@ def test_main_fetch(fetch): assert cli._execute(args) # should give an AssertionError if years are out of bounds - argv = ['hourly', '--startyear', '1950', + argv = ['hourly', '--startyear', '1949', '--variables', 'total_precipitation', '--statistics', '--endyear', '2007', '--ensemble'] args = cli._parse_args(argv) @@ -160,14 +160,6 @@ def test_main_fetch(fetch): args = cli._parse_args(argv) cli._execute(args) - # no land available for back extension - argv = ['monthly', '--startyear', '1980', '--endyear', '1980', - '--variables', 'total_precipitation', '--synoptic', - '--ensemble', '--land'] - args = cli._parse_args(argv) - with pytest.raises(AssertionError): - cli._execute(args) - @mock.patch("era5cli.info.Info", autospec=True) def test_main_info(info):