Compare Grids¶
Executive Summary
Use this tool to analyze the difference between two gridded Depth/Elevation layers in CSAR/BAG format. The CSARs and/or BAGs input may be any combination of variable resolution or raster grids. Output consists of two CSAR grids and three plot files containing summary statistics. One CSAR output file contains the simple depth differences in a Diff layer; the other CSAR grid contains the layer fracAllowError: the fraction of the IHO-allowable error.
Typical usage is to compare main-scheme and cross-line hydrography, or the junction between current survey and other survey. HSD specifications are met when 95% or greater of the grid-node comparisons pass. The Comparison Distribution plot subtitle displays this percentage-pass value (see Fig. 30).
Run Instructions
The CARIS BASE Editor batch processing engine (carisbatch.exe) is required to run this tool. You must have BASE Editor 4.2+ (i.e., 4.2, 4.3, or 4.4, etc) installed & configured to run normally. The NOAA/OCS CARIS software maintenance contract includes the necessary licensing to install and use CARIS BASE Editor.
See Fig. 26. To conduct a surface comparison, first use the browse buttons to complete all the items on the Run tab. The Depth/Elevation layer in the 2nd CSAR/BAG file subtracts from the Depth/Elevation layer in 1st CSAR/BAG file, and the output name populates accordingly:
<1st Coverage file base name> − <2nd Coverage file base name>
Edit the output name shown in the text box to override the default naming, as desired.
Upon startup, the program automatically searches the host computer for the BASE Editor batch-processing engine; if found, it is shown in the dialog and no additional user intervention is required.

Fig. 26 Example input parameters with default output name according to the specified 1st & 2nd Coverage files; override the same default in the Diff plot title as desired.
When you are satisfied with the input values on the Run tab, press the Compare button to start the analysis. A green bar just under the Run tab marks the progress of the program (Fig. 27); any errors encountered during the process present in a pop-up message window, possibly directing you to examine the Command Prompt window that accompanies the application (Fig. 28).

Fig. 27 A successful run with the progress bar at 100%; see also Fig. 29
Creating temporary CSAR files of differences ...
"C:\Program Files\CARIS\BASE Editor\4.4\bin\carisbatch.exe" -r DifferenceCoverages -d VR -e Depth -i Elevation -D "N:\CSDL\HSTP\Test Data\TVU_Compare\1210_ShallowWreck_half.csar" "N:\CSDL\HSTP\Test Data\TVU_Compare\3005_shallowWreck_halfm.bag" "E:\Data\NOAA\Pydro\DensityAndIHOCompliance\Test\BAG\flip\NEW\3005_shallowWreck_halfm-1210_ShallowWreck_half_depth_delta.csar"
--elapsed run time is 6.19(s)...
"C:\Program Files\CARIS\BASE Editor\4.4\bin\carisbatch.exe" -r DifferenceCoverages -d VR -e Diff -i Elevation -D "E:\Data\NOAA\Pydro\DensityAndIHOCompliance\Test\BAG\flip\NEW\3005_shallowWreck_halfm-1210_ShallowWreck_half_depth_delta.csar" "N:\CSDL\HSTP\Test Data\TVU_Compare\3005_shallowWreck_halfm.bag" "E:\Data\NOAA\Pydro\DensityAndIHOCompliance\Test\BAG\flip\NEW\3005_shallowWreck_halfm-1210_ShallowWreck_half_depth2.csar"
--elapsed run time is 10.12(s)...
Matching comparisons with depth ...
Removing temporary CSAR files ...
--elapsed run time is 10.71(s)...
Calculating statistics & creating plots ...
Creating output CSAR grid ...
"C:\Program Files\CARIS\BASE Editor\4.4\bin\carisbatch.exe" --run ImportPoints --input-format ASCII --input-crs "EPSG:32616" --output-crs "EPSG:32616" --gridding-method BASIC --resolution 0.50m --anchor 0.00m 0.00m --info-file C:\Users\JACK~1.RIL\WORKSP~1\trunk\MINICO~1\NOAA\SITE-P~1\Python2\HSTB\Contribs\CSAR_Surface_Comparison_fracAllowErr.info --primary-band fracAllowErr "E:\Data\NOAA\Pydro\DensityAndIHOCompliance\Test\BAG\flip\NEW\3005_shallowWreck_halfm-1210_ShallowWreck_half_fracAllowErr.txt" "E:\Data\NOAA\Pydro\DensityAndIHOCompliance\Test\BAG\flip\NEW\3005_shallowWreck_halfm-1210_ShallowWreck_half_fracAllowErr.csar"
--elapsed run time is 13.03(s)...
Total run time is 13.03(s)
This window echoes all CARIS batch processing engine commands invoked during a run. If you receive any pop-up error messages during a run, additional information to help determine what went wrong may be present here.
Results
The output folder contains four (7) files at the end of a successful processing run: (1)&(2) – The two files associated with the CSAR fracAllowError output surface (i.e., the .csar metadata & .csar0 data files), (3) – A plot of Node Depth (nominal depth of the co-registered gridded-comparison points) vs. Allowable Error Fraction with summary statistics, (4) – A histogram showing the Comparison Distribution of the magnitude of the fractional allowable errors with summary statistics,
(5)&(6) – The two files associated with the CSAR Diff output surface (.csar,.csar0), and
- – A stats/distribution summary plot of the Diff CSAR layer
The Allowable Error Fraction is computed by dividing the observed difference (1st CSAR file – 2nd CSAR file) by the IHO-based HSD maximum allowable error for soundings (TVUmax) scaled according to the variance sum law, assuming independent, identically distributed observations. The results automatically handle the TVUmax 100-m depth switchover point for using IHO Order 1a (0-100m) or IHO Order 2a (100m+).
The depth-dependent plot (per (3), above; see Fig. 29) retains the sign of the Allowable Error Fraction, where values between-and-including ±1 represent “passing” comparisons; i.e., observational-pair differences consistent with the maximum allowable error for the given depth). The histogram plot (per (4), above; see Fig. 30) uses the magnitude (absolute value) of the Allowable Error Fraction to show a simple indication of what percentage of the total number of comparisons pass the TVUmax test.
Open the CSAR output surface (.csar) in CARIS HIPS or BASE Editor to see the spatial distribution of Allowable Error Fraction (i.e., layer fracAllowError). Change the Colour File to FracAllowError [Range] as shown in Fig. 31 to color passing comparisons green, while failed-low and failed-high comparisons shown in cool (blue shades) and hot (yellow/orange/red) colors, resp (see Fig. 32).
Green = pass Blue shades = exceeds TVUmax error tolerance, with 2nd CSAR surface being deeper than 1st CSAR surface Yellow/Orange/Red shades = exceeds TVUmax error tolerance, with 1st CSAR surface being deeper than 2nd CSAR surface
Resources
- Online Resources:
Contact
If you find errors in the documentation or want to contribute, you are encouraged to email the following personnel emails @NOAA.GOV
- barry.gallagher
- jack.riley
- chen.zhang
- eric.younkin