shom-grd2nc v3.2.3¶
Mercurial revision 5803:7164e00e8f3d | 2026-08-18
Description¶
shom-grd2nc is a tool to convert SHOM grid files to NetCDF format or convert gridit-cdf NetCDF atlas files to SHOM’s .a files.
Supported input file types:
SHOM ASCII
.grdfiles.SHOM binary
.aand ASCII.bfile pairs.One or multiple gridit-cdf NetCDF files.
Usage¶
shom-grd2nc [OPTIONS] file
or
shom-grd2nc file1.nc [file2.nc ...]
Options¶
Option |
Description |
|---|---|
|
Display help and exit. |
|
Create a NetCDF 3 file (uncompressed, potentially large due to dummy variables). |
|
Create a NetCDF 3 file without dummy variables (smaller than |
Examples¶
Convert a SHOM .grd File to NetCDF¶
shom-grd2nc input.grd
Convert a SHOM .a and .b File Pair to NetCDF¶
shom-grd2nc input.a
Convert a NetCDF File to SHOM .a Format¶
shom-grd2nc input.nc
Convert Multiple NetCDF Files¶
shom-grd2nc file1.nc file2.nc file3.nc
Force NetCDF 3 Output (Uncompressed)¶
shom-grd2nc -3 input.grd
Force NetCDF 3 Output Without Dummy Variables¶
shom-grd2nc --small3 input.grd
Environment Variables¶
None.
Notes¶
Input File Handling:
Only one input file is accepted at a time for SHOM
.grd,.a, or.bfiles.Multiple NetCDF files can be processed in a single command.
If the same input file is specified multiple times, a warning is issued, and only one instance is processed.
Output:
By default, the output is a compressed NetCDF 4 file (smaller and more efficient).
Use
-3or--small3to generate NetCDF 3 files (uncompressed or without dummy variables).The output filename is derived from the input filename (e.g.,
input.grd→input.nc).
Coordinate Handling:
Supports
LONGITUDEandLATITUDEaxes.Coordinates can be specified as
START,DELTAorGIVEN_BELOW.
Grid Data:
If
--small3is used, grid data (dummy variables) are skipped to reduce file size.