From 82360e52be85793299ee2e6799e75b7dd2a0b7dc Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Mon, 4 Dec 2023 20:36:34 +0100 Subject: [PATCH] feat: update datasets to version 5.0.2.0 Signed-off-by: Davide Madrisan --- README.md | 8 ++++---- hadcrut5lib.py | 11 +++++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 9fb3da3..5b2ba52 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,11 @@ > — source: [HadCRUT5 FAQ-5](https://crudata.uea.ac.uk/cru/data/temperature/#faq5) Datafiles that are loaded by the Python script: - * HadCRUT.5.0.1.0.analysis.summary_series.global.annual.nc - * HadCRUT.5.0.1.0.analysis.summary_series.northern_hemisphere.annual.nc - * HadCRUT.5.0.1.0.analysis.summary_series.southern_hemisphere.annual.nc + * HadCRUT.5.0.2.0.analysis.summary_series.global.annual.nc + * HadCRUT.5.0.2.0.analysis.summary_series.northern_hemisphere.annual.nc + * HadCRUT.5.0.2.0.analysis.summary_series.southern_hemisphere.annual.nc -HadCRUT5 data taken from: https://www.metoffice.gov.uk/hadobs/hadcrut5/data/current/download.html +HadCRUT5 data taken from: https://www.metoffice.gov.uk/hadobs/hadcrut5/data/HadCRUT.5.0.2.0/download.html ## Plot of the temperature anomalies diff --git a/hadcrut5lib.py b/hadcrut5lib.py index d5b4804..ac8fea6 100755 --- a/hadcrut5lib.py +++ b/hadcrut5lib.py @@ -1,5 +1,5 @@ #!/usr/bin/python3 -# Copyright (c) 2020-2022 Davide Madrisan +# Copyright (c) 2020-2023 Davide Madrisan # SPDX-License-Identifier: GPL-3.0-or-later """ @@ -20,7 +20,7 @@ __author__ = "Davide Madrisan" __copyright__ = "Copyright (C) 2020-2023 Davide Madrisan" __license__ = "GNU General Public License v3.0" -__version__ = "2023.1" +__version__ = "2023.2" __email__ = "d.madrisan@proton.me" __status__ = "stable" @@ -52,7 +52,7 @@ class HadCRUT5: """Class for parsing and plotting HadCRUT5 datasets""" # current dataset version - _DATASET_VERSION = "5.0.1.0" + _DATASET_VERSION = "5.0.2.0" # list of all the available data types _DEFAULT_DATATYPE = "annual" @@ -227,10 +227,9 @@ def datasets_regions(self): """Return the dataset regions set by the user at command-line""" return self._datasets.keys() - @staticmethod - def _hadcrut5_data_url(filename): + def _hadcrut5_data_url(self, filename): site = "https://www.metoffice.gov.uk" - path = "/hadobs/hadcrut5/data/current/analysis/diagnostics/" + path = "/hadobs/hadcrut5/data/HadCRUT.{}/analysis/diagnostics/".format(self._DATASET_VERSION) url = "{}{}{}".format(site, path, filename) return url