Skip to content

partition‐generator

Shengting Cui edited this page Feb 27, 2024 · 6 revisions

Ngen Partition Generator

The Ngen Partition Generator is a tool designed to create. a partition table from a set of hydrofabric nexuses and catchments. This partition file allows parallel execution of the model framework. The partition process also can allow only a subset of catchments or nexuses to used in a parallel run.

Tool Syntax

In all command line examples below, <catchment-datafile> and <nexus-datafile>, or example-catchments and example_nexuses can both be replaced with <geopackage-datafile>. They will run the same way and generate the correct partition file.

The Partition Generator is a command line tool with the following syntax:

partitionGenerator <catchment-datafile> <nexus-datafile> <output-partition-file> <number-of-partitions> <catchment-subset-ids> <nexus-subset-ids>

Subset ids must be given with the syntax:

'id1, id2, id3, ...'

If no subseting is desired on the catchments an empty string must be passed for that catchment subset id ''.

Example

The call

partitionGenerator example-catchments example_nexuses example-partition-8 8 '' ''

will create a partition file with 8 partitions using all catchment and nexus ids defined in the input file. To instead create a partition file with a subset of nexus and catchment ids the call would instead be:

partitionGenerator example-catchments example_nexuses example-partition-8 8 'catchment-id1, catchment-id2,...' 'nexus-id1, nexus-id2'

Clone this wiki locally