Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlysonStahl-NOAA committed Oct 18, 2024
1 parent 16f3c3c commit 10ffdf5
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,15 @@ if (USE_IPOLATES)
copy_test_data(ref_new_grid_ncep_t1148.txt)
copy_test_data(ref_new_grid_ncep_t1534.txt)
copy_test_data(ref_mercator_grid.txt)
copy_test_data(ref_hrrr_grid.txt)
copy_test_data(ref_nam12_grid.txt)
copy_test_data(ref_new_grid_ncep_130.txt)
copy_test_data(ref_new_grid_ncep_132.txt)
copy_test_data(ref_new_grid_ncep_187.txt)
copy_test_data(ref_new_grid_ncep_197.txt)
copy_test_data(ref_new_grid_ncep_236.txt)
endif()

if (USE_AEC)
shell_test(run_wgrib2_aec_tests)
endif()
Expand Down
42 changes: 42 additions & 0 deletions tests/run_ipolates_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -219,5 +219,47 @@ echo "*** Testing conversion to Mercator grid"
touch mercator_grid.txt
diff -w mercator_grid.txt data/ref_mercator_grid.txt

echo "*** Testing conversion to HRRR grid"
../wgrib2/wgrib2 new_grid_test.grb -new_grid_winds earth -new_grid ncep grid hrrr new_grid_junk.grb
../wgrib2/wgrib2 new_grid_junk.grb -grid -v2 -s > hrrr_grid.txt
touch hrrr_grid.txt
diff -w hrrr_grid.txt data/ref_hrrr_grid.txt

echo "*** Testing conversion to NAM 12 grid"
../wgrib2/wgrib2 new_grid_test.grb -new_grid_winds earth -new_grid ncep grid nam12 new_grid_junk.grb
../wgrib2/wgrib2 new_grid_junk.grb -grid -v2 -s > nam12_grid.txt
touch nam12_grid.txt
diff -w nam12_grid.txt data/ref_nam12_grid.txt

echo "*** Testing conversion to NCEP grid definition 130"
../wgrib2/wgrib2 new_grid_test.grb -new_grid_winds earth -new_grid ncep grid 130 new_grid_junk.grb
../wgrib2/wgrib2 new_grid_junk.grb -grid -v2 -s > ncep_grid_130.txt
touch ncep_grid_130.txt
diff -w ncep_grid_130.txt data/ref_new_grid_ncep_130.txt

echo "*** Testing conversion to NCEP grid definition 132"
../wgrib2/wgrib2 new_grid_test.grb -new_grid_winds earth -new_grid ncep grid 132 new_grid_junk.grb
../wgrib2/wgrib2 new_grid_junk.grb -grid -v2 -s > ncep_grid_132.txt
touch ncep_grid_132.txt
diff -w ncep_grid_132.txt data/ref_new_grid_ncep_132.txt

echo "*** Testing conversion to NCEP grid definition 187"
../wgrib2/wgrib2 new_grid_test.grb -new_grid_winds earth -new_grid ncep grid 187 new_grid_junk.grb
../wgrib2/wgrib2 new_grid_junk.grb -grid -v2 -s > ncep_grid_187.txt
touch ncep_grid_187.txt
diff -w ncep_grid_187.txt data/ref_new_grid_ncep_187.txt

echo "*** Testing conversion to NCEP grid definition 197"
../wgrib2/wgrib2 new_grid_test.grb -new_grid_winds earth -new_grid ncep grid 197 new_grid_junk.grb
../wgrib2/wgrib2 new_grid_junk.grb -grid -v2 -s > ncep_grid_197.txt
touch ncep_grid_197.txt
diff -w ncep_grid_197.txt data/ref_new_grid_ncep_197.txt

echo "*** Testing conversion to NCEP grid definition 236"
../wgrib2/wgrib2 new_grid_test.grb -new_grid_winds earth -new_grid ncep grid 236 new_grid_junk.grb
../wgrib2/wgrib2 new_grid_junk.grb -grid -v2 -s > ncep_grid_236.txt
touch ncep_grid_236.txt
diff -w ncep_grid_236.txt data/ref_new_grid_ncep_236.txt

echo "*** SUCCESS!"
exit 0

0 comments on commit 10ffdf5

Please sign in to comment.