Skip to content

Commit

Permalink
adding additional check to find source of potential error
Browse files Browse the repository at this point in the history
  • Loading branch information
AlysonStahl-NOAA committed Jun 6, 2024
1 parent 5187eff commit 7c0e1a9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ copy_test_data(ref_grid.gdaswave.t00z.wcoast.0p16.f000.grib2.txt)
copy_test_data(ref_celsius.gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt)
copy_test_data(ref_fahrenheit.gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt)
copy_test_data(ref_rh.gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt)
copy_test_data(ref_tmp_windspeed.txt)
copy_test_data(ref_rpn.windspeed.gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt)
copy_test_data(ref_sec0.gdas.t12z.pgrb2.1p00.anl.75r.grib2)
copy_test_data(ref_sec0.gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt)
Expand Down
2 changes: 2 additions & 0 deletions tests/data/ref_tmp_windspeed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1:0:d=2024042612:WIND:0.01 mb:anl:
2:97919:d=2024042612:WIND:0.02 mb:anl:
4 changes: 4 additions & 0 deletions tests/run_wgrib2_rpn_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ echo "*** Calculates wind speed for records 1-25, then returns the average, min,
-set_var WIND \
-grib_out tmp_windspeed.grb

# Check output
../wgrib2/wgrib2 tmp_windspeed.grb > tmp_windspeed.txt
diff -w tmp_windspeed.txt data/ref_tmp_windspeed.txt

../wgrib2/wgrib2 tmp_windspeed.grb -rpn print_min -rpn print_max -rpn print_ave > min_max_ave_windspeed.txt
touch min_max_ave_windspeed.txt
diff -w min_max_ave_windspeed.txt data/ref_rpn.windspeed.gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt
Expand Down

0 comments on commit 7c0e1a9

Please sign in to comment.