Skip to content

Commit c40b85a

Browse files
committed
Merge branch 'develop' into calibrate-impact-functions
2 parents c2ede47 + 1dae5a7 commit c40b85a

File tree

6 files changed

+36
-11
lines changed

6 files changed

+36
-11
lines changed

CHANGELOG.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,39 @@ Code freeze date: YYYY-MM-DD
1414

1515
### Changed
1616

17-
- Rearranged file-system structure: `data` directory moved into `climada` package directory. [#781](https://github.com/CLIMADA-project/climada_python/pull/781)
18-
1917
### Fixed
2018

2119
### Deprecated
2220

2321
### Removed
2422

23+
## 4.0.1
24+
25+
Release date: 2023-09-27
26+
27+
### Dependency Changes
28+
29+
Added:
30+
31+
- `matplotlib-base` None → >=3.8
32+
33+
Changed:
34+
35+
- `geopandas` >=0.13 → >=0.14
36+
- `pandas` >=1.5,<2.0 &rarr; >=2.1
37+
38+
Removed:
39+
40+
- `matplotlib` >=3.7
41+
42+
### Changed
43+
44+
- Rearranged file-system structure: `data` directory moved into `climada` package directory. [#781](https://github.com/CLIMADA-project/climada_python/pull/781)
45+
46+
### Fixed
47+
48+
- `climada.util.coordinates.get_country_code` bug, occurring with non-standard longitudinal coordinates around the anti-meridian. [#770](https://github.com/CLIMADA-project/climada_python/issues/770)
49+
2550
## 4.0.0
2651

2752
Release date: 2023-09-01

climada/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '4.0.0-dev'
1+
__version__ = '4.0.2-dev'

climada/util/coordinates.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,9 +1545,8 @@ def get_country_code(lat, lon, gridded=False):
15451545
method='nearest', fill_value=0)
15461546
region_id = region_id.astype(int)
15471547
else:
1548-
extent = (lon.min() - 0.001, lon.max() + 0.001,
1549-
lat.min() - 0.001, lat.max() + 0.001)
1550-
countries = get_country_geometries(extent=extent)
1548+
(lon_min, lat_min, lon_max, lat_max) = latlon_bounds(lat, lon, 0.001)
1549+
countries = get_country_geometries(extent=(lon_min, lon_max, lat_min, lat_max))
15511550
with warnings.catch_warnings():
15521551
# in order to suppress the following
15531552
# UserWarning: Geometry is in a geographic CRS. Results from 'area' are likely

climada/util/test/test_coordinates.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ def test_country_to_iso(self):
492492
self.assertEqual(u_coord.country_natid2iso(natid_list), al3_list)
493493
self.assertEqual(u_coord.country_natid2iso(natid_list[1]), al3_list[1])
494494

495+
495496
class TestAssign(unittest.TestCase):
496497
"""Test coordinate assignment functions"""
497498

requirements/env_climada.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ dependencies:
1010
- dask>=2023
1111
- eccodes>=2.27,<2.28 # 2.28 changed some labels, in particular: gust -> i20fg
1212
- gdal>=3.6
13-
- geopandas>=0.13
13+
- geopandas>=0.14
1414
- h5py>=3.8
1515
- haversine>=2.8
16-
- matplotlib>=3.7
16+
- matplotlib-base>=3.8
1717
- netcdf4>=1.6
1818
- numba>=0.57
1919
- openpyxl>=3.1
20-
- pandas>=1.5
20+
- pandas>=2.1
2121
- pandas-datareader>=0.10
2222
- pathos>=0.3
2323
- pint>=0.22
@@ -26,7 +26,7 @@ dependencies:
2626
- pycountry>=22.3
2727
- pyepsg>=0.4
2828
- pytables>=3.7
29-
- python>=3.9,<3.12
29+
- python=3.9
3030
- pyxlsb>=1.0
3131
- rasterio>=1.3
3232
- requests>=2.31

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
setup(
3434
name='climada',
3535

36-
version='4.0.1-dev',
36+
version='4.0.2-dev',
3737

3838
description='CLIMADA in Python',
3939

0 commit comments

Comments
 (0)