hydromt_fiat.fiat.FiatModel#

class hydromt_fiat.fiat.FiatModel(root=None, mode='w', config_fn=None, data_libs=None, logger=<Logger hydromt_fiat.fiat (WARNING)>)[source]#

General and basic API for the FIAT model in hydroMT.

Initialize a GridModel for distributed models with a regular grid.

__init__(root=None, mode='w', config_fn=None, data_libs=None, logger=<Logger hydromt_fiat.fiat (WARNING)>)[source]#

Initialize a GridModel for distributed models with a regular grid.

Methods

__init__([root, mode, config_fn, data_libs, ...])

Initialize a GridModel for distributed models with a regular grid.

bf_spatial_joins()

build([region, write, opt])

Single method to build a model from scratch based on settings in opt.

copy_datasets(data, folder)

Copies datasets to another folder

get_config(*args[, fallback, abs_path])

Get a config value at key(s).

get_tables_merged()

Return all tables of a model merged into one dataframe.

read()

Method to read the complete model schematization and configuration from file.

read_config([config_fn])

Parse config from file.

read_forcing([fn])

Read forcing at <root>/<fn> and add to forcing property.

read_geoms()

Read the geometries for the exposure data.

read_grid([fn])

Read model grid data at <root>/<fn> and add to grid property.

read_maps([fn])

Read model map at <root>/<fn> and add to maps component.

read_nc(fn[, mask_and_scale, ...])

Read netcdf files at <root>/<fn> and return as dict of xarray.Dataset.

read_results([fn])

Read results at <root>/<fn> and add to results property.

read_states([fn])

Read states at <root>/<fn> and add to states property.

read_staticgeoms()

Read gemoetries from disk.

read_staticmaps([fn])

Read static model maps at <root>/<fn> and add to staticmaps property.

read_tables()

Read the model tables for vulnerability and exposure data.

set_config(*args)

Update the config dictionary at key(s) with values.

set_crs(crs)

Set coordinate reference system of the model grid.

set_forcing(data[, name, split_dataset])

Add data to forcing attribute.

set_geoms(geom, name)

Add data to the geoms attribute.

set_grid(data[, name])

Add data to grid.

set_maps(data[, name, split_dataset])

Add raster data to the maps component.

set_results(data[, name, split_dataset])

Add data to results attribute.

set_root(root[, mode])

Initialize the model root.

set_states(data[, name, split_dataset])

Add data to states attribute.

set_staticgeoms(geom, name)

Set the geometries.

set_staticmaps(data[, name])

Add data to staticmaps.

set_tables(df, name)

Add <pandas.DataFrame> to the tables variable.

setup_additional_attributes(...[, ...])

setup_aggregation_areas(aggregation_area_fn, ...)

_summary_

setup_basemaps(*args, **kwargs)

setup_building_footprint(...)

_summary_

setup_classification([source, attribute, ...])

_summary_

setup_config(**cfdict)

Update config with a dictionary.

setup_equity_data(census_key[, year_data])

Setup the download procedure for equity data similarly to the SVI setup

setup_exposure_buildings(asset_locations, ...)

Setup building exposure (vector) data for Delft-FIAT.

setup_exposure_raster()

Setup raster exposure data for Delft-FIAT.

setup_exposure_roads(roads_fn, road_damage)

Setup road exposure data for Delft-FIAT.

setup_global_settings([crs, gdal_cache, ...])

Setup Delft-FIAT global settings.

setup_grid(region[, res, crs, rotated, ...])

HYDROMT CORE METHOD: Create a 2D regular grid or reads an existing grid.

setup_grid_from_constant(constant, name[, ...])

HYDROMT CORE METHOD: Adds a grid based on a constant value.

setup_grid_from_geodataframe(vector_fn[, ...])

HYDROMT CORE METHOD: Add data variable(s) to grid object by rasterizing the data from vector_fn.

setup_grid_from_raster_reclass(raster_fn, ...)

HYDROMT CORE METHOD: Add data variable(s) to grid object by reclassifying the data in raster_fn based on reclass_table_fn.

setup_grid_from_rasterdataset(raster_fn[, ...])

HYDROMT CORE METHOD: Add data variable(s) from raster_fn to grid object.

setup_hazard(map_fn, map_type[, rp, crs, ...])

Set up hazard maps.

setup_maps_from_raster_reclass(raster_fn, ...)

HYDROMT CORE METHOD: Add data variable(s) to maps object by reclassifying the data in raster_fn based on reclass_table_fn.

setup_maps_from_rasterdataset(raster_fn[, ...])

HYDROMT CORE METHOD: Add data variable(s) from raster_fn to maps object.

setup_output([output_dir, output_csv_name, ...])

Setup Delft-FIAT output folder and files.

setup_region(region, **kwargs)

Define the model domain that is used to clip the raster layers.

setup_road_vulnerability(vertical_unit[, ...])

setup_social_vulnerability_index(census_key, ...)

Setup the social vulnerability index for the vector exposure data for Delft-FIAT.

setup_vulnerability(vulnerability_fn, ...[, ...])

Setup the vulnerability curves from various possible inputs.

setup_vulnerability_from_csv(csv_fn, unit)

Setup the vulnerability curves from one or multiple csv files.

test_model_api()

Test compliance with HydroMT Model API.

update([model_out, write, opt, ...])

Single method to update a model based the settings in opt.

update_all()

update_geoms()

update_ground_elevation(source, unit)

update_ground_floor_height(source[, ...])

update_maps()

update_max_potential_damage([source, ...])

update_tables()

write()

Method to write the complete model schematization and configuration to file.

write_building_footprints()

write_config([config_name, config_root])

Write config to <root/config_fn>.

write_data_catalog([root, data_lib_fn, ...])

Write the data catalog to data_lib_fn.

write_forcing([fn])

Write forcing to netcdf file at <root>/<fn>.

write_geoms()

_summary_.

write_grid([fn, gdal_compliant, ...])

Write model grid data to netcdf file at <root>/<fn>.

write_maps([fn])

Write maps to netcdf file at <root>/<fn>.

write_nc(nc_dict, fn[, gdal_compliant, ...])

Write dictionnary of xarray.Dataset and/or xarray.DataArray to netcdf files.

write_spatial_joins()

write_states([fn])

Write states to netcdf file at <root>/<fn>.

write_staticgeoms()

Write the geometries to disk.

write_staticmaps([fn])

Write static model maps to netcdf file at <root>/<fn>.

write_tables()

Write tables at <root>/tables.

Attributes

api

bounds

Returns the bounding box of the model grid.

config

Model configuration.

coords

Returns the coordinates of model staticmaps.

crs

Returns coordinate reference system embedded in the model grid.

dims

Returns spatial dimension names of staticmaps.

forcing

Model forcing.

geoms

Model geometries.

grid

Model static gridded data as xarray.Dataset.

height

Returns the height of the model staticmaps.

maps

Model maps.

region

Returns the geometry of the model area of interest.

res

Returns the resolution of the model grid.

results

Model results.

root

Path to model folder.

shape

Returns the shape of the model staticmaps.

states

Model states.

staticgeoms

Access the geometryes.

staticmaps

Model static maps.

tables

Model tables.

transform

Returns spatial transform of the model grid.

vulnerability_curves

Returns a dataframe with the damage functions.

vulnerability_metadata

width

Returns the width of the model staticmaps.