diff --git a/hydromt_fiat/__init__.py b/hydromt_fiat/__init__.py index 979ea2fe..e256444d 100644 --- a/hydromt_fiat/__init__.py +++ b/hydromt_fiat/__init__.py @@ -3,7 +3,7 @@ from os.path import dirname, join, abspath -__version__ = "0.1.0" +__version__ = "0.1.1" DATADIR = join(dirname(abspath(__file__)), "data") diff --git a/hydromt_fiat/fiat.py b/hydromt_fiat/fiat.py index c8eb7f7e..81978346 100644 --- a/hydromt_fiat/fiat.py +++ b/hydromt_fiat/fiat.py @@ -84,7 +84,7 @@ def setup_basemaps( geom = region["geom"] else: raise ValueError( - f"Unknown region kind {kind} for FIAT, expected one of ['file', 'bbox', 'geom']." + f"Unknown region kind {kind} for FIAT, expected one of ['bbox', 'grid', 'geom']." ) # Set the model region geometry (to be accessed through the shortcut self.region). @@ -268,8 +268,8 @@ def setup_exposure_buildings( # Get the associated vulnerability (damage function id and maximum damage value). df_id, max_damage = self._get_vulnerability() self.logger.debug( - "Scaling building value with max damage: " - f"{max_damage:.2f} {unit:s} (country = {tag:s})." + "Calculating building values with maximum damage: " + f"{max_damage:.2f} {unit:s}/person (country = {tag:s})." ) # Create a building value map. diff --git a/hydromt_fiat/workflows/buildings.py b/hydromt_fiat/workflows/buildings.py index 57ab27b2..73b2b6df 100644 --- a/hydromt_fiat/workflows/buildings.py +++ b/hydromt_fiat/workflows/buildings.py @@ -136,7 +136,7 @@ def create_population_per_building_map( # Create the population, buildings and population per building count maps. da_bld_count = da_bld_density * da_like_area da_pop_count = da_pop_density * da_like_area - da_pop_bld_count = da_pop_count.where(da_bld_count == 0, 0) + da_pop_bld_count = da_pop_count.where(da_bld_count != 0, 0) da_bld_count.raster.set_nodata(nodata=0) da_pop_count.raster.set_nodata(nodata=0) da_pop_bld_count.raster.set_nodata(nodata=0)