regular2node v3.2.3¶
Mercurial revision 5786:5c8b45563631 | 2026-08-04
Description¶
regular2node is a tool for interpolating data from a regular grid onto a finite element (FE) grid (currently only supports ASCII output format). It is designed to transform structured grid data into unstructured grid data, such as those used in surface reference (surfref) models.
Usage¶
regular2node [OPTIONS] file
Options¶
Option |
Description |
|---|---|
|
Display this help message and exit. |
|
Input format: Specify the format of the input file. Supported formats: |
|
Append the interpolated variable to an existing output file. |
|
Node file: Path to the node file of the FE grid for interpolation. |
|
Mesh file: Path to the mesh file of the FE grid for interpolation. |
|
Mask value: Value used to represent masked data in the input file. Default: |
|
Output file: Name of the output file. If not specified, the output filename is derived from the input filename. |
Examples¶
Basic Interpolation¶
Interpolate data from a xyz file to a FE grid using a node file:
regular2node -iF xyz -n nodes.txt -o output.surfref input.xyz
Interpolate with a Mesh File¶
Interpolate data using a mesh file instead of a node file:
regular2node -iF ascii -m mesh.txt -o output.surfref input.asc
Append to an Existing File¶
Append the interpolated data to an existing output file:
regular2node -iF grd -n nodes.txt -append -o output.surfref input.grd
Custom Mask Value¶
Specify a custom mask value (e.g., -999):
regular2node -iF netcdf -s -999 -n nodes.txt -o output.surfref input.nc
Interpolate BMG Format¶
Interpolate data from a bmg file:
regular2node -iF bmg -n nodes.txt -o output.surfref input.bmg
Interpolate CST Format¶
Interpolate data from a cst file:
regular2node -iF cst -m mesh.txt -o output.surfref input.cst
Environment Variables¶
regular2node does not use any specific environment variables. However, ensure that your system has sufficient resources (memory, disk space) for large interpolations.
Notes¶
Input Formats:
Supported input formats:
xyz,ascii,grd,bmg,cst,netcdf.The tool automatically detects the format if
-iFis not specified (defaults toxyz).
Output Formats:
Currently, only ASCII output format is supported for the interpolated data.
Mask Handling:
The default mask value is
999.9. Use-sto specify a different mask value.Masked values in the input file will be preserved in the output.
Node and Mesh Files:
Either a node file (
-n) or a mesh file (-m) must be provided for interpolation.The node file should contain the coordinates of the FE grid nodes.
The mesh file should describe the connectivity of the FE grid.
Performance:
For large datasets, ensure that the input and output files are stored on a fast storage device (e.g., SSD) to optimize performance.
Deprecated Options:
The
-zoption (pre-set zone to limit the area) is deprecated and no longer supported.
See Also¶
SurfRef FE Grid Format (for node and mesh file specifications)
NetCDF Format (for input file specifications)