fdb compare#
Usage#
Compares two entire FDBs for MARS id equality:
% fdb-compare --config1=<path/to/config1.yaml> --config2=<path/to/config2.yaml> [options...]
Compare different data in the default (production) FDB:
% fdb-compare --request1="..." --request2="..." [options...]
Options#
|
Path to a FDB config. If not passed, FDB5 specific
environment variables like FDB5_CONFIG_FILE will be evaluated. If |
|
Optional: Path to a second different FDB config. Default: Same as |
|
Optional: Specialized mars keys to request data from FDB1 or both FDBs
e.g. |
|
Optional: Specialized mars keys to request different data from the second FDB,
e.g. |
|
Optional - Values: |
|
Optional - Values: |
|
Optional: Floating point tolerance for comparison (default=10.0*EPSILON). |
|
Optional: Format: |
|
Optional: Format: |
|
Optional: Format: |
|
Optional: Print additional output, including a progress bar for grib message comparisons |
Examples#
Compares two entire FDBs for equality. Using the --scope=all option, not only the headers but also the data is compared:
% fdb-compare --config1=<path/to/config1.yaml> --config2=<path/to/config2.yaml> --scope=all
Compares a specific part (class=rd,expver=1234) of two different FDBs for equality:
% fdb-compare --config1=<path/to/config1.yaml> --config2=<path/to/config2.yaml> --request1="class=rd,expver=1234"
Compares different data versions within one FDB using --request1 and --request2. In that case the only usable --grib-comparison-type is grib-keys (the default option):
% fdb-compare --config1=<path/to/config1.yaml> --request1="class=od,expver=abcd" --request2="class=rd,expver=1234" --grib-comparison-type="grib-keys" | tee out
Compares different data versions within the production FDB if executed on ATOS (the FDB5 config will be inferred from the environment):
% fdb-compare --request1="class=od,expver=abcd" --request2="class=rd,expver=1234" --grib-comparison-type="grib-keys" | tee out
Exit Codes#
The tool exits with code 0 on success (all compared entries match) and non-zero on failure (any mismatch detected or an error occurred). This makes it suitable for use in scripts and CI pipelines.
Notes#
When comparing within a single FDB, using --config1 is enough.
Minimum arguments are either --config1 or --request1. This is explicitly checked,
otherwise the default behaviour would result in a comparison of the default FDB (prodfdb on ATOS) with itself.