Examples: Test long integer interface

This commit is contained in:
Shahram Najm 2024-01-11 13:40:31 +00:00
parent 5e6313407f
commit 5619ade9c2
2 changed files with 14 additions and 7 deletions

View File

@ -11,6 +11,7 @@ program operator_3_test
implicit none
integer :: iret, outfile, ibufr
integer(kind=4), dimension(:), allocatable :: ivalues
integer(kind=8), dimension(:), allocatable :: lvalues
character(len=100) :: outfile_name
call getarg(1, outfile_name)
@ -21,10 +22,10 @@ program operator_3_test
stop 1
endif
allocate(ivalues(1))
ivalues=(/ -16383 /)
call codes_set(ibufr,'inputOverriddenReferenceValues',ivalues)
deallocate(ivalues)
allocate(lvalues(1))
lvalues=(/ -16383 /)
call codes_set(ibufr,'inputOverriddenReferenceValues',lvalues)
deallocate(lvalues)
allocate(ivalues(3))
ivalues=(/ 2,2,2 /)

View File

@ -12,6 +12,9 @@ program grib_ecc_1316
implicit none
integer :: iret, ostep, olevel, onumber
! Test both interfaces: 4 byte and 8 byte integers
integer(4) :: step_int = 96, level_int = 0, number_int = 0
integer(8) :: step_long = 96, level_long = 0, number_long = 0
character(len=80) :: parameterName
integer :: idx, igrib, count1 = 0
@ -19,9 +22,12 @@ program grib_ecc_1316
call codes_index_create(idx, '../../data/tigge_cf_ecmwf.grib2', &
'parameterName,number,level,step')
call codes_index_select(idx, 'step', 96)
call codes_index_select(idx, 'level', 0)
call codes_index_select(idx, 'number', 0)
call codes_index_select(idx, 'step', step_int)
call codes_index_select(idx, 'level', level_int)
call codes_index_select(idx, 'number', number_int)
call codes_index_select(idx, 'step', step_long)
call codes_index_select(idx, 'level', level_long)
call codes_index_select(idx, 'number', number_long)
call codes_index_select(idx, 'parameterName', 'Soil moisture')
do while (.true.)