-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix all issues reported by pylint
Signed-off-by: Davide Madrisan <[email protected]>
- Loading branch information
Showing
10 changed files
with
198 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,18 +20,18 @@ HadCRUT5 data are downloaded from: https://www.metoffice.gov.uk/hadobs/hadcrut5/ | |
|
||
## Plot of the temperature anomalies | ||
|
||
The following plots have been generated by the Python scripts `hadcrut5-plot.py` and `hadcrut5-bars.py`. | ||
The following plots have been generated by the Python scripts `hadcrut5_plot.py` and `hadcrut5_bars.py`. | ||
They require the Python libraries: Matplotlib, netCDF4, NumPy, and Requests. | ||
|
||
If Python and the required libraries are not installed on your system, you can simply | ||
[install](https://docs.astral.sh/uv/getting-started/installation/) `uv` and run the commands listed below prefixed | ||
with `uv run`. For example `uv run ./hadcrut5-plot.py`. | ||
with `uv run`. For example `uv run ./hadcrut5_plot.py`. | ||
|
||
## hadcrut5-plot.py — Script usage | ||
## hadcrut5_plot.py — Script usage | ||
|
||
``` | ||
$ ./hadcrut5-plot.py --help | ||
usage: hadcrut5-plot.py [-h] [-f OUTFILE] [-p PERIOD] [-m SMOOTHER] [-g] [-n] [-s] [-a ANNOTATE] [-v] | ||
$ ./hadcrut5_plot.py --help | ||
usage: hadcrut5_plot.py [-h] [-f OUTFILE] [-p PERIOD] [-m SMOOTHER] [-g] [-n] [-s] [-a ANNOTATE] [-v] | ||
Parse and plot the HadCRUT5 temperature datasets v2023.1 (stable) | ||
Copyright (C) 2020-2023 Davide Madrisan <[email protected]> | ||
|
@@ -55,28 +55,28 @@ options: | |
-v, --verbose make the operation more talkative | ||
examples: | ||
hadcrut5-plot.py | ||
hadcrut5-plot.py --global --annotate=2 | ||
hadcrut5-plot.py --period "1850-1900" | ||
hadcrut5-plot.py --period "1850-1900" --smoother 5 | ||
hadcrut5-plot.py --period "1880-1920" --outfile HadCRUT5-1880-1920.png | ||
hadcrut5-plot.py --period "1880-1920" --time-series monthly --global | ||
hadcrut5_plot.py | ||
hadcrut5_plot.py --global --annotate=2 | ||
hadcrut5_plot.py --period "1850-1900" | ||
hadcrut5_plot.py --period "1850-1900" --smoother 5 | ||
hadcrut5_plot.py --period "1880-1920" --outfile HadCRUT5-1880-1920.png | ||
hadcrut5_plot.py --period "1880-1920" --time-series monthly --global | ||
``` | ||
|
||
`hadcrut5-plot.py` select the period `1961-90` by default but supports (see the command-line switch`--period`) two other base periods found in the literature: `1850-1900`, and `1880-1920`. | ||
`hadcrut5_plot.py` select the period `1961-90` by default but supports (see the command-line switch`--period`) two other base periods found in the literature: `1850-1900`, and `1880-1920`. | ||
|
||
``` | ||
$ ./hadcrut5-plot.py --annotate=2 --outfile plots/HadCRUT5-1961-1990.png | ||
$ ./hadcrut5_plot.py --annotate=2 --outfile plots/HadCRUT5-1961-1990.png | ||
``` | ||
![HadCRUT5 anomalies related to 1961-1990](plots/HadCRUT5-1961-1990.png) | ||
|
||
``` | ||
$ ./hadcrut5-plot.py --annotate=2 --period "1850-1900" --outfile plots/HadCRUT5-1850-1900.png | ||
$ ./hadcrut5_plot.py --annotate=2 --period "1850-1900" --outfile plots/HadCRUT5-1850-1900.png | ||
``` | ||
![HadCRUT5 anomalies related to 1850-1900](plots/HadCRUT5-1850-1900.png) | ||
|
||
``` | ||
$ ./hadcrut5-plot.py --annotate=2 --period "1880-1920" --outfile plots/HadCRUT5-1880-1920.png | ||
$ ./hadcrut5_plot.py --annotate=2 --period "1880-1920" --outfile plots/HadCRUT5-1880-1920.png | ||
``` | ||
![HadCRUT5 anomalies related to 1880-1920](plots/HadCRUT5-1880-1920.png) | ||
|
||
|
@@ -87,7 +87,7 @@ For instance `--smoother 5` will get you a better idea of the trend lines. | |
|
||
Image generated for the anomalies related to the period `1880-1920`. | ||
``` | ||
$ ./hadcrut5-plot.py --period "1880-1920" --smoother 5 --outfile plots/HadCRUT5-1880-1920-smoother.png | ||
$ ./hadcrut5_plot.py --period "1880-1920" --smoother 5 --outfile plots/HadCRUT5-1880-1920-smoother.png | ||
``` | ||
![HadCRUT5 anomalies related to 1880-1920 with 5-year means](plots/HadCRUT5-1880-1920-smoother.png) | ||
|
||
|
@@ -97,14 +97,14 @@ The command-line option `--time-series monthly` selects the monthly HadCRUT5 dat | |
|
||
Image displying the monthly anomalies related to the period `1880-1920`, for the global temperatures only. | ||
``` | ||
$ ./hadcrut5-plot.py --global --period "1880-1920" --time-series monthly | ||
$ ./hadcrut5_plot.py --global --period "1880-1920" --time-series monthly | ||
``` | ||
![HadCRUT5 monthly global anomalies related to 1880-1920 means](plots/HadCRUT5-monthly-global-1880-1920.png) | ||
|
||
## hadcrut5-bars.py — Script usage | ||
## hadcrut5_bars.py — Script usage | ||
|
||
``` | ||
usage: hadcrut5-bars.py [-h] [-f OUTFILE] [-p PERIOD] [-v] | ||
usage: hadcrut5_bars.py [-h] [-f OUTFILE] [-p PERIOD] [-v] | ||
Parse and plot the HadCRUT5 temperature datasets v2023.1 (stable) | ||
Copyright (C) 2020-2023 Davide Madrisan <[email protected]> | ||
|
@@ -119,21 +119,21 @@ options: | |
-v, --verbose make the operation more talkative | ||
examples: | ||
hadcrut5-bars.py | ||
hadcrut5-bars.py --period "1850-1900" | ||
hadcrut5-bars.py --period "1880-1920" | ||
hadcrut5-bars.py --outfile HadCRUT5-global.png | ||
hadcrut5_bars.py | ||
hadcrut5_bars.py --period "1850-1900" | ||
hadcrut5_bars.py --period "1880-1920" | ||
hadcrut5_bars.py --outfile HadCRUT5-global.png | ||
``` | ||
The image for to the anomalies related to the period `1880-1920` follows. | ||
``` | ||
$ ./hadcrut5-bars.py --period "1880-1920" --outfile plots/HadCRUT5-global-1880-1920.png | ||
$ ./hadcrut5_bars.py --period "1880-1920" --outfile plots/HadCRUT5-global-1880-1920.png | ||
``` | ||
![HadCRUT5 bar plotting related to 1880-1920](plots/HadCRUT5-global-1880-1920.png) | ||
|
||
## hadcrut5-stripe.py — Script usage | ||
## hadcrut5_stripe.py — Script usage | ||
|
||
``` | ||
usage: hadcrut5-stripe.py [-h] [-f OUTFILE] [-r {global,northern,southern}] [-v] [-l] | ||
usage: hadcrut5_stripe.py [-h] [-f OUTFILE] [-r {global,northern,southern}] [-v] [-l] | ||
Parse and plot a stripe image of the HadCRUT5 temperature datasets v2023.1 (stable) | ||
Copyright (C) 2020-2023 Davide Madrisan <[email protected]> | ||
|
@@ -149,14 +149,14 @@ options: | |
-l, --no-labels do not disply the header and footer labels | ||
examples: | ||
hadcrut5-stripe.py | ||
hadcrut5-stripe.py --no-labels --region northern | ||
hadcrut5-stripe.py --region global --outfile HadCRUT5-stripe-global.png | ||
hadcrut5_stripe.py | ||
hadcrut5_stripe.py --no-labels --region northern | ||
hadcrut5_stripe.py --region global --outfile HadCRUT5-stripe-global.png | ||
``` | ||
|
||
Below is a generated striped image for global anomalies. | ||
``` | ||
$ ./hadcrut5-stripe.py --region global | ||
$ ./hadcrut5_stripe.py --region global | ||
``` | ||
![HadCRUT5 global warming stripe](plots/HadCRUT5-global-stripe.png) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.