Skip to content

Commit

Permalink
final merge conflicts from main
Browse files Browse the repository at this point in the history
  • Loading branch information
panosatha committed Jan 17, 2025
1 parent cf03679 commit e25d2c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions flood_adapt/adapter/fiat_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
)
from fiat_toolbox.spatial_output.aggregation_areas import AggregationAreas
from fiat_toolbox.spatial_output.footprints import Footprints
from hydromt_fiat.fiat import FiatModel as HydroMtFiatModel
from hydromt_fiat.fiat import FiatModel

from flood_adapt import unit_system as us
from flood_adapt.adapter.interface.impact_adapter import IImpactAdapter
Expand All @@ -29,6 +29,7 @@
)
from flood_adapt.object_model.hazard.floodmap import FloodMap, FloodMapType
from flood_adapt.object_model.hazard.interface.events import Mode
from flood_adapt.object_model.interface.config.fiat import FiatConfigModel
from flood_adapt.object_model.interface.measures import (
IMeasure,
MeasureType,
Expand All @@ -37,7 +38,6 @@
ObjectDir,
)
from flood_adapt.object_model.interface.scenarios import IScenario
from flood_adapt.object_model.interface.site import FiatModel
from flood_adapt.object_model.utils import cd, resolve_filepath


Expand All @@ -51,14 +51,14 @@ class FiatAdapter(IImpactAdapter):
- postprocessing methods for saving impact results
"""

_model: HydroMtFiatModel # hydroMT-FIAT model
config: Optional[FiatModel] = None # Site model
_model: FiatModel # hydroMT-FIAT model
config: Optional[FiatConfigModel] = None # Site model
exe_path: Optional[os.PathLike] = None

def __init__(
self,
model_root: Path,
config: Optional[FiatModel] = None,
config: Optional[FiatConfigModel] = None,
exe_path: Optional[os.PathLike] = None,
delete_crashed_runs: bool = True,
config_base_path: Optional[os.PathLike] = None,
Expand All @@ -72,7 +72,7 @@ def __init__(
self.config_base_path = config_base_path
self.exe_path = exe_path
self.delete_crashed_runs = delete_crashed_runs
self._model = HydroMtFiatModel(root=str(model_root.resolve()), mode="r")
self._model = FiatModel(root=str(model_root.resolve()), mode="r")
self._model.read()

@property
Expand Down
2 changes: 1 addition & 1 deletion flood_adapt/dbs_classes/dbs_static.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def get_fiat_model(self) -> FiatAdapter:
template_path = self._database.static_path / "templates" / "fiat"
with FiatAdapter(
model_root=template_path,
config=self._database.site.attrs.fiat,
config=self._database.site.attrs.fiat.config,
exe_path=Settings().fiat_path,
delete_crashed_runs=Settings().delete_crashed_runs,
config_base_path=self._database.static_path,
Expand Down

0 comments on commit e25d2c0

Please sign in to comment.