v2.2.0
changed environment:
- pycountry (
iso3166) - peewee (new)
- deprecation (new)
- geopandas >=0.8 (
>=0.6,<0.9)
new features:
- Select TC tracks from IBTrACS by genesis basin (
TCTracks.read_ibtracs_netcdf
). - Discard single-point TC tracks from IBTrACS (
TCTracks.read_ibtracs_netcdf
). - Initiate
CropProduction
exposures directly from netcdf files with yield and cultivated area data (CropProduction.set_from_area_and_yield_nc4
,CropProduction.set_from_spam_ray_mirca
(convenience wrapper)). - Init
LitPop
exposures for custom geographic shapes with methodsLitPop.set_custom_shape
andLitPop.set_custom_shape_from_countries
- Init population or nightlight exposures with convenience wrappers
LitPop.set_population
andLitPop.set_nightlights
- Universal country ISO code conversion function
country_to_iso
inclimada.util.coordinates
. - Reproject 2D np.ndarray to be aligned to a reference grid with
align_raster_data
inutil.coordinates
. - Mask array with given shapes with
mask_raster_with_geometry
inutil.coordinates
. - Tropical Cyclone random walk: Ability to use global,pre-calculated landfall decay parameters (
use_global_decay_params=True
incalc_perturbed_trajectories
, set as default). - Add second-order sensitivity index plot.
- Added methods hazard.concat (concatenate several hazard) and hazard.change_centroids (project the hazard onto new centroids).
- Added method centroids.union (create the union of centroids).
- Centroids is now initiated with a geometry attribute with a default CRS (climada.util.constants.DEF_CRS)
- Added module
climada.util.api_client
containing a basic wrapper around the data API on https://climada.ethz.ch
updated features:
- Impact Function Naming Pattern Changed
The naming pattern for impact functions is nowimpf_...
and notif_...
anymore. These changes affect large parts of the code, notebooks and data files.
Although we tried hard to keep backward compatibility, some user scripts and data files may need to be adapted.
When updating an existing CLIMADA installation, it's suggested to run the following commands in a shell/terminal:conda update -n climada_env –f requirements/env_climada.yml conda activate climada_env python -c 'import climada; climada.setup_climada_data(reload=True)'
litpop
module:- Code of
litpop
module has been completely revised and performance ofLitPop.set_*
methods improved, - Parameter
res_km
no longer supported inLitPop.set_*
methods, useres_arcsec
instead with1 km = ca. 30 arcsec
- climada.entity.exposures.litpop.litpop (
climada.entity.exposures.litpop), - climada.entity.exposures.litpop.nightlight (
climada.entity.exposures.nightlight), - climada.entity.exposures.litpop.gpw_population (
climada.entity.exposures.gpw_import). - Import calling sequences remain unchanged, e.g.
from climada.entity import litpop
.
- Code of
yearsets
module:- update of variable names
- a sampling vector (2D array) replaced the sampling dictionary
- the same event cannot occur more than once in the same year
- the user can specify lam (the number of years around which the Poisson distribution is centered)
- simplification of the function
compute_imp_per_year
(compute_annual_impacts) - simplification of wrapper functions (split into two wrapper functions depending on whether a
sampling_vect
needs to be generated or is provided)
centroids
module:- Method
centroids.append
changed behaviour: rasters are transformed to points before appending and raster information is lost.
- Method
minor changes:
- Plots improved
- Using
pycountry
package instead ofiso3166
for across modules. - Improved performance for
Impact.select
andTropCyclone.set_from_tracks
. - Fix TC rainfield computation for tracks that don't have 1-hour time steps.
- Cutting off TC tracks moving outside of [-70,+70] degrees latitude in synthetic tracks.
- Bug fixes to TC random walk (
calc_perturbed_trajectories
) related to landfall decay. - Improve plots in the uncertainty module.
geopandas
version 0.6 was abandanoned. It is now required to be 0.8 or higher. Direct assignment of thecrs
attribute in aGeoDataFrame
orExposures
object is not possible anymore. Insteadset_crs
must be used.Exposures
has a new methodset_gdf
that can be used to set theGeoDataFrame
and update thecrs
at once.