mirror of https://github.com/ecmwf/eccodes.git
ECC-1019: Add test (check -ve numbers)
This commit is contained in:
parent
0edd8a5818
commit
1a16bfef08
|
@ -9,11 +9,9 @@
|
||||||
program operator_3_test
|
program operator_3_test
|
||||||
use eccodes
|
use eccodes
|
||||||
implicit none
|
implicit none
|
||||||
integer :: iret
|
integer :: iret, outfile, ibufr
|
||||||
integer :: outfile
|
integer(kind=4), dimension(:), allocatable :: ivalues
|
||||||
integer :: ibufr
|
character(len=100) :: outfile_name
|
||||||
integer(kind=4), dimension(:), allocatable :: ivalues
|
|
||||||
character(len=100) :: outfile_name
|
|
||||||
|
|
||||||
call getarg(1, outfile_name)
|
call getarg(1, outfile_name)
|
||||||
|
|
||||||
|
@ -32,8 +30,7 @@ program operator_3_test
|
||||||
ivalues=(/ 2,2,2 /)
|
ivalues=(/ 2,2,2 /)
|
||||||
call codes_set(ibufr,'inputExtendedDelayedDescriptorReplicationFactor',ivalues)
|
call codes_set(ibufr,'inputExtendedDelayedDescriptorReplicationFactor',ivalues)
|
||||||
deallocate(ivalues)
|
deallocate(ivalues)
|
||||||
|
|
||||||
call codes_set(ibufr,'edition',4)
|
|
||||||
call codes_set(ibufr,'masterTableNumber',0)
|
call codes_set(ibufr,'masterTableNumber',0)
|
||||||
call codes_set(ibufr,'bufrHeaderCentre',254)
|
call codes_set(ibufr,'bufrHeaderCentre',254)
|
||||||
call codes_set(ibufr,'bufrHeaderSubCentre',0)
|
call codes_set(ibufr,'bufrHeaderSubCentre',0)
|
||||||
|
@ -57,6 +54,7 @@ program operator_3_test
|
||||||
|
|
||||||
allocate(ivalues(7))
|
allocate(ivalues(7))
|
||||||
ivalues = (/ 203015,025052,203255,025052,101000,031002,014046 /)
|
ivalues = (/ 203015,025052,203255,025052,101000,031002,014046 /)
|
||||||
|
! ivalues = (/ 025052,101000,031002,014046 /)
|
||||||
call codes_set(ibufr,'unexpandedDescriptors',ivalues,iret)
|
call codes_set(ibufr,'unexpandedDescriptors',ivalues,iret)
|
||||||
if (iret /= CODES_SUCCESS) then
|
if (iret /= CODES_SUCCESS) then
|
||||||
write(*,*)'codes_set failed for the unexpandedDescriptors'
|
write(*,*)'codes_set failed for the unexpandedDescriptors'
|
||||||
|
@ -64,8 +62,8 @@ program operator_3_test
|
||||||
endif
|
endif
|
||||||
|
|
||||||
deallocate(ivalues)
|
deallocate(ivalues)
|
||||||
|
! Negative values can now be encoded
|
||||||
call codes_set(ibufr,'log10OfPrincipalComponentsNormalizedFitToData',1.1)
|
call codes_set(ibufr, 'log10OfPrincipalComponentsNormalizedFitToData', -1.1)
|
||||||
|
|
||||||
allocate(ivalues(3))
|
allocate(ivalues(3))
|
||||||
ivalues = 0
|
ivalues = 0
|
||||||
|
|
|
@ -29,7 +29,7 @@ EOF
|
||||||
cat $TEMP_TEXT
|
cat $TEMP_TEXT
|
||||||
|
|
||||||
cat > $TEMP_REF << EOF
|
cat > $TEMP_REF << EOF
|
||||||
log3=1.1
|
log3=-1.1
|
||||||
ref=-16383 -16383 -16383
|
ref=-16383 -16383 -16383
|
||||||
scR1=0
|
scR1=0
|
||||||
scR2=0
|
scR2=0
|
||||||
|
|
Loading…
Reference in New Issue