Command Line Interface#
hydromt#
Command line interface for hydromt models.
hydromt [OPTIONS] COMMAND [ARGS]...
Options
- --version#
Show the version and exit.
- --models#
Print available model plugins and exit.
- --components#
Print available component plugins and exit.
- --plugins#
Print available component plugins and exit.
Commands
- build
Build models
- check
Validate config / data catalog / region
- export
Export data
- update
Update models
hydromt build#
Build models from scratch.
Example usage:#
To build a wflow model for a subbasin using a point coordinates snapped to cells with upstream area >= 50 km2 hydromt build wflow /path/to/model_root -i /path/to/wflow_config.yml -d deltares_data -d /path/to/data_catalog.yml -v To build a sfincs model based on a bbox hydromt build sfincs /path/to/model_root -i /path/to/sfincs_config.yml -r “{‘bbox’: [4.6891,52.9750,4.9576,53.1994]}” -d /path/to/data_catalog.yml -v
hydromt build [OPTIONS] MODEL MODEL_ROOT
Options
- --opt <opt>#
Method specific keyword arguments, see the method documentation of the specific model for more information about the arguments.
- -i, --config <config>#
Path to hydroMT configuration file, for the model specific implementation.
- -d, --data <data>#
Path to local yaml data catalog file OR name of predefined data catalog.
- --dd, --deltares-data#
Flag: Shortcut to add the “deltares_data” catalog
- --fo, --force-overwrite#
Flag: If provided overwrite existing model files
- --cache#
Flag: If provided cache tiled rasterdatasets
- -v, --verbose#
Increase verbosity.
- -q, --quiet#
Decrease verbosity.
Arguments
- MODEL#
Required argument
- MODEL_ROOT#
Required argument
hydromt update#
Update a specific component of a model.
Set an output directory to copy the edited model to a new folder, otherwise maps are overwritten.
Example usage:#
Update (overwrite!) landuse-landcover based maps in a Wflow model: hydromt update wflow /path/to/model_root -c setup_lulcmaps –opt lulc_fn=vito -d /path/to/data_catalog.yml -v
Update Wflow model components outlined in an .yml configuration file and write the model to a directory: hydromt update wflow /path/to/model_root -o /path/to/model_out -i /path/to/wflow_config.yml -d /path/to/data_catalog.yml -v
hydromt update [OPTIONS] MODEL MODEL_ROOT
Options
- -o, --model-out <model_out>#
Output model folder. Maps in MODEL_ROOT are overwritten if left empty.
- -i, --config <config>#
Path to hydroMT configuration file, for the model specific implementation.
- -c, --components <components>#
Model methods from configuration file to run
- --opt <opt>#
Method specific keyword arguments, see the method documentation of the specific model for more information about the arguments.
- -d, --data <data>#
Path to local yaml data catalog file OR name of predefined data catalog.
- --dd, --deltares-data#
Flag: Shortcut to add the “deltares_data” catalog
- --fo, --force-overwrite#
Flag: If provided overwrite existing model files
- --cache#
Flag: If provided cache tiled rasterdatasets
- -q, --quiet#
Decrease verbosity.
- -v, --verbose#
Increase verbosity.
Arguments
- MODEL#
Required argument
- MODEL_ROOT#
Required argument
hydromt export#
Export the data from a catalog.
Example usage:#
export the data of a single data source, in a particular region, for a particular time range hydromt export -r “{‘bbox’: [4.6891,52.9750,4.9576,53.1994]}” -s era5_hourly -d ../hydromt/data/catalogs/artifact_data.yml -t ‘[“2010-01-01”, “2022-12-31”]’ path/to/output_dir
export a single data source from the deltares data catalog without time/space slicing hydromt export -d deltares_data -s era5_hourly path/to/output_dir
export data as detailed in an export config yaml file hydromt export -i /path/to/export_config.yaml path/to/output_dir
hydromt export [OPTIONS] EXPORT_DEST_PATH
Options
- -s, --source <source>#
Name of the data source to export.
- -t, --time-range <time_range>#
Time tuple as a list of two strings, e.g. [‘2010-01-01’, ‘2022-12-31’]
- -b, --bbox <bbox>#
a bbox in EPSG:4236 designating the region of which to export the data
- -r, --region <region>#
Set the region for which to build the model, e.g. {‘subbasin’: [-7.24, 62.09]}
- -i, --config <config>#
Path to hydroMT configuration file, for the model specific implementation.
- -d, --data <data>#
Path to local yaml data catalog file OR name of predefined data catalog.
- --dd, --deltares-data#
Flag: Shortcut to add the “deltares_data” catalog
- --fo, --force-overwrite#
Flag: If provided overwrite existing model files
- --error-on-empty#
Flag: Raise an error when attempting to export empty dataset instead of continuing
- -q, --quiet#
Decrease verbosity.
- -v, --verbose#
Increase verbosity.
Arguments
- EXPORT_DEST_PATH#
Required argument
hydromt check#
Verify that provided data catalog and config files are in the correct format.
Additionally region bbox and geom can also be validated.
Example usage:#
Check data catalog file: hydromt check -d /path/to/data_catalog.yml -v
Check data catalog and grid_model config file: hydromt check -m grid_model -d /path/to/data_catalog.yml -i /path/to/model_config.yml -v
With region: hydromt check -m grid_model -d /path/to/data_catalog.yml -i /path/to/model_config.yml -r ‘{‘bbox’: [-1,-1,1,1]}’ -v
hydromt check [OPTIONS]
Options
- -m, --model <model>#
Model name, e.g. wflow, sfincs, etc. to validate config file.
- -i, --config <config>#
Path to hydroMT configuration file, for the model specific implementation.
- -d, --data <data>#
Path to local yaml data catalog file OR name of predefined data catalog.
- -q, --quiet#
Decrease verbosity.
- -v, --verbose#
Increase verbosity.
- -r, --region <region>#
Set the region for which to build the model, e.g. {‘subbasin’: [-7.24, 62.09]}