Skip to content

Commit

Permalink
Added AEC test file
Browse files Browse the repository at this point in the history
  • Loading branch information
AlysonStahl-NOAA committed Apr 18, 2024
1 parent 8e09b8c commit 6376b6f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ copy_test_data(ref_npts_gdaswave.t00z.wcoast.0p16.f000.grib2.txt)

# Run these shell tests.
shell_test(run_wgrib2_tests)

if (USE_AEC)
shell_test(run_wgrib2_sec_tests)
endif()
17 changes: 17 additions & 0 deletions tests/run_wgrib2_aec_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh
# This is an optional test script for the wgrib2 project.
#
# Alyson Stahl, 4/18/24

set -e
echo ""
echo "*** Running wgrib2 tests"

# Testing aec compression
../wgrib2/wgrib2 data/gdaswave.t00z.wcoast.0p16.f000.grib2 -set_grib_type -grib_out test.aec.grib2

# Check grid data are identical
../wgrib2/wgrib2 data/gdaswave.t00z.wcoast.0p16.f000.grib2 -rpn sto_1 -import_grib test.aec.grib2 -rpn "rcl_1:print_rms" | grep -v "rpn_rms=0:" | wc -l

echo "*** SUCCESS!"
exit 0

0 comments on commit 6376b6f

Please sign in to comment.