Skip to content
Introducing Domain-Set

Introducing Domain-Set

June 23, 2026

NOMADS HSOFS mesh has ID P-46fdb4-n1813443_E-e6405f-n3564104x3.

Unique ID strings representing geospatial point sets and topology relationships, to easily reference and track changes for model domains, observation station sets, and output coordinates.

Providing methods to create mesh-specific identifier strings for ADCIRC meshes and geospatial model domains more generally. It includes a command line interface (CLI) to compute Domain Set IDs from your shell.

The reference implementation is an importable Python module and CLI available on Gitlab.

ID String Design

IDs are constructed out of modular sections that each being with a “CODE-” identifying the content of the section. The most basic ID for a set of xy points of length NUMPOINT is formatted in the following way, which uses “P-” as the starting code for the “POINTS” section, the only required section of the “_domain-set” scheme.

P-${XY_HASH}-n${NUM_POINT}_...

Point Section (“P-…”)

XYHASH is a 6-character hex-digest of the “blake2b” hash algorithm applied the “Well Known Binary” (WKB) MultiPoint representation of the entire set of node X/Y coordinates using a target hash length of 3. The node coordinates are taken in the specific order that they appear within the input grid file.

To assist the humans interpreting the point section, the number of individual nodes or points are included following P-XYHASH, separated by another “-”, and prepended with “n” to imply number count.

For the NOMADS HSOFS ADCIRC mesh fort.14 file, the “domain set” point section results in P-46fdb4-n1813443.

Element Section (“E-…”)

..._E-${INDICES_HASH}-n${NUM_ELEMENT}x${NUM_VERTEX}

The element section identifies the specific topology of mesh elements to the point features. The element topology array filled with indices corresponding to the ordered point feature set is similarly hashed by the “blake2b” algorithm. First the size NUM_ELEMENTxNUM_VERTEX integer array is flattened (C-order), and the byte representation of the 1-D array data is passed to the hash function using the same target length of 3 and hex-digest char. output. The hex-digest (“INDICES_HASH”) is appended to the element section leader providing E-${INDICES_HASH}.

Again similar to the point section, human intepretable shape information for the topology index is encoded to the end of element section n${NUM_ELEMENT}x${NUM_VERTEX} separated by “-”. In the case of a TIN or triangular mesh NUM_VERTEX = 3 so the shape encoding becomes n${NUM_ELEMENT}x3.

The resulting “domain set” ID for the HSOFS ADCIRC mesh including the earlier “point section” is generated as P-46fdb4-n1813443_E-e6405f-n3564104x3.

Grids

Collection of points?

Command Line Tool

The domain-set CLI computes the ID for an input grid/mesh file path by default. It includes functionality to create diagnostic map images, and dump domains to GIS compatible geoparquet and GeoJSON.

domain-set Grids/NOMAD1e.grd --map-type element
# P-46fdb4-n1813443_E-e6405f-n3564104x3

Typer generated help:

> domain-set  --help

 Usage: domain-set [OPTIONS] INPUT_PATH

╭─ Arguments ─────────────────────────────────────────────────────────────────────────────────────────╮
│ *    input_path      TEXT  [required]╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────╮
│ --input-type                               [fort.14|gridasc|csv]  [default: fort.14]
│ --export-geojson    --no-export-geojson                           [default: no-export-geojson]
│ --export-parquet    --no-export-parquet                           [default: no-export-parquet]
│ --map-xlim                                 FLOAT
│ --map-ylim                                 FLOAT
│ --map-type                                 [element|node|none]    [default: none]
│ --output-prefix                            TEXT
│ --verbose           --no-verbose                                  [default: no-verbose]
│ --help                                                            Show this message and exit.
╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯