Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding more tests #217

Merged
merged 7 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ option(USE_HDF5 "Use HDF5?" off)
option(USE_REGEX "Use Regex?" on)
option(USE_TIGGE "Use tigge?" on)
option(USE_MYSQL "Use MySQL?" off)
option(USE_IPOLATES "Use Ipolates" on)
option(USE_IPOLATES "Use Ipolates" off)
option(USE_UDF "Use UDF?" off)
option(USE_OPENMP "Use OpenMP?" on)
option(USE_PROJ4 "Use Proj4?" off)
Expand Down
31 changes: 29 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ 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)
copy_test_data(ref_new_grid_earth_gdas.t12z.pgrb2.1p00.anl.75r.grib2.txt)

# Run these shell tests.
shell_test(run_wgrib2_tests)
Expand All @@ -124,6 +122,35 @@ if (USE_NETCDF3)
endif()
if (USE_IPOLATES)
shell_test(run_ipolates_tests)
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)
copy_test_data(ref_new_grid_ncep_2.txt)
copy_test_data(ref_new_grid_ncep_3.txt)
copy_test_data(ref_new_grid_ncep_4.txt)
copy_test_data(ref_new_grid_ncep_45.txt)
copy_test_data(ref_new_grid_ncep_98.txt)
copy_test_data(ref_new_grid_ncep_126.txt)
copy_test_data(ref_new_grid_ncep_127.txt)
copy_test_data(ref_new_grid_ncep_128.txt)
copy_test_data(ref_new_grid_ncep_129.txt)
copy_test_data(ref_new_grid_ncep_170.txt)
copy_test_data(ref_new_grid_ncep_173.txt)
copy_test_data(ref_new_grid_ncep_184.txt)
copy_test_data(ref_new_grid_ncep_194.txt)
copy_test_data(ref_new_grid_ncep_221.txt)
copy_test_data(ref_new_grid_ncep_230.txt)
copy_test_data(ref_new_grid_ncep_242.txt)
copy_test_data(ref_new_grid_ncep_249.txt)
copy_test_data(ref_new_grid_ncep_t62.txt)
copy_test_data(ref_new_grid_ncep_t126.txt)
copy_test_data(ref_new_grid_ncep_t170.txt)
copy_test_data(ref_new_grid_ncep_t190.txt)
copy_test_data(ref_new_grid_ncep_t254.txt)
copy_test_data(ref_new_grid_ncep_t382.txt)
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:
98 changes: 98 additions & 0 deletions tests/data/ref_new_grid_ncep_126.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
1:0:grid_template=40:winds(N/S):
Gaussian grid: (384 x 190) units 1e-06 input WE:NS output WE:SN
number of latitudes between pole-equator=95 #points=72960
lat 89.276713 to -89.276713
lon 0.000000 to 359.062500 by 0.937500
basic_ang=0 sub_angle=1000000 units=0.000001
unscaled lat=89276713 to -89276713 lon=0 to 359062500:12Z26apr2024:UGRD U-Component of Wind [m/s]:lvl1=(100,1) lvl2=(255,missing):0.01 mb:anl::lon=10.312500,lat=11.810982,i=41100,ix=12,iy=108,val=-42.503:lon=19.687500,lat=79.841419,i=68758,ix=22,iy=180,val=-17.503
2:73139:grid_template=40:winds(N/S):
Gaussian grid: (384 x 190) units 1e-06 input WE:NS output WE:SN
number of latitudes between pole-equator=95 #points=72960
lat 89.276713 to -89.276713
lon 0.000000 to 359.062500 by 0.937500
basic_ang=0 sub_angle=1000000 units=0.000001
unscaled lat=89276713 to -89276713 lon=0 to 359062500:12Z26apr2024:VGRD V-Component of Wind [m/s]:lvl1=(100,1) lvl2=(255,missing):0.01 mb:anl::lon=10.312500,lat=11.810982,i=41100,ix=12,iy=108,val=-68.2211:lon=19.687500,lat=79.841419,i=68758,ix=22,iy=180,val=-17.2211
3:146278:grid_template=40:winds(N/S):
Gaussian grid: (384 x 190) units 1e-06 input WE:NS output WE:SN
number of latitudes between pole-equator=95 #points=72960
lat 89.276713 to -89.276713
lon 0.000000 to 359.062500 by 0.937500
basic_ang=0 sub_angle=1000000 units=0.000001
unscaled lat=89276713 to -89276713 lon=0 to 359062500:12Z26apr2024:UGRD U-Component of Wind [m/s]:lvl1=(100,2) lvl2=(255,missing):0.02 mb:anl::lon=10.312500,lat=11.810982,i=41100,ix=12,iy=108,val=-27.6889:lon=19.687500,lat=79.841419,i=68758,ix=22,iy=180,val=-13.6889
4:219417:grid_template=40:winds(N/S):
Gaussian grid: (384 x 190) units 1e-06 input WE:NS output WE:SN
number of latitudes between pole-equator=95 #points=72960
lat 89.276713 to -89.276713
lon 0.000000 to 359.062500 by 0.937500
basic_ang=0 sub_angle=1000000 units=0.000001
unscaled lat=89276713 to -89276713 lon=0 to 359062500:12Z26apr2024:VGRD V-Component of Wind [m/s]:lvl1=(100,2) lvl2=(255,missing):0.02 mb:anl::lon=10.312500,lat=11.810982,i=41100,ix=12,iy=108,val=-58.6219:lon=19.687500,lat=79.841419,i=68758,ix=22,iy=180,val=-22.6219
5:283436:grid_template=40:winds(N/S):
Gaussian grid: (384 x 190) units 1e-06 input WE:NS output WE:SN
number of latitudes between pole-equator=95 #points=72960
lat 89.276713 to -89.276713
lon 0.000000 to 359.062500 by 0.937500
basic_ang=0 sub_angle=1000000 units=0.000001
unscaled lat=89276713 to -89276713 lon=0 to 359062500:12Z26apr2024:UGRD U-Component of Wind [m/s]:lvl1=(100,4) lvl2=(255,missing):0.04 mb:anl::lon=10.312500,lat=11.810982,i=41100,ix=12,iy=108,val=-6.00193:lon=19.687500,lat=79.841419,i=68758,ix=22,iy=180,val=0.998074
6:356575:grid_template=40:winds(N/S):
Gaussian grid: (384 x 190) units 1e-06 input WE:NS output WE:SN
number of latitudes between pole-equator=95 #points=72960
lat 89.276713 to -89.276713
lon 0.000000 to 359.062500 by 0.937500
basic_ang=0 sub_angle=1000000 units=0.000001
unscaled lat=89276713 to -89276713 lon=0 to 359062500:12Z26apr2024:VGRD V-Component of Wind [m/s]:lvl1=(100,4) lvl2=(255,missing):0.04 mb:anl::lon=10.312500,lat=11.810982,i=41100,ix=12,iy=108,val=-26.8221:lon=19.687500,lat=79.841419,i=68758,ix=22,iy=180,val=-15.8221
7:420594:grid_template=40:winds(N/S):
Gaussian grid: (384 x 190) units 1e-06 input WE:NS output WE:SN
number of latitudes between pole-equator=95 #points=72960
lat 89.276713 to -89.276713
lon 0.000000 to 359.062500 by 0.937500
basic_ang=0 sub_angle=1000000 units=0.000001
unscaled lat=89276713 to -89276713 lon=0 to 359062500:12Z26apr2024:UGRD U-Component of Wind [m/s]:lvl1=(100,7) lvl2=(255,missing):0.07 mb:anl::lon=10.312500,lat=11.810982,i=41100,ix=12,iy=108,val=-2.67741:lon=19.687500,lat=79.841419,i=68758,ix=22,iy=180,val=10.3226
8:493733:grid_template=40:winds(N/S):
Gaussian grid: (384 x 190) units 1e-06 input WE:NS output WE:SN
number of latitudes between pole-equator=95 #points=72960
lat 89.276713 to -89.276713
lon 0.000000 to 359.062500 by 0.937500
basic_ang=0 sub_angle=1000000 units=0.000001
unscaled lat=89276713 to -89276713 lon=0 to 359062500:12Z26apr2024:VGRD V-Component of Wind [m/s]:lvl1=(100,7) lvl2=(255,missing):0.07 mb:anl::lon=10.312500,lat=11.810982,i=41100,ix=12,iy=108,val=7.26558:lon=19.687500,lat=79.841419,i=68758,ix=22,iy=180,val=-2.73442
9:557752:grid_template=40:winds(N/S):
Gaussian grid: (384 x 190) units 1e-06 input WE:NS output WE:SN
number of latitudes between pole-equator=95 #points=72960
lat 89.276713 to -89.276713
lon 0.000000 to 359.062500 by 0.937500
basic_ang=0 sub_angle=1000000 units=0.000001
unscaled lat=89276713 to -89276713 lon=0 to 359062500:12Z26apr2024:UGRD U-Component of Wind [m/s]:lvl1=(100,10) lvl2=(255,missing):0.1 mb:anl::lon=10.312500,lat=11.810982,i=41100,ix=12,iy=108,val=-10.8744:lon=19.687500,lat=79.841419,i=68758,ix=22,iy=180,val=8.12563
10:630891:grid_template=40:winds(N/S):
Gaussian grid: (384 x 190) units 1e-06 input WE:NS output WE:SN
number of latitudes between pole-equator=95 #points=72960
lat 89.276713 to -89.276713
lon 0.000000 to 359.062500 by 0.937500
basic_ang=0 sub_angle=1000000 units=0.000001
unscaled lat=89276713 to -89276713 lon=0 to 359062500:12Z26apr2024:VGRD V-Component of Wind [m/s]:lvl1=(100,10) lvl2=(255,missing):0.1 mb:anl::lon=10.312500,lat=11.810982,i=41100,ix=12,iy=108,val=11.4455:lon=19.687500,lat=79.841419,i=68758,ix=22,iy=180,val=-0.554543
11:694910:grid_template=40:winds(N/S):
Gaussian grid: (384 x 190) units 1e-06 input WE:NS output WE:SN
number of latitudes between pole-equator=95 #points=72960
lat 89.276713 to -89.276713
lon 0.000000 to 359.062500 by 0.937500
basic_ang=0 sub_angle=1000000 units=0.000001
unscaled lat=89276713 to -89276713 lon=0 to 359062500:12Z26apr2024:UGRD U-Component of Wind [m/s]:lvl1=(100,20) lvl2=(255,missing):0.2 mb:anl::lon=10.312500,lat=11.810982,i=41100,ix=12,iy=108,val=-7.9589:lon=19.687500,lat=79.841419,i=68758,ix=22,iy=180,val=9.0411
12:768049:grid_template=40:winds(N/S):
Gaussian grid: (384 x 190) units 1e-06 input WE:NS output WE:SN
number of latitudes between pole-equator=95 #points=72960
lat 89.276713 to -89.276713
lon 0.000000 to 359.062500 by 0.937500
basic_ang=0 sub_angle=1000000 units=0.000001
unscaled lat=89276713 to -89276713 lon=0 to 359062500:12Z26apr2024:VGRD V-Component of Wind [m/s]:lvl1=(100,20) lvl2=(255,missing):0.2 mb:anl::lon=10.312500,lat=11.810982,i=41100,ix=12,iy=108,val=13.0509:lon=19.687500,lat=79.841419,i=68758,ix=22,iy=180,val=8.05088
13:832068:grid_template=40:winds(N/S):
Gaussian grid: (384 x 190) units 1e-06 input WE:NS output WE:SN
number of latitudes between pole-equator=95 #points=72960
lat 89.276713 to -89.276713
lon 0.000000 to 359.062500 by 0.937500
basic_ang=0 sub_angle=1000000 units=0.000001
unscaled lat=89276713 to -89276713 lon=0 to 359062500:12Z26apr2024:UGRD U-Component of Wind [m/s]:lvl1=(100,40) lvl2=(255,missing):0.4 mb:anl::lon=10.312500,lat=11.810982,i=41100,ix=12,iy=108,val=-2.99871:lon=19.687500,lat=79.841419,i=68758,ix=22,iy=180,val=-7.99871
14:905207:grid_template=40:winds(N/S):
Gaussian grid: (384 x 190) units 1e-06 input WE:NS output WE:SN
number of latitudes between pole-equator=95 #points=72960
lat 89.276713 to -89.276713
lon 0.000000 to 359.062500 by 0.937500
basic_ang=0 sub_angle=1000000 units=0.000001
unscaled lat=89276713 to -89276713 lon=0 to 359062500:12Z26apr2024:VGRD V-Component of Wind [m/s]:lvl1=(100,40) lvl2=(255,missing):0.4 mb:anl::lon=10.312500,lat=11.810982,i=41100,ix=12,iy=108,val=14.8462:lon=19.687500,lat=79.841419,i=68758,ix=22,iy=180,val=12.8462
Loading
Loading