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
CropProductionexposures 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
LitPopexposures for custom geographic shapes with methodsLitPop.set_custom_shapeandLitPop.set_custom_shape_from_countries - Init population or nightlight exposures with convenience wrappers
LitPop.set_populationandLitPop.set_nightlights - Universal country ISO code conversion function
country_to_isoinclimada.util.coordinates. - Reproject 2D np.ndarray to be aligned to a reference grid with
align_raster_datainutil.coordinates. - Mask array with given shapes with
mask_raster_with_geometryinutil.coordinates. - Tropical Cyclone random walk: Ability to use global,pre-calculated landfall decay parameters (
use_global_decay_params=Trueincalc_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_clientcontaining 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)' litpopmodule:- Code of
litpopmodule has been completely revised and performance ofLitPop.set_*methods improved, - Parameter
res_kmno longer supported inLitPop.set_*methods, useres_arcsecinstead 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
yearsetsmodule:- 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_vectneeds to be generated or is provided)
centroidsmodule:- Method
centroids.appendchanged behaviour: rasters are transformed to points before appending and raster information is lost.
- Method
minor changes:
- Plots improved
- Using
pycountrypackage instead ofiso3166for across modules. - Improved performance for
Impact.selectandTropCyclone.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.
geopandasversion 0.6 was abandanoned. It is now required to be 0.8 or higher. Direct assignment of thecrsattribute in aGeoDataFrameorExposuresobject is not possible anymore. Insteadset_crsmust be used.Exposureshas a new methodset_gdfthat can be used to set theGeoDataFrameand update thecrsat once.