mirror of https://github.com/ecmwf/eccodes.git
Examples: Test long integer interface
This commit is contained in:
parent
5e6313407f
commit
5619ade9c2
|
@ -11,6 +11,7 @@ program operator_3_test
|
||||||
implicit none
|
implicit none
|
||||||
integer :: iret, outfile, ibufr
|
integer :: iret, outfile, ibufr
|
||||||
integer(kind=4), dimension(:), allocatable :: ivalues
|
integer(kind=4), dimension(:), allocatable :: ivalues
|
||||||
|
integer(kind=8), dimension(:), allocatable :: lvalues
|
||||||
character(len=100) :: outfile_name
|
character(len=100) :: outfile_name
|
||||||
|
|
||||||
call getarg(1, outfile_name)
|
call getarg(1, outfile_name)
|
||||||
|
@ -21,10 +22,10 @@ program operator_3_test
|
||||||
stop 1
|
stop 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
allocate(ivalues(1))
|
allocate(lvalues(1))
|
||||||
ivalues=(/ -16383 /)
|
lvalues=(/ -16383 /)
|
||||||
call codes_set(ibufr,'inputOverriddenReferenceValues',ivalues)
|
call codes_set(ibufr,'inputOverriddenReferenceValues',lvalues)
|
||||||
deallocate(ivalues)
|
deallocate(lvalues)
|
||||||
|
|
||||||
allocate(ivalues(3))
|
allocate(ivalues(3))
|
||||||
ivalues=(/ 2,2,2 /)
|
ivalues=(/ 2,2,2 /)
|
||||||
|
|
|
@ -12,6 +12,9 @@ program grib_ecc_1316
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
integer :: iret, ostep, olevel, onumber
|
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
|
character(len=80) :: parameterName
|
||||||
integer :: idx, igrib, count1 = 0
|
integer :: idx, igrib, count1 = 0
|
||||||
|
|
||||||
|
@ -19,9 +22,12 @@ program grib_ecc_1316
|
||||||
call codes_index_create(idx, '../../data/tigge_cf_ecmwf.grib2', &
|
call codes_index_create(idx, '../../data/tigge_cf_ecmwf.grib2', &
|
||||||
'parameterName,number,level,step')
|
'parameterName,number,level,step')
|
||||||
|
|
||||||
call codes_index_select(idx, 'step', 96)
|
call codes_index_select(idx, 'step', step_int)
|
||||||
call codes_index_select(idx, 'level', 0)
|
call codes_index_select(idx, 'level', level_int)
|
||||||
call codes_index_select(idx, 'number', 0)
|
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')
|
call codes_index_select(idx, 'parameterName', 'Soil moisture')
|
||||||
|
|
||||||
do while (.true.)
|
do while (.true.)
|
||||||
|
|
Loading…
Reference in New Issue