Skip to content

Commit

Permalink
Update for 2023 data
Browse files Browse the repository at this point in the history
  • Loading branch information
bashrc2 committed Jan 13, 2024
1 parent 58065b1 commit c2e27e6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions anomaly.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ def plot_monthly_anomalies(grid: [],
"set rmargin 2\n" + \
"set xlabel \"" + x_label + "\"\n" + \
"set ylabel \"" + y_label + "\"\n" + \
"set xtics (\"Jan\" 1, \"Feb\" 2, \"Mar\" 3, \"Apr\" 4, " + \
"\"May\" 5, \"Jun\" 6, \"Jul\" 7, \"Aug\" 8, \"Sep\" 9, " + \
"\"Oct\" 10, \"Nov\" 11, \"Dec\" 12)\n" + \
"set grid\n" + \
"set key right bottom\n" + \
"set terminal " + image_format2 + \
Expand Down
2 changes: 1 addition & 1 deletion grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,5 @@ def save_grid_as_kml(grid: [], filename: str) -> None:
kml_str += \
"</Document>\n" + \
"</kml>\n"
with open(filename, 'w+') as fp_kml:
with open(filename, 'w+', encoding='utf-8') as fp_kml:
fp_kml.write(kml_str)
4 changes: 2 additions & 2 deletions parseCountries.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ def load_countries(filename: str) -> {}:
"""
lines = []
try:
with open(filename, 'r') as fp_countries:
with open(filename, 'r', encoding='utf-8') as fp_countries:
lines = fp_countries.readlines()
except BaseException:
except OSError:
print('Unable to open ' + filename)
return None
countries = {}
Expand Down
2 changes: 1 addition & 1 deletion parseStations.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ def save_station_locations_as_kml(station_locations: {},
kml_str += \
"</Document>\n" + \
"</kml>\n"
with open(filename, 'w+') as fp_kml:
with open(filename, 'w+', encoding='utf-8') as fp_kml:
fp_kml.write(kml_str)
2 changes: 1 addition & 1 deletion tempgraph2.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def str2bool(value) -> bool:
default=1900,
help='Start year')
parser.add_argument('--end', '--endYear', dest='endYear', type=int,
default=2022,
default=2023,
help='End year')
parser.add_argument('--baselineStart', dest='baselineStart', type=int,
default=1961,
Expand Down

0 comments on commit c2e27e6

Please sign in to comment.