Skip to content
Justin Singh-M. - NOAA edited this page Nov 21, 2023 · 5 revisions

Prerequisites

  1. A subset of the NOAA NextGen Hydrofabric in either GeoJSON or as a GeoPackage.

  2. A realization configuration file

    1. Compiled shared libraries
    2. Model initialization files, if necessary
  3. (If performing channel routing) A routing configuration file with reference to it in your realization configuration

  4. (If using MPI and partitioning) A partition configuration file

Note

If using GeoJSON, you will need files for both the divides and nexus layers.

Running

Once you have the necessary prerequisites, all that's left is to call your ngen executable with the correct CLI arguments.

ngen \
  <divides.geojson or fabric.gpkg> \
  <divides subset ids or "all"> \
  <nexus.geojson or fabric.gpkg> \
  <nexus subset ids or "all"> \
  <realization.json> \
  [partition.json]

Example with GeoJSON Hydrofabric Layers

  • Divides path: path/to/divides.geojson
    • Subset: cat-1, cat-3, cat-7
  • Nexus path: path/to/nexus.geojson
    • Subset: nex-1, nex-2
  • Realization path: path/to/realization_cfg.json
ngen path/to/divides.geojson "cat-1,cat-3,cat-7" path/to/nexus.geojson "nex-1,nex-2" path/to/realization_cfg.json

Example with GeoPackage

  • GeoPackage path: path/to/fabric.gpkg
    • Divides Subset: cat-1, cat-3, cat-7
    • Nexus Subset: all
  • Realization path: path/to/gpkg_realization.json
ngen path/to/fabric.gpkg "cat-1,cat-3,cat-7" path/to/fabric.gpkg "all" path/to/gpkg_realization.json