Skip to content

Commit

Permalink
Merge branch 'feature/expo_metadata' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuel-schmid committed Aug 11, 2023
2 parents bf30646 + ad89e3d commit 438be81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion climada/entity/exposures/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class Exposures():
TC. There might be different hazards defined: centr_TC, centr_FL, ...
Computed in method assign_centroids().
"""
_metadata = ['tag', 'ref_year', 'value_unit', 'meta']
_metadata = ['tag', 'ref_year', 'value_unit', 'meta', 'description']

vars_oblig = ['value', 'latitude', 'longitude']
"""Name of the variables needed to compute the impact."""
Expand Down Expand Up @@ -172,6 +172,7 @@ def __init__(self, *args, meta=None, tag=None, ref_year=DEF_REF_YEAR,
self.ref_year = self.meta.get('ref_year', DEF_REF_YEAR) if ref_year is None else ref_year
self.value_unit = (self.meta.get('value_unit', DEF_VALUE_UNIT)
if value_unit is None else value_unit)
self.description = kwargs.pop('description') if 'description' in kwargs else None

# remaining generic attributes from derived classes
for mda in type(self)._metadata:
Expand Down

0 comments on commit 438be81

Please sign in to comment.