diff --git a/examples/F90/bufr_ecc-1019.f90 b/examples/F90/bufr_ecc-1019.f90 index d595c624b..5974132e6 100644 --- a/examples/F90/bufr_ecc-1019.f90 +++ b/examples/F90/bufr_ecc-1019.f90 @@ -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 /) diff --git a/examples/F90/grib_ecc-1316.f90 b/examples/F90/grib_ecc-1316.f90 index b6f521ce5..913d49fde 100644 --- a/examples/F90/grib_ecc-1316.f90 +++ b/examples/F90/grib_ecc-1316.f90 @@ -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.)