Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlysonStahl-NOAA committed Jul 25, 2024
1 parent c3204b6 commit 6126a48
Show file tree
Hide file tree
Showing 3 changed files with 77 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 @@ -150,6 +150,7 @@ if (USE_IPOLATES)
copy_test_data(ref_new_grid_ncep_t574.txt)
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)
endif()
if (USE_AEC)
shell_test(run_wgrib2_aec_tests)
Expand Down
70 changes: 70 additions & 0 deletions tests/data/ref_mercator_grid.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
1:0:grid_template=10:winds(N/S):
Mercator grid: (361 x 91) LatD 0.000000 input WE:SN output WE:SN res 48
lat 0.000000 to 90.000000 by 1.000000 m
lon 0.000000 to 360.000000 by 1.000000 m
orientation 0.000000:12Z26apr2024:UGRD U-Component of Wind [m/s]:lvl1=(100,1) lvl2=(255,missing):0.01 mb:anl:
2:28924:grid_template=10:winds(N/S):
Mercator grid: (361 x 91) LatD 0.000000 input WE:SN output WE:SN res 48
lat 0.000000 to 90.000000 by 1.000000 m
lon 0.000000 to 360.000000 by 1.000000 m
orientation 0.000000:12Z26apr2024:VGRD V-Component of Wind [m/s]:lvl1=(100,1) lvl2=(255,missing):0.01 mb:anl:
3:57848:grid_template=10:winds(N/S):
Mercator grid: (361 x 91) LatD 0.000000 input WE:SN output WE:SN res 48
lat 0.000000 to 90.000000 by 1.000000 m
lon 0.000000 to 360.000000 by 1.000000 m
orientation 0.000000:12Z26apr2024:UGRD U-Component of Wind [m/s]:lvl1=(100,2) lvl2=(255,missing):0.02 mb:anl:
4:82666:grid_template=10:winds(N/S):
Mercator grid: (361 x 91) LatD 0.000000 input WE:SN output WE:SN res 48
lat 0.000000 to 90.000000 by 1.000000 m
lon 0.000000 to 360.000000 by 1.000000 m
orientation 0.000000:12Z26apr2024:VGRD V-Component of Wind [m/s]:lvl1=(100,2) lvl2=(255,missing):0.02 mb:anl:
5:107484:grid_template=10:winds(N/S):
Mercator grid: (361 x 91) LatD 0.000000 input WE:SN output WE:SN res 48
lat 0.000000 to 90.000000 by 1.000000 m
lon 0.000000 to 360.000000 by 1.000000 m
orientation 0.000000:12Z26apr2024:UGRD U-Component of Wind [m/s]:lvl1=(100,4) lvl2=(255,missing):0.04 mb:anl:
6:132302:grid_template=10:winds(N/S):
Mercator grid: (361 x 91) LatD 0.000000 input WE:SN output WE:SN res 48
lat 0.000000 to 90.000000 by 1.000000 m
lon 0.000000 to 360.000000 by 1.000000 m
orientation 0.000000:12Z26apr2024:VGRD V-Component of Wind [m/s]:lvl1=(100,4) lvl2=(255,missing):0.04 mb:anl:
7:157120:grid_template=10:winds(N/S):
Mercator grid: (361 x 91) LatD 0.000000 input WE:SN output WE:SN res 48
lat 0.000000 to 90.000000 by 1.000000 m
lon 0.000000 to 360.000000 by 1.000000 m
orientation 0.000000:12Z26apr2024:UGRD U-Component of Wind [m/s]:lvl1=(100,7) lvl2=(255,missing):0.07 mb:anl:
8:181938:grid_template=10:winds(N/S):
Mercator grid: (361 x 91) LatD 0.000000 input WE:SN output WE:SN res 48
lat 0.000000 to 90.000000 by 1.000000 m
lon 0.000000 to 360.000000 by 1.000000 m
orientation 0.000000:12Z26apr2024:VGRD V-Component of Wind [m/s]:lvl1=(100,7) lvl2=(255,missing):0.07 mb:anl:
9:206756:grid_template=10:winds(N/S):
Mercator grid: (361 x 91) LatD 0.000000 input WE:SN output WE:SN res 48
lat 0.000000 to 90.000000 by 1.000000 m
lon 0.000000 to 360.000000 by 1.000000 m
orientation 0.000000:12Z26apr2024:UGRD U-Component of Wind [m/s]:lvl1=(100,10) lvl2=(255,missing):0.1 mb:anl:
10:231574:grid_template=10:winds(N/S):
Mercator grid: (361 x 91) LatD 0.000000 input WE:SN output WE:SN res 48
lat 0.000000 to 90.000000 by 1.000000 m
lon 0.000000 to 360.000000 by 1.000000 m
orientation 0.000000:12Z26apr2024:VGRD V-Component of Wind [m/s]:lvl1=(100,10) lvl2=(255,missing):0.1 mb:anl:
11:256392:grid_template=10:winds(N/S):
Mercator grid: (361 x 91) LatD 0.000000 input WE:SN output WE:SN res 48
lat 0.000000 to 90.000000 by 1.000000 m
lon 0.000000 to 360.000000 by 1.000000 m
orientation 0.000000:12Z26apr2024:UGRD U-Component of Wind [m/s]:lvl1=(100,20) lvl2=(255,missing):0.2 mb:anl:
12:281210:grid_template=10:winds(N/S):
Mercator grid: (361 x 91) LatD 0.000000 input WE:SN output WE:SN res 48
lat 0.000000 to 90.000000 by 1.000000 m
lon 0.000000 to 360.000000 by 1.000000 m
orientation 0.000000:12Z26apr2024:VGRD V-Component of Wind [m/s]:lvl1=(100,20) lvl2=(255,missing):0.2 mb:anl:
13:306028:grid_template=10:winds(N/S):
Mercator grid: (361 x 91) LatD 0.000000 input WE:SN output WE:SN res 48
lat 0.000000 to 90.000000 by 1.000000 m
lon 0.000000 to 360.000000 by 1.000000 m
orientation 0.000000:12Z26apr2024:UGRD U-Component of Wind [m/s]:lvl1=(100,40) lvl2=(255,missing):0.4 mb:anl:
14:330846:grid_template=10:winds(N/S):
Mercator grid: (361 x 91) LatD 0.000000 input WE:SN output WE:SN res 48
lat 0.000000 to 90.000000 by 1.000000 m
lon 0.000000 to 360.000000 by 1.000000 m
orientation 0.000000:12Z26apr2024:VGRD V-Component of Wind [m/s]:lvl1=(100,40) lvl2=(255,missing):0.4 mb:anl:
6 changes: 6 additions & 0 deletions tests/run_ipolates_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,11 @@ echo "*** Testing conversion to NCEP grid definition t1534"
touch ncep_grid_t1534.txt
diff -w ncep_grid_t1534.txt data/ref_new_grid_ncep_t1534.txt

echo "*** Testing conversion to Mercator grid"
../wgrib2/wgrib2 test.grb -new_grid_winds earth -new_grid mercator:0 0:361:1:360 0:91:1:90 junk.grb
../wgrib2/wgrib2 junk.grb -grid -v2 -s > mercator_grid.txt
touch mercator_grid.txt
diff -w mercator_grid.txt data/ref_mercator_grid.txt

echo "*** SUCCESS!"
exit 0

0 comments on commit 6126a48

Please sign in to comment.