hydromt_wflow.components.WflowOutputCsvComponent#

Summary of Methods and Attributes#

class WflowOutputCsvComponent(model: Model, *, filename: str = 'output.csv', locations_component: str | None = None)[source]#

Bases: DatasetsComponent

ModelComponent class for Wflow csv output.

This class is used for reading the Wflow csv output.

The overall output csv component data stored in the data property of this class is of the hydromt.gis.vector.GeoDataset type which is an extension of xarray.Dataset for vector data.

read()[source]#

Read csv model output at root/dir_output/filename.

Checks the path of the file in the config toml using both output.csv.path and dir_output. If not found uses the default path output.csv in the root folder.

write()[source]#

Skip writing output files.

Output files are model results and are therefore not written by HydroMT.

close() None#

Clean up all open datasets. Method to be called before finish_write.

property data: Dict[str, DataArray | Dataset]#

Model data in the form of xarray objects.

Return dict of xarray.Dataset or xarray.DataArray objects

property data_catalog: DataCatalog#

Return the data catalog of the model this component is associated with.

finish_write()#

Finish the write functionality after cleanup was called for all components in the model.

All DeferredFileClose objects can overwrite any lazy loaded files now.

property model: Model#

Return the model object this component is associated with.

property name_in_model: str#

Find the name of the component in the parent model components.

property root: ModelRoot#

Return the root of the model this component is associated with.

set(data: Dataset | DataArray, name: str | None = None, split_dataset: bool = False)#

Add data to the xarray component.

Parameters:
test_equal(other: ModelComponent) tuple[bool, dict[str, str]]#

Test if two DatasetsComponents are equal.

Parameters:

other (ModelComponent) – The other ModelComponent to compare with.

Returns:

True if the components are equal, and a dict with the associated errors per property checked.

Return type:

tuple[bool, dict[str, str]]