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 .grd files.

  • SHOM binary .a and ASCII .b file pairs.

  • One or multiple gridit-cdf NetCDF files.


Usage

shom-grd2nc [OPTIONS] file

or

shom-grd2nc file1.nc [file2.nc ...]

Options

Option

Description

-h, --help

Display help and exit.

-3

Create a NetCDF 3 file (uncompressed, potentially large due to dummy variables).

--small3

Create a NetCDF 3 file without dummy variables (smaller than -3).


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

  1. Input File Handling:

  • Only one input file is accepted at a time for SHOM .grd, .a, or .b files.

  • 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.

  1. Output:

  • By default, the output is a compressed NetCDF 4 file (smaller and more efficient).

  • Use -3 or --small3 to generate NetCDF 3 files (uncompressed or without dummy variables).

  • The output filename is derived from the input filename (e.g., input.grd → input.nc).

  1. Coordinate Handling:

  • Supports LONGITUDE and LATITUDE axes.

  • Coordinates can be specified as START,DELTA or GIVEN_BELOW.

  1. Grid Data:

  • If --small3 is used, grid data (dummy variables) are skipped to reduce file size.


See Also