From 853913d795b5303be62a635e4a268a91478d568c Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Thu, 9 May 2024 12:19:04 -0600 Subject: [PATCH 01/13] setting up ipolates tests --- tests/CMakeLists.txt | 4 +++- tests/run_ipolates_tests.sh | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 tests/run_ipolates_tests.sh diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 21ea8e4a..ff392de3 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -107,7 +107,9 @@ endif() if (USE_NETCDF3) shell_test(run_wgrib2_netcdf3_tests) endif() - +if (USE_IPOLATES=1) + shell_test(run_ipolates_tests) +endif if (USE_AEC) shell_test(run_wgrib2_aec_tests) endif() diff --git a/tests/run_ipolates_tests.sh b/tests/run_ipolates_tests.sh new file mode 100644 index 00000000..790f3c58 --- /dev/null +++ b/tests/run_ipolates_tests.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# This checks the use of ip external library, only available if USE_IPOLATES is turned on in CMake. +# +# Alyson Stahl 5/9/2024 + +set -e From 8e5872cc6d047bc890604d809986742db1c3b286 Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Thu, 9 May 2024 12:25:08 -0600 Subject: [PATCH 02/13] typo --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ff392de3..1bc40668 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -109,7 +109,7 @@ if (USE_NETCDF3) endif() if (USE_IPOLATES=1) shell_test(run_ipolates_tests) -endif +endif() if (USE_AEC) shell_test(run_wgrib2_aec_tests) endif() From 0c74c10be79e871e04765144174d16a4db0c320f Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Mon, 20 May 2024 12:47:05 -0600 Subject: [PATCH 03/13] testing commands in CI --- .github/workflows/developer.yml | 2 +- tests/run_ipolates_tests.sh | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/developer.yml b/.github/workflows/developer.yml index 2c323909..146317bb 100644 --- a/.github/workflows/developer.yml +++ b/.github/workflows/developer.yml @@ -105,7 +105,7 @@ jobs: export CFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0' export FCFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0' export FFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0' - cmake .. -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data + cmake .. -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data -DUSE_IPOLATES=1 make VERBOSE=1 ctest --verbose --output-on-failure --rerun-failed gcovr --root .. -v --html-details --exclude ../tests --exclude CMakeFiles --print-summary -o test-coverage.html &> /dev/null diff --git a/tests/run_ipolates_tests.sh b/tests/run_ipolates_tests.sh index 790f3c58..c4639a63 100644 --- a/tests/run_ipolates_tests.sh +++ b/tests/run_ipolates_tests.sh @@ -1,6 +1,10 @@ #!/bin/sh -# This checks the use of ip external library, only available if USE_IPOLATES is turned on in CMake. +# This checks the use of ip external library, only available if USE_IPOLATES=1 CMake. # # Alyson Stahl 5/9/2024 set -e + +../wgrib2/wgrib2.exe data/tmp_int.grb -new_grid_winds earth -new_grid latlon 0:359:1 0:90:1 OUT.grb +echo "*** SUCCESS!" +exit 0 \ No newline at end of file From 583b6f8e2617efaa6ff2ddd12623234dca465180 Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Mon, 20 May 2024 12:53:52 -0600 Subject: [PATCH 04/13] Update developer.yml --- .github/workflows/developer.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/developer.yml b/.github/workflows/developer.yml index 146317bb..7874e241 100644 --- a/.github/workflows/developer.yml +++ b/.github/workflows/developer.yml @@ -69,6 +69,22 @@ jobs: make -j2 make install + - name: checkout-ip + uses: actions/checkout@v4 + with: + repository: NOAA-EMC/NCEPLIBS-ip + path: ip + ref: v3.3.3 + + - name: build-ip + run: | + cd ip + mkdir build + cd build + cmake .. -DCMAKE_INSTALL_PREFIX=~/ip -DCMAKE_PREFIX_PATH=~/sp + make -j2 + make install + - name: checkout-ip2 uses: actions/checkout@v4 with: From 9f17501cfc869c0d882859dcdb9364f8a16707fc Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Mon, 20 May 2024 12:55:59 -0600 Subject: [PATCH 05/13] Update developer.yml --- .github/workflows/developer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/developer.yml b/.github/workflows/developer.yml index 7874e241..c51f1341 100644 --- a/.github/workflows/developer.yml +++ b/.github/workflows/developer.yml @@ -121,7 +121,7 @@ jobs: export CFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0' export FCFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0' export FFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0' - cmake .. -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data -DUSE_IPOLATES=1 + cmake .. -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data -DUSE_IPOLATES=1 -DCMAKE_PREFIX_PATH="~/sp;~/ip;~/ip2" make VERBOSE=1 ctest --verbose --output-on-failure --rerun-failed gcovr --root .. -v --html-details --exclude ../tests --exclude CMakeFiles --print-summary -o test-coverage.html &> /dev/null From 938ee3c7d47755d4c76469023d1985fbeef25ab1 Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Mon, 20 May 2024 12:58:09 -0600 Subject: [PATCH 06/13] Update CMakeLists.txt --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 8d1110c9..1099161f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -118,7 +118,7 @@ endif() if (USE_NETCDF3) shell_test(run_wgrib2_netcdf3_tests) endif() -if (USE_IPOLATES=1) +if (USE_IPOLATES EQUAL 1) shell_test(run_ipolates_tests) endif() if (USE_AEC) From 865631a5f7ab090bf6e43d406b61c38dc71b9c2d Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Mon, 20 May 2024 13:00:10 -0600 Subject: [PATCH 07/13] Update run_ipolates_tests.sh --- tests/run_ipolates_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run_ipolates_tests.sh b/tests/run_ipolates_tests.sh index c4639a63..195d00dd 100644 --- a/tests/run_ipolates_tests.sh +++ b/tests/run_ipolates_tests.sh @@ -5,6 +5,6 @@ set -e -../wgrib2/wgrib2.exe data/tmp_int.grb -new_grid_winds earth -new_grid latlon 0:359:1 0:90:1 OUT.grb +../wgrib2/wgrib2 data/tmp_int.grb -new_grid_winds earth -new_grid latlon 0:359:1 0:90:1 OUT.grb echo "*** SUCCESS!" exit 0 \ No newline at end of file From 832b00b9f9ed49cebac6aa026343d5059e64f343 Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Mon, 20 May 2024 13:08:12 -0600 Subject: [PATCH 08/13] Update run_ipolates_tests.sh --- tests/run_ipolates_tests.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/run_ipolates_tests.sh b/tests/run_ipolates_tests.sh index 195d00dd..0a9bc0e1 100644 --- a/tests/run_ipolates_tests.sh +++ b/tests/run_ipolates_tests.sh @@ -3,8 +3,9 @@ # # Alyson Stahl 5/9/2024 -set -e +#set -e ../wgrib2/wgrib2 data/tmp_int.grb -new_grid_winds earth -new_grid latlon 0:359:1 0:90:1 OUT.grb + echo "*** SUCCESS!" exit 0 \ No newline at end of file From e5924dc82fba0f2e25b027e21d94d22167ae4d7e Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Fri, 5 Jul 2024 09:50:27 -0700 Subject: [PATCH 09/13] turn existing test back on --- tests/CMakeLists.txt | 2 +- tests/run_ipolates_tests.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f0a46965..a827fe53 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -120,7 +120,7 @@ endif() if (USE_NETCDF3) shell_test(run_wgrib2_netcdf3_tests) endif() -if (USE_IPOLATES EQUAL 1) +if (USE_IPOLATES) shell_test(run_ipolates_tests) endif() if (USE_AEC) diff --git a/tests/run_ipolates_tests.sh b/tests/run_ipolates_tests.sh index 0a9bc0e1..78b1f4b8 100644 --- a/tests/run_ipolates_tests.sh +++ b/tests/run_ipolates_tests.sh @@ -1,11 +1,11 @@ #!/bin/sh -# This checks the use of ip external library, only available if USE_IPOLATES=1 CMake. +# This checks the use of ip external library, only available if USE_IPOLATES=ON CMake. # # Alyson Stahl 5/9/2024 -#set -e +set -e -../wgrib2/wgrib2 data/tmp_int.grb -new_grid_winds earth -new_grid latlon 0:359:1 0:90:1 OUT.grb +../wgrib2/wgrib2 data/ref_simple_packing.grib2 -new_grid_winds earth -new_grid latlon 0:359:1 0:90:1 OUT.grb echo "*** SUCCESS!" exit 0 \ No newline at end of file From 0aa4400cd18b0adc9aebfd962f0c27edd35ed399 Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Fri, 5 Jul 2024 10:45:40 -0700 Subject: [PATCH 10/13] update test --- tests/CMakeLists.txt | 1 + ...rid_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt | 84 +++++++++++++++++++ tests/run_ipolates_tests.sh | 6 +- 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 tests/data/ref_new_grid_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a827fe53..009c5c59 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -106,6 +106,7 @@ copy_test_data(ref_sec0.gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt) copy_test_data(ref_sec_len.gdaswave.t00z.wcoast.0p16.f000.grib2.txt) copy_test_data(ref_sec_len.simple_packing.grib2.txt) copy_test_data(ref_simple_packing.grib2.spread.txt) +copy_test_data(ref_new_grid_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt) # Run these shell tests. shell_test(run_wgrib2_tests) diff --git a/tests/data/ref_new_grid_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt b/tests/data/ref_new_grid_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt new file mode 100644 index 00000000..b7494e93 --- /dev/null +++ b/tests/data/ref_new_grid_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt @@ -0,0 +1,84 @@ +1:0:grid_template=0:winds(grid): + lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 89.000000 by 1.000000 + lon 0.000000 to 358.000000 by 1.000000 #points=32310 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 89000000 lon=0 to 358000000 +2:179:grid_template=0:winds(grid): + lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 89.000000 by 1.000000 + lon 0.000000 to 358.000000 by 1.000000 #points=32310 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 89000000 lon=0 to 358000000 +3:358:grid_template=0:winds(grid): + lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 89.000000 by 1.000000 + lon 0.000000 to 358.000000 by 1.000000 #points=32310 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 89000000 lon=0 to 358000000 +4:537:grid_template=0:winds(grid): + lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 89.000000 by 1.000000 + lon 0.000000 to 358.000000 by 1.000000 #points=32310 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 89000000 lon=0 to 358000000 +5:716:grid_template=0:winds(grid): + lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 89.000000 by 1.000000 + lon 0.000000 to 358.000000 by 1.000000 #points=32310 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 89000000 lon=0 to 358000000 +6:895:grid_template=0:winds(grid): + lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 89.000000 by 1.000000 + lon 0.000000 to 358.000000 by 1.000000 #points=32310 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 89000000 lon=0 to 358000000 +7:1074:grid_template=0:winds(grid): + lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 89.000000 by 1.000000 + lon 0.000000 to 358.000000 by 1.000000 #points=32310 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 89000000 lon=0 to 358000000 +8:1253:grid_template=0:winds(grid): + lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 89.000000 by 1.000000 + lon 0.000000 to 358.000000 by 1.000000 #points=32310 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 89000000 lon=0 to 358000000 +9:1432:grid_template=0:winds(grid): + lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 89.000000 by 1.000000 + lon 0.000000 to 358.000000 by 1.000000 #points=32310 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 89000000 lon=0 to 358000000 +10:1611:grid_template=0:winds(grid): + lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 89.000000 by 1.000000 + lon 0.000000 to 358.000000 by 1.000000 #points=32310 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 89000000 lon=0 to 358000000 +11:1790:grid_template=0:winds(grid): + lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 89.000000 by 1.000000 + lon 0.000000 to 358.000000 by 1.000000 #points=32310 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 89000000 lon=0 to 358000000 +12:1969:grid_template=0:winds(grid): + lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 89.000000 by 1.000000 + lon 0.000000 to 358.000000 by 1.000000 #points=32310 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 89000000 lon=0 to 358000000 +13:2148:grid_template=0:winds(grid): + lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 89.000000 by 1.000000 + lon 0.000000 to 358.000000 by 1.000000 #points=32310 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 89000000 lon=0 to 358000000 +14:2327:grid_template=0:winds(grid): + lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 89.000000 by 1.000000 + lon 0.000000 to 358.000000 by 1.000000 #points=32310 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 89000000 lon=0 to 358000000 diff --git a/tests/run_ipolates_tests.sh b/tests/run_ipolates_tests.sh index 78b1f4b8..8d3516dd 100644 --- a/tests/run_ipolates_tests.sh +++ b/tests/run_ipolates_tests.sh @@ -5,7 +5,11 @@ set -e -../wgrib2/wgrib2 data/ref_simple_packing.grib2 -new_grid_winds earth -new_grid latlon 0:359:1 0:90:1 OUT.grb +../wgrib2/wgrib2 data/gdas.t12z.pgrb2.1p00.anl.75r.grib2 -match "(UGRD|VGRD)" -new_grid_winds grid \ + -new_grid latlon 0:359:1 0:90:1 new_grid.grb +../wgrib2/wgrib2 new_grid.grb -grid -v2 > new_grid.txt +touch new_grid.txt +diff -w new_grid.txt data/ref_new_grid_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt echo "*** SUCCESS!" exit 0 \ No newline at end of file From 71ffcf24ff36998f50b06b4f5b872bd10b9ee692 Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Fri, 5 Jul 2024 10:49:39 -0700 Subject: [PATCH 11/13] Update developer.yml --- .github/workflows/developer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/developer.yml b/.github/workflows/developer.yml index 695a6271..c5faa784 100644 --- a/.github/workflows/developer.yml +++ b/.github/workflows/developer.yml @@ -137,7 +137,7 @@ jobs: export CFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0' export FCFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0' export FFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0' - cmake .. -DFTP_TEST_FILES=ON -DCMAKE_PREFIX_PATH="~/ip;~/ip2" -DTEST_FILE_DIR=/home/runner/data -DUSE_NETCDF4=ON -DUSE_AEC=ON -DUSE_IPOLATES=1 + cmake .. -DFTP_TEST_FILES=ON -DCMAKE_PREFIX_PATH="~/ip;~/ip2;~/sp" -DTEST_FILE_DIR=/home/runner/data -DUSE_NETCDF4=ON -DUSE_AEC=ON -DUSE_IPOLATES=ON make VERBOSE=1 ctest --verbose --output-on-failure --rerun-failed gcovr --root .. -v --html-details --exclude ../tests --exclude CMakeFiles --print-summary -o test-coverage.html &> /dev/null From 83efcced8fcea1fb252fc2378d3c560d63b67f5c Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Fri, 5 Jul 2024 10:58:43 -0700 Subject: [PATCH 12/13] trying to force CI to run --- tests/run_ipolates_tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/run_ipolates_tests.sh b/tests/run_ipolates_tests.sh index 8d3516dd..93cdcaf9 100644 --- a/tests/run_ipolates_tests.sh +++ b/tests/run_ipolates_tests.sh @@ -11,5 +11,6 @@ set -e touch new_grid.txt diff -w new_grid.txt data/ref_new_grid_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt + echo "*** SUCCESS!" exit 0 \ No newline at end of file From 123000b2e47eef3ebb6e2ef96723793d1e22e6a1 Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Fri, 5 Jul 2024 12:35:26 -0700 Subject: [PATCH 13/13] added test --- tests/CMakeLists.txt | 1 + ...rth_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt | 84 +++++++++++++ ...rid_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt | 112 +++++++++--------- tests/run_ipolates_tests.sh | 9 +- 4 files changed, 149 insertions(+), 57 deletions(-) create mode 100644 tests/data/ref_new_grid_earth_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 009c5c59..0f25a28e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -107,6 +107,7 @@ copy_test_data(ref_sec_len.gdaswave.t00z.wcoast.0p16.f000.grib2.txt) copy_test_data(ref_sec_len.simple_packing.grib2.txt) copy_test_data(ref_simple_packing.grib2.spread.txt) copy_test_data(ref_new_grid_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt) +copy_test_data(ref_new_grid_earth_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt) # Run these shell tests. shell_test(run_wgrib2_tests) diff --git a/tests/data/ref_new_grid_earth_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt b/tests/data/ref_new_grid_earth_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt new file mode 100644 index 00000000..0c1ab74d --- /dev/null +++ b/tests/data/ref_new_grid_earth_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt @@ -0,0 +1,84 @@ +1:0:grid_template=0:winds(N/S): + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 48 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 180000000 lon=0 to 359000000 +2:8324:grid_template=0:winds(N/S): + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 48 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 180000000 lon=0 to 359000000 +3:16648:grid_template=0:winds(N/S): + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 48 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 180000000 lon=0 to 359000000 +4:24972:grid_template=0:winds(N/S): + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 48 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 180000000 lon=0 to 359000000 +5:33296:grid_template=0:winds(N/S): + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 48 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 180000000 lon=0 to 359000000 +6:41620:grid_template=0:winds(N/S): + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 48 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 180000000 lon=0 to 359000000 +7:49944:grid_template=0:winds(N/S): + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 48 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 180000000 lon=0 to 359000000 +8:58268:grid_template=0:winds(N/S): + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 48 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 180000000 lon=0 to 359000000 +9:66592:grid_template=0:winds(N/S): + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 48 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 180000000 lon=0 to 359000000 +10:74916:grid_template=0:winds(N/S): + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 48 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 180000000 lon=0 to 359000000 +11:83240:grid_template=0:winds(N/S): + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 48 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 180000000 lon=0 to 359000000 +12:91564:grid_template=0:winds(N/S): + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 48 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 180000000 lon=0 to 359000000 +13:99888:grid_template=0:winds(N/S): + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 48 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 180000000 lon=0 to 359000000 +14:108212:grid_template=0:winds(N/S): + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 48 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 + basic_ang=0 sub_angle=1000000 units=0.000001 + unscaled lat=0 to 180000000 lon=0 to 359000000 diff --git a/tests/data/ref_new_grid_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt b/tests/data/ref_new_grid_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt index b7494e93..b8a43f49 100644 --- a/tests/data/ref_new_grid_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt +++ b/tests/data/ref_new_grid_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt @@ -1,84 +1,84 @@ 1:0:grid_template=0:winds(grid): - lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 - lat 0.000000 to 89.000000 by 1.000000 - lon 0.000000 to 358.000000 by 1.000000 #points=32310 + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 basic_ang=0 sub_angle=1000000 units=0.000001 - unscaled lat=0 to 89000000 lon=0 to 358000000 + unscaled lat=0 to 180000000 lon=0 to 359000000 2:179:grid_template=0:winds(grid): - lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 - lat 0.000000 to 89.000000 by 1.000000 - lon 0.000000 to 358.000000 by 1.000000 #points=32310 + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 basic_ang=0 sub_angle=1000000 units=0.000001 - unscaled lat=0 to 89000000 lon=0 to 358000000 + unscaled lat=0 to 180000000 lon=0 to 359000000 3:358:grid_template=0:winds(grid): - lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 - lat 0.000000 to 89.000000 by 1.000000 - lon 0.000000 to 358.000000 by 1.000000 #points=32310 + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 basic_ang=0 sub_angle=1000000 units=0.000001 - unscaled lat=0 to 89000000 lon=0 to 358000000 + unscaled lat=0 to 180000000 lon=0 to 359000000 4:537:grid_template=0:winds(grid): - lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 - lat 0.000000 to 89.000000 by 1.000000 - lon 0.000000 to 358.000000 by 1.000000 #points=32310 + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 basic_ang=0 sub_angle=1000000 units=0.000001 - unscaled lat=0 to 89000000 lon=0 to 358000000 + unscaled lat=0 to 180000000 lon=0 to 359000000 5:716:grid_template=0:winds(grid): - lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 - lat 0.000000 to 89.000000 by 1.000000 - lon 0.000000 to 358.000000 by 1.000000 #points=32310 + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 basic_ang=0 sub_angle=1000000 units=0.000001 - unscaled lat=0 to 89000000 lon=0 to 358000000 + unscaled lat=0 to 180000000 lon=0 to 359000000 6:895:grid_template=0:winds(grid): - lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 - lat 0.000000 to 89.000000 by 1.000000 - lon 0.000000 to 358.000000 by 1.000000 #points=32310 + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 basic_ang=0 sub_angle=1000000 units=0.000001 - unscaled lat=0 to 89000000 lon=0 to 358000000 + unscaled lat=0 to 180000000 lon=0 to 359000000 7:1074:grid_template=0:winds(grid): - lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 - lat 0.000000 to 89.000000 by 1.000000 - lon 0.000000 to 358.000000 by 1.000000 #points=32310 + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 basic_ang=0 sub_angle=1000000 units=0.000001 - unscaled lat=0 to 89000000 lon=0 to 358000000 + unscaled lat=0 to 180000000 lon=0 to 359000000 8:1253:grid_template=0:winds(grid): - lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 - lat 0.000000 to 89.000000 by 1.000000 - lon 0.000000 to 358.000000 by 1.000000 #points=32310 + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 basic_ang=0 sub_angle=1000000 units=0.000001 - unscaled lat=0 to 89000000 lon=0 to 358000000 + unscaled lat=0 to 180000000 lon=0 to 359000000 9:1432:grid_template=0:winds(grid): - lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 - lat 0.000000 to 89.000000 by 1.000000 - lon 0.000000 to 358.000000 by 1.000000 #points=32310 + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 basic_ang=0 sub_angle=1000000 units=0.000001 - unscaled lat=0 to 89000000 lon=0 to 358000000 + unscaled lat=0 to 180000000 lon=0 to 359000000 10:1611:grid_template=0:winds(grid): - lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 - lat 0.000000 to 89.000000 by 1.000000 - lon 0.000000 to 358.000000 by 1.000000 #points=32310 + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 basic_ang=0 sub_angle=1000000 units=0.000001 - unscaled lat=0 to 89000000 lon=0 to 358000000 + unscaled lat=0 to 180000000 lon=0 to 359000000 11:1790:grid_template=0:winds(grid): - lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 - lat 0.000000 to 89.000000 by 1.000000 - lon 0.000000 to 358.000000 by 1.000000 #points=32310 + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 basic_ang=0 sub_angle=1000000 units=0.000001 - unscaled lat=0 to 89000000 lon=0 to 358000000 + unscaled lat=0 to 180000000 lon=0 to 359000000 12:1969:grid_template=0:winds(grid): - lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 - lat 0.000000 to 89.000000 by 1.000000 - lon 0.000000 to 358.000000 by 1.000000 #points=32310 + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 basic_ang=0 sub_angle=1000000 units=0.000001 - unscaled lat=0 to 89000000 lon=0 to 358000000 + unscaled lat=0 to 180000000 lon=0 to 359000000 13:2148:grid_template=0:winds(grid): - lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 - lat 0.000000 to 89.000000 by 1.000000 - lon 0.000000 to 358.000000 by 1.000000 #points=32310 + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 basic_ang=0 sub_angle=1000000 units=0.000001 - unscaled lat=0 to 89000000 lon=0 to 358000000 + unscaled lat=0 to 180000000 lon=0 to 359000000 14:2327:grid_template=0:winds(grid): - lat-lon grid:(359 x 90) units 1e-06 input WE:SN output WE:SN res 56 - lat 0.000000 to 89.000000 by 1.000000 - lon 0.000000 to 358.000000 by 1.000000 #points=32310 + lat-lon grid:(360 x 181) units 1e-06 input WE:SN output WE:SN res 56 + lat 0.000000 to 180.000000 by 1.000000 + lon 0.000000 to 359.000000 by 1.000000 #points=65160 basic_ang=0 sub_angle=1000000 units=0.000001 - unscaled lat=0 to 89000000 lon=0 to 358000000 + unscaled lat=0 to 180000000 lon=0 to 359000000 diff --git a/tests/run_ipolates_tests.sh b/tests/run_ipolates_tests.sh index 93cdcaf9..b15574f0 100644 --- a/tests/run_ipolates_tests.sh +++ b/tests/run_ipolates_tests.sh @@ -5,12 +5,19 @@ set -e +echo "*** Testing conversion from earth to grid" ../wgrib2/wgrib2 data/gdas.t12z.pgrb2.1p00.anl.75r.grib2 -match "(UGRD|VGRD)" -new_grid_winds grid \ - -new_grid latlon 0:359:1 0:90:1 new_grid.grb + -new_grid latlon 0:360:1 00:181:1 new_grid.grb ../wgrib2/wgrib2 new_grid.grb -grid -v2 > new_grid.txt touch new_grid.txt diff -w new_grid.txt data/ref_new_grid_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt +echo "*** Testing conversion from grid to earth" +../wgrib2/wgrib2 new_grid.grb -new_grid_winds earth \ + -new_grid latlon 0:360:1 00:181:1 new_grid_earth.grb +../wgrib2/wgrib2 new_grid_earth.grb -grid -v2 > new_grid_earth.txt +touch new_grid_earth.txt +diff -w new_grid_earth.txt data/ref_new_grid_earth_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt echo "*** SUCCESS!" exit 0 \ No newline at end of file