Skip to content

Commit

Permalink
Merge branch 'develop' into calibrate-impact-functions
Browse files Browse the repository at this point in the history
  • Loading branch information
peanutfun committed Oct 2, 2023
2 parents c2ede47 + 1dae5a7 commit c40b85a
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 11 deletions.
29 changes: 27 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,39 @@ Code freeze date: YYYY-MM-DD

### Changed

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

### Fixed

### Deprecated

### Removed

## 4.0.1

Release date: 2023-09-27

### Dependency Changes

Added:

- `matplotlib-base` None → >=3.8

Changed:

- `geopandas` >=0.13 → >=0.14
- `pandas` >=1.5,<2.0 &rarr; >=2.1

Removed:

- `matplotlib` >=3.7

### Changed

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

### Fixed

- `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)

## 4.0.0

Release date: 2023-09-01
Expand Down
2 changes: 1 addition & 1 deletion climada/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '4.0.0-dev'
__version__ = '4.0.2-dev'
5 changes: 2 additions & 3 deletions climada/util/coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -1545,9 +1545,8 @@ def get_country_code(lat, lon, gridded=False):
method='nearest', fill_value=0)
region_id = region_id.astype(int)
else:
extent = (lon.min() - 0.001, lon.max() + 0.001,
lat.min() - 0.001, lat.max() + 0.001)
countries = get_country_geometries(extent=extent)
(lon_min, lat_min, lon_max, lat_max) = latlon_bounds(lat, lon, 0.001)
countries = get_country_geometries(extent=(lon_min, lon_max, lat_min, lat_max))
with warnings.catch_warnings():
# in order to suppress the following
# UserWarning: Geometry is in a geographic CRS. Results from 'area' are likely
Expand Down
1 change: 1 addition & 0 deletions climada/util/test/test_coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ def test_country_to_iso(self):
self.assertEqual(u_coord.country_natid2iso(natid_list), al3_list)
self.assertEqual(u_coord.country_natid2iso(natid_list[1]), al3_list[1])


class TestAssign(unittest.TestCase):
"""Test coordinate assignment functions"""

Expand Down
8 changes: 4 additions & 4 deletions requirements/env_climada.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ dependencies:
- dask>=2023
- eccodes>=2.27,<2.28 # 2.28 changed some labels, in particular: gust -> i20fg
- gdal>=3.6
- geopandas>=0.13
- geopandas>=0.14
- h5py>=3.8
- haversine>=2.8
- matplotlib>=3.7
- matplotlib-base>=3.8
- netcdf4>=1.6
- numba>=0.57
- openpyxl>=3.1
- pandas>=1.5
- pandas>=2.1
- pandas-datareader>=0.10
- pathos>=0.3
- pint>=0.22
Expand All @@ -26,7 +26,7 @@ dependencies:
- pycountry>=22.3
- pyepsg>=0.4
- pytables>=3.7
- python>=3.9,<3.12
- python=3.9
- pyxlsb>=1.0
- rasterio>=1.3
- requests>=2.31
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
setup(
name='climada',

version='4.0.1-dev',
version='4.0.2-dev',

description='CLIMADA in Python',

Expand Down

0 comments on commit c40b85a

Please sign in to comment.