climada.entity package#

climada.entity.entity_def module#

class climada.entity.entity_def.Entity(exposures: Exposures | None = None, disc_rates: DiscRates | None = None, impact_func_set: ImpactFuncSet | None = None, measure_set: MeasureSet | None = None)[source]#

Bases: object

Collects exposures, impact functions, measures and discount rates. Default values set when empty constructor.

exposures#

exposures

Type:

Exposures

impact_funcs#

impact functions set

Type:

ImpactFuncSet

measures#

measures

Type:

MeasureSet

disc_rates#

discount rates

Type:

DiscRates

def_file#

Default file from configuration file

Type:

str

__init__(exposures: Exposures | None = None, disc_rates: DiscRates | None = None, impact_func_set: ImpactFuncSet | None = None, measure_set: MeasureSet | None = None)[source]#

Initialize entity

Parameters:
  • exposures (climada.entity.Exposures, optional) – Exposures of the entity. The default is None (empty Exposures()).

  • disc_rates (climada.entity.DiscRates, optional) – Disc rates of the entity. The default is None (empty DiscRates()).

  • impact_func_set (climada.entity.ImpactFuncSet, optional) – The impact function set. The default is None (empty ImpactFuncSet()).

  • measure_set (climada.entity.Measures, optional) – The measures. The default is None (empty MeasuresSet().

classmethod from_mat(file_name)[source]#

Read MATLAB file of climada.

Parameters:

file_name (str, optional) – file name(s) or folder name containing the files to read

Returns:

ent – The entity from matlab file

Return type:

climada.entity.Entity

read_mat(*args, **kwargs)[source]#

This function is deprecated, use Entity.from_mat instead.

classmethod from_excel(file_name)[source]#

Read csv or xls or xlsx file following climada’s template.

Parameters:
  • file_name (str, optional) – file name(s) or folder name containing the files to read

  • description (str or list(str), optional) – one description of the data or a description of each data file

Returns:

ent – The entity from excel file

Return type:

climada.entity.Entity

read_excel(*args, **kwargs)[source]#

This function is deprecated, use Entity.from_excel instead.

write_excel(file_name)[source]#

Write excel file following template.

check()[source]#

Check instance attributes.

Raises:

ValueError