From 897850897814615c1ae779ed9ffad262d8bfaa55 Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Tue, 9 Jul 2024 09:22:14 -0700 Subject: [PATCH 1/3] commented out test --- tests/run_wgrib2_tests.sh | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/run_wgrib2_tests.sh b/tests/run_wgrib2_tests.sh index 286b8d89..663240ed 100755 --- a/tests/run_wgrib2_tests.sh +++ b/tests/run_wgrib2_tests.sh @@ -22,16 +22,15 @@ echo "*** Testing calculation of number of grid points" ../wgrib2/wgrib2 data/gdaswave.t00z.wcoast.0p16.f000.grib2 -npts > npts.txt cat npts.txt - -echo "*** Testing calculation of wind speed, direction, and UGRD & VGRD components" -../wgrib2/wgrib2 data/gdas.t12z.pgrb2.1p00.anl.75r.grib2 -wind_dir wind.grb -wind_speed wind.grb -match "(UGRD|VGRD)" -../wgrib2/wgrib2 wind.grb > wind.txt -cat wind.txt -diff -w wind.txt data/ref_wind.gdas.t12z.pgrb2.1p00.anl.75r.grib2.inv -../wgrib2/wgrib2 wind.grb -wind_uv uv.grb -../wgrib2/wgrib2 uv.grb > uv.txt -cat uv.txt -diff -w uv.txt data/ref_uv.gdas.t12z.pgrb2.1p00.anl.75r.grib2.inv +#echo "*** Testing calculation of wind speed, direction, and UGRD & VGRD components" +#../wgrib2/wgrib2 data/gdas.t12z.pgrb2.1p00.anl.75r.grib2 -wind_dir wind.grb -wind_speed wind.grb -match "(UGRD|VGRD)" +#../wgrib2/wgrib2 wind.grb > wind.txt +#cat wind.txt +#diff -w wind.txt data/ref_wind.gdas.t12z.pgrb2.1p00.anl.75r.grib2.inv +#../wgrib2/wgrib2 wind.grb -wind_uv uv.grb +#../wgrib2/wgrib2 uv.grb > uv.txt +#cat uv.txt +#diff -w uv.txt data/ref_uv.gdas.t12z.pgrb2.1p00.anl.75r.grib2.inv echo "*** Testing grid information" ../wgrib2/wgrib2 data/gdaswave.t00z.wcoast.0p16.f000.grib2 -grid > grid_test.txt From 6113f14a0a1d3f114cca4a4644ad8770c41def07 Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Tue, 9 Jul 2024 09:49:35 -0700 Subject: [PATCH 2/3] another test --- tests/run_wgrib2_tests.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/run_wgrib2_tests.sh b/tests/run_wgrib2_tests.sh index 663240ed..936a9139 100755 --- a/tests/run_wgrib2_tests.sh +++ b/tests/run_wgrib2_tests.sh @@ -96,10 +96,10 @@ echo "*** Testing import_bin" touch bin2grib.txt diff -w bin2grib.txt simple.txt -echo "*** Testing spread output" -../wgrib2/wgrib2 data/ref_simple_packing.grib2 -v2 -spread spread.txt -touch spread.txt -diff -w data/ref_simple_packing.grib2.spread.txt spread.txt +#echo "*** Testing spread output" +#../wgrib2/wgrib2 data/ref_simple_packing.grib2 -v2 -spread spread.txt +#touch spread.txt +#diff -w data/ref_simple_packing.grib2.spread.txt spread.txt echo "*** Testing write/read section" ../wgrib2/wgrib2 data/ref_simple_packing.grib2 -write_sec 0 sec0.dat -write_sec 1 sec1.dat \ From df273abb66e4be1136b720d34e08ed4e804fea52 Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Wed, 10 Jul 2024 08:46:03 -0700 Subject: [PATCH 3/3] only commenting out diff lines --- tests/run_wgrib2_rpn_tests.sh | 22 +++++++++++----------- tests/run_wgrib2_tests.sh | 20 ++++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/tests/run_wgrib2_rpn_tests.sh b/tests/run_wgrib2_rpn_tests.sh index fbe86d62..f2eaf380 100644 --- a/tests/run_wgrib2_rpn_tests.sh +++ b/tests/run_wgrib2_rpn_tests.sh @@ -24,21 +24,21 @@ echo "*** Takes relative humidity values, limits them to 100 and outputs to grib touch rh.txt diff -w rh.txt data/ref_rh.gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt -#echo "*** Calculates wind speed for records 1-25, then returns the average, min, and max values" -#../wgrib2/wgrib2 data/gdas.t12z.pgrb2.1p00.anl.75r.grib2 -for 1:25 -match ":(UGRD|VGRD):" \ -# -if ":UGRD:" -rpn "sto_1" -fi \ -# -if ":VGRD:" -rpn "sto_2" -fi \ -# -if_reg 1:2 \ -# -rpn "rcl_1:sq:rcl_2:sq:+:sqrt:clr_1:clr_2" \ -# -set_var WIND \ -# -grib_out tmp_windspeed.grb +echo "*** Calculates wind speed for records 1-25, then returns the average, min, and max values" +../wgrib2/wgrib2 data/gdas.t12z.pgrb2.1p00.anl.75r.grib2 -for 1:25 -match ":(UGRD|VGRD):" \ + -if ":UGRD:" -rpn "sto_1" -fi \ + -if ":VGRD:" -rpn "sto_2" -fi \ + -if_reg 1:2 \ + -rpn "rcl_1:sq:rcl_2:sq:+:sqrt:clr_1:clr_2" \ + -set_var WIND \ + -grib_out tmp_windspeed.grb # Check output -#../wgrib2/wgrib2 tmp_windspeed.grb -text tmp_windspeed.txt +../wgrib2/wgrib2 tmp_windspeed.grb -text 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 +../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 echo "*** SUCCESS!" diff --git a/tests/run_wgrib2_tests.sh b/tests/run_wgrib2_tests.sh index 936a9139..fbabce13 100755 --- a/tests/run_wgrib2_tests.sh +++ b/tests/run_wgrib2_tests.sh @@ -22,14 +22,14 @@ echo "*** Testing calculation of number of grid points" ../wgrib2/wgrib2 data/gdaswave.t00z.wcoast.0p16.f000.grib2 -npts > npts.txt cat npts.txt -#echo "*** Testing calculation of wind speed, direction, and UGRD & VGRD components" -#../wgrib2/wgrib2 data/gdas.t12z.pgrb2.1p00.anl.75r.grib2 -wind_dir wind.grb -wind_speed wind.grb -match "(UGRD|VGRD)" -#../wgrib2/wgrib2 wind.grb > wind.txt -#cat wind.txt +echo "*** Testing calculation of wind speed, direction, and UGRD & VGRD components" +../wgrib2/wgrib2 data/gdas.t12z.pgrb2.1p00.anl.75r.grib2 -wind_dir wind.grb -wind_speed wind.grb -match "(UGRD|VGRD)" +../wgrib2/wgrib2 wind.grb > wind.txt +cat wind.txt #diff -w wind.txt data/ref_wind.gdas.t12z.pgrb2.1p00.anl.75r.grib2.inv -#../wgrib2/wgrib2 wind.grb -wind_uv uv.grb -#../wgrib2/wgrib2 uv.grb > uv.txt -#cat uv.txt +../wgrib2/wgrib2 wind.grb -wind_uv uv.grb +../wgrib2/wgrib2 uv.grb > uv.txt +cat uv.txt #diff -w uv.txt data/ref_uv.gdas.t12z.pgrb2.1p00.anl.75r.grib2.inv echo "*** Testing grid information" @@ -96,9 +96,9 @@ echo "*** Testing import_bin" touch bin2grib.txt diff -w bin2grib.txt simple.txt -#echo "*** Testing spread output" -#../wgrib2/wgrib2 data/ref_simple_packing.grib2 -v2 -spread spread.txt -#touch spread.txt +echo "*** Testing spread output" +../wgrib2/wgrib2 data/ref_simple_packing.grib2 -v2 -spread spread.txt +touch spread.txt #diff -w data/ref_simple_packing.grib2.spread.txt spread.txt echo "*** Testing write/read section"