From bc485c1ec84cc7268bb73672f47d70e9fdfdc699 Mon Sep 17 00:00:00 2001 From: Elizaveta Malinina Date: Tue, 4 Oct 2022 12:15:33 -0700 Subject: [PATCH 1/9] changing start year to 1959 for ERA5 and 1950 for ERA5-Land, removing ERA5-Land test for inaccecibility of the years prior to 1981 --- era5cli/cli.py | 13 +++++++------ tests/test_cli.py | 8 -------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/era5cli/cli.py b/era5cli/cli.py index f7cb0d7..f7e251e 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 + from 1959 ERA5 data is available. `--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/tests/test_cli.py b/tests/test_cli.py index 1184ed1..ad73e92 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -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): From 23edd9664984bac83f0238a1b6068da55faaa3d7 Mon Sep 17 00:00:00 2001 From: Elizaveta Malinina Date: Tue, 4 Oct 2022 12:17:11 -0700 Subject: [PATCH 2/9] changing version number, adding Liza to the list of authors --- .zenodo.json | 5 +++++ CITATION.cff | 9 +++++++-- era5cli/__version__.py | 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) 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..b884e07 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -77,9 +77,14 @@ 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 +date-released: 2022-10-04 doi: 10.5281/zenodo.3252665 keywords: - "ERA5" @@ -87,4 +92,4 @@ license: Apache-2.0 message: "If you use this software, please cite it using these metadata." repository-code: "https://github.com/ewatercycle/era5cli" title: era5cli -version: 1.3.1 +version: 1.3.2 diff --git a/era5cli/__version__.py b/era5cli/__version__.py index 6b9a8ef..35bdd8e 100644 --- a/era5cli/__version__.py +++ b/era5cli/__version__.py @@ -10,6 +10,6 @@ 'Niels Drost', 'Fakhereh Alidoost', 'Bouwe Andela', 'Jerom Aerts', 'Berend Weel', 'Rolf Hut', 'Klaus Zimmermann', 'Peter Kalverla', 'Barbara Vreede', 'Aytaç Paçal', 'Stef Smeets', - 'Stefan Verhoeven') + 'Stefan Verhoeven', 'Elizaveta Malinina') __email__ = 'ewatercycle@esciencecenter.nl' -__version__ = '1.3.1' +__version__ = '1.3.2' From 440d23338c42db8900f2e543db7bd2961ac6a057 Mon Sep 17 00:00:00 2001 From: Liza Malinina <66973360+malininae@users.noreply.github.com> Date: Mon, 24 Oct 2022 15:24:09 -0700 Subject: [PATCH 3/9] revert CITATION.cff to the previous release date Co-authored-by: Barbara Vreede --- CITATION.cff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CITATION.cff b/CITATION.cff index b884e07..d3bfddb 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -84,7 +84,7 @@ authors: orcid: https://orcid.org/0000-0002-4102-2877 cff-version: 1.2.0 -date-released: 2022-10-04 +date-released: 2021-11-30 doi: 10.5281/zenodo.3252665 keywords: - "ERA5" From 73b30d5351af9258d1355053ea5b9793a1d4e21a Mon Sep 17 00:00:00 2001 From: Liza Malinina <66973360+malininae@users.noreply.github.com> Date: Mon, 24 Oct 2022 15:24:42 -0700 Subject: [PATCH 4/9] revert CITATION.cff to the previous number Co-authored-by: Barbara Vreede --- CITATION.cff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CITATION.cff b/CITATION.cff index d3bfddb..1df530f 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -92,4 +92,4 @@ license: Apache-2.0 message: "If you use this software, please cite it using these metadata." repository-code: "https://github.com/ewatercycle/era5cli" title: era5cli -version: 1.3.2 +version: 1.3.1 From 56bd56b2c203fb31407f52f4fc2c9c4b78830f95 Mon Sep 17 00:00:00 2001 From: Liza Malinina <66973360+malininae@users.noreply.github.com> Date: Mon, 24 Oct 2022 15:25:17 -0700 Subject: [PATCH 5/9] Removing Liza from era5cli/__version__.py Co-authored-by: Barbara Vreede --- era5cli/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/era5cli/__version__.py b/era5cli/__version__.py index 35bdd8e..a3b673b 100644 --- a/era5cli/__version__.py +++ b/era5cli/__version__.py @@ -10,6 +10,6 @@ 'Niels Drost', 'Fakhereh Alidoost', 'Bouwe Andela', 'Jerom Aerts', 'Berend Weel', 'Rolf Hut', 'Klaus Zimmermann', 'Peter Kalverla', 'Barbara Vreede', 'Aytaç Paçal', 'Stef Smeets', - 'Stefan Verhoeven', 'Elizaveta Malinina') + 'Stefan Verhoeven') __email__ = 'ewatercycle@esciencecenter.nl' __version__ = '1.3.2' From b1b98dd45572af502b58633ee2d6de836d718f32 Mon Sep 17 00:00:00 2001 From: Liza Malinina <66973360+malininae@users.noreply.github.com> Date: Mon, 24 Oct 2022 15:56:30 -0700 Subject: [PATCH 6/9] Update era5cli/cli.py Co-authored-by: Barbara Vreede --- era5cli/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/era5cli/cli.py b/era5cli/cli.py index f7e251e..13f6c23 100644 --- a/era5cli/cli.py +++ b/era5cli/cli.py @@ -149,7 +149,7 @@ def _build_parser(): (1950-1978). Note that when `--prelimbe` is used, `--startyear` and `--endyear` should be set between 1950 and 1978. Please, be aware that - from 1959 ERA5 data is available. + ERA5 data is available from 1959. `--prelimbe` is incompatible with `--land`. ''') From 8355950f32d38ac05046d021db783e6c702cc4da Mon Sep 17 00:00:00 2001 From: Elizaveta Malinina Date: Tue, 25 Oct 2022 12:13:15 -0700 Subject: [PATCH 7/9] updating tests for --land and years out of range --- tests/test_cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index ad73e92..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) From ac29aedf42f48e81ec680b99dec812eadf20a067 Mon Sep 17 00:00:00 2001 From: Liza Malinina <66973360+malininae@users.noreply.github.com> Date: Tue, 25 Oct 2022 12:15:10 -0700 Subject: [PATCH 8/9] Update era5cli/__version__.py Co-authored-by: Barbara Vreede --- era5cli/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/era5cli/__version__.py b/era5cli/__version__.py index a3b673b..6b9a8ef 100644 --- a/era5cli/__version__.py +++ b/era5cli/__version__.py @@ -12,4 +12,4 @@ 'Peter Kalverla', 'Barbara Vreede', 'Aytaç Paçal', 'Stef Smeets', 'Stefan Verhoeven') __email__ = 'ewatercycle@esciencecenter.nl' -__version__ = '1.3.2' +__version__ = '1.3.1' From fde53b0ae33430bc2afac06562b0831c2b911987 Mon Sep 17 00:00:00 2001 From: Elizaveta Malinina Date: Tue, 25 Oct 2022 12:20:04 -0700 Subject: [PATCH 9/9] modifying message if ERA5-Land is used with the back extension --- era5cli/fetch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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