Skip to content

v2.2.0

Compare
Choose a tag to compare
@emanuel-schmid emanuel-schmid released this 09 Jul 07:24
· 1065 commits to main since this release

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 methods LitPop.set_custom_shape and LitPop.set_custom_shape_from_countries
  • Init population or nightlight exposures with convenience wrappers LitPop.set_population and LitPop.set_nightlights
  • Universal country ISO code conversion function country_to_iso in climada.util.coordinates.
  • Reproject 2D np.ndarray to be aligned to a reference grid with align_raster_data in util.coordinates.
  • Mask array with given shapes with mask_raster_with_geometry in util.coordinates.
  • Tropical Cyclone random walk: Ability to use global,pre-calculated landfall decay parameters (use_global_decay_params=True in calc_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 now impf_... and not if_... 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 of LitPop.set_* methods improved,
    • Parameter res_km no longer supported in LitPop.set_* methods, use res_arcsec instead with 1 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.
  • 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.

minor changes:

  • Plots improved
  • Using pycountry package instead of iso3166 for across modules.
  • Improved performance for Impact.select and TropCyclone.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 the crs attribute in a GeoDataFrame or Exposures object is not possible anymore. Instead set_crs must be used.
  • Exposures has a new method set_gdf that can be used to set the GeoDataFrame and update the crs at once.