hydromt_wflow.components.WflowOutputCsvComponent#
Summary of Methods and Attributes#
Component class |
Methods |
Attributes |
|---|---|---|
|
- class WflowOutputCsvComponent(model: Model, *, filename: str = 'output.csv', locations_component: str | None = None)[source]#
Bases:
DatasetsComponentModelComponent class for Wflow csv output.
This class is used for reading the Wflow csv output.
The overall output csv component data stored in the
dataproperty 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.pathanddir_output. If not found uses the default pathoutput.csvin the root folder.
- write()[source]#
Skip writing output files.
Output files are model results and are therefore not written by HydroMT.
- 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 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:
data (xarray.Dataset or xarray.DataArray) – New xarray object to add
name (str) – name of the xarray.