Skip to content

Commit

Permalink
Merge pull request #6 from Deltares/corrections
Browse files Browse the repository at this point in the history
Minor corrections
  • Loading branch information
DirkEilander authored Jun 14, 2021
2 parents 1576da9 + 27a4e82 commit 99167a1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hydromt_fiat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
6 changes: 3 additions & 3 deletions hydromt_fiat/fiat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion hydromt_fiat/workflows/buildings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 99167a1

Please sign in to comment.