Skip to content

Commit

Permalink
feat: update datasets to version 5.0.2.0
Browse files Browse the repository at this point in the history
Signed-off-by: Davide Madrisan <[email protected]>
  • Loading branch information
madrisan committed Dec 4, 2023
1 parent bd32f93 commit 333d27a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
> &mdash; 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

Expand Down
13 changes: 7 additions & 6 deletions hadcrut5lib.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/python3
# Copyright (c) 2020-2022 Davide Madrisan <[email protected]>
# Copyright (c) 2020-2023 Davide Madrisan <[email protected]>
# SPDX-License-Identifier: GPL-3.0-or-later

"""
Expand All @@ -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__ = "[email protected]"
__status__ = "stable"

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -227,10 +227,11 @@ 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

Expand Down

0 comments on commit 333d27a

Please sign in to comment.