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

Add Arawaka GDTNs (32768,32769) for grib2 #231

Merged
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
4 changes: 4 additions & 0 deletions src/ip_grid_factory_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ subroutine init_grid_grib2(grid, g2_desc)
allocate(ip_lambert_conf_grid::grid)
case(GAUSSIAN_GRID_ID_GRIB2)
allocate(ip_gaussian_grid::grid)
case(ROT_EQUID_CYLIND_E_GRID_ID_GRIB2)
allocate(ip_rot_equid_cylind_egrid::grid)
case(ROT_EQUID_CYLIND_B_GRID_ID_GRIB2)
allocate(ip_rot_equid_cylind_grid::grid)
case default
print *, "gdt_num: ", g2_desc%gdt_num, " not recognized"
error stop
Expand Down
2 changes: 2 additions & 0 deletions src/ip_grid_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ module ip_grid_mod
integer, public, parameter :: POLAR_STEREO_GRID_ID_GRIB2 = 20 !< Integer grid number for polar stereo grid in grib2
integer, public, parameter :: LAMBERT_CONF_GRID_ID_GRIB2 = 30 !< Integer grid number for Lambert conformal grid in grib2
integer, public, parameter :: GAUSSIAN_GRID_ID_GRIB2 = 40 !< Integer grid number for Gaussian grid in grib2
integer, public, parameter :: ROT_EQUID_CYLIND_E_GRID_ID_GRIB2 = 32768 !< Integer grid number for rotated equidistant cylindrical E-stagger grid (grib2)
integer, public, parameter :: ROT_EQUID_CYLIND_B_GRID_ID_GRIB2 = 32769 !< Integer grid number for rotated equidistant cylindrical B-stagger grid (grib2)

private
public :: ip_grid
Expand Down
2 changes: 2 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ foreach(kind ${kinds})
add_test(test_polar_stereo_neighbor_budget_vector_grib2_${kind} test_vector_grib2_${kind} 212 6)
add_test(test_rotatedB_spectral_vector_grib2_${kind} test_vector_grib2_${kind} 205 4)
add_test(test_rotatedE_budget_vector_grib2_${kind} test_vector_grib2_${kind} 203 3)
add_test(test_rotatedB_direct_spectral_vector_grib2_${kind} test_vector_grib2_${kind} 32769 4)
add_test(test_rotatedE_direct_budget_vector_grib2_${kind} test_vector_grib2_${kind} 32768 3)

# vector station point tests
add_test(test_station_points_bilinear_vector_grib2_${kind} test_vector_grib2_${kind} -1 0)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
14 changes: 14 additions & 0 deletions tests/interp_mod_grib2.F90
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,20 @@ subroutine interp_vector(grid, interp_opt)
output_gdtmpl=gdtmpl218
i_output = output_gdtmpl(8)
j_output = output_gdtmpl(9)
case ('32768')
output_gdtnum = 32768
output_gdtlen = gdtlen203
allocate(output_gdtmpl(output_gdtlen))
output_gdtmpl=gdtmpl203
i_output = output_gdtmpl(8)
j_output = output_gdtmpl(9)
case ('32769')
output_gdtnum = 32769
output_gdtlen = gdtlen205
allocate(output_gdtmpl(output_gdtlen))
output_gdtmpl=gdtmpl205
i_output = output_gdtmpl(8)
j_output = output_gdtmpl(9)
case default
print*,"ERROR: ENTER VALID GRID NUMBER."
stop 55
Expand Down
Loading