Skip to content

Commit

Permalink
test inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Mar 29, 2024
1 parent 6bc30ab commit f69d196
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ endfunction()

# Copy test data file into buiild directory for testing.
copy_test_data(gdaswave.t00z.wcoast.0p16.f000.grib2)
copy_test_data(ref_gdaswave.t00z.wcoast.0p16.f000.grib2.inv)

# Run these shell tests.
shell_test(run_wgrib2_tests)
19 changes: 19 additions & 0 deletions tests/data/ref_gdaswave.t00z.wcoast.0p16.f000.grib2.inv
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
1:0:d=2021113000:WIND:surface:anl:
2:15254:d=2021113000:WDIR:surface:anl:
3:37897:d=2021113000:UGRD:surface:anl:
4:53794:d=2021113000:VGRD:surface:anl:
5:69064:d=2021113000:HTSGW:surface:anl:
6:79482:d=2021113000:PERPW:surface:anl:
7:91308:d=2021113000:DIRPW:surface:anl:
8:108541:d=2021113000:WVHGT:surface:anl:
9:116716:d=2021113000:SWELL:1 in sequence:anl:
10:128832:d=2021113000:SWELL:2 in sequence:anl:
11:140848:d=2021113000:SWELL:3 in sequence:anl:
12:151732:d=2021113000:WVPER:surface:anl:
13:161021:d=2021113000:SWPER:1 in sequence:anl:
14:173676:d=2021113000:SWPER:2 in sequence:anl:
15:189425:d=2021113000:SWPER:3 in sequence:anl:
16:205285:d=2021113000:WVDIR:surface:anl:
17:218263:d=2021113000:SWDIR:1 in sequence:anl:
18:237035:d=2021113000:SWDIR:2 in sequence:anl:
19:259223:d=2021113000:SWDIR:3 in sequence:anl:
3 changes: 2 additions & 1 deletion tests/run_wgrib2_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ ls -l ../wgrib2

# Run an inventory on a test file. This does not work.
#echo "*** testing inventory of gdaswave.t00z.wcoast.0p16.f000.grib2..."
./wgrib2 ../tests/data/gdaswave.t00z.wcoast.0p16.f000.grib2 > tmp.txt
../wgrib2/wgrib2 data/gdaswave.t00z.wcoast.0p16.f000.grib2 > tmp.txt
cat tmp.txt
cmp tmp.txt data/ref_gdaswave.t00z.wcoast.0p16.f000.grib2.inv

echo "*** SUCCESS!"
exit 0

0 comments on commit f69d196

Please sign in to comment.