-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from AlysonStahl-NOAA/as_ip
Adding tests which test use of ip external library
- Loading branch information
Showing
5 changed files
with
213 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
tests/data/ref_new_grid_earth_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
84 changes: 84 additions & 0 deletions
84
tests/data/ref_new_grid_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
1:0:grid_template=0:winds(grid): | ||
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 180000000 lon=0 to 359000000 | ||
2:179:grid_template=0:winds(grid): | ||
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 180000000 lon=0 to 359000000 | ||
3:358:grid_template=0:winds(grid): | ||
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 180000000 lon=0 to 359000000 | ||
4:537:grid_template=0:winds(grid): | ||
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 180000000 lon=0 to 359000000 | ||
5:716:grid_template=0:winds(grid): | ||
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 180000000 lon=0 to 359000000 | ||
6:895:grid_template=0:winds(grid): | ||
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 180000000 lon=0 to 359000000 | ||
7:1074:grid_template=0:winds(grid): | ||
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 180000000 lon=0 to 359000000 | ||
8:1253:grid_template=0:winds(grid): | ||
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 180000000 lon=0 to 359000000 | ||
9:1432:grid_template=0:winds(grid): | ||
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 180000000 lon=0 to 359000000 | ||
10:1611:grid_template=0:winds(grid): | ||
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 180000000 lon=0 to 359000000 | ||
11:1790:grid_template=0:winds(grid): | ||
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 180000000 lon=0 to 359000000 | ||
12:1969:grid_template=0:winds(grid): | ||
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 180000000 lon=0 to 359000000 | ||
13:2148:grid_template=0:winds(grid): | ||
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 180000000 lon=0 to 359000000 | ||
14:2327:grid_template=0:winds(grid): | ||
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 180000000 lon=0 to 359000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
# This checks the use of ip external library, only available if USE_IPOLATES=ON CMake. | ||
# | ||
# Alyson Stahl 5/9/2024 | ||
|
||
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: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 |