Step-by-step guide

Each element in the data section of a BUFR can be missing.  ecCodes provides a simple way for the user to check if the value of an element is missing by comparing with two constants:

CODES_MISSING_LONG
CODES_MISSING_DOUBLE

These constants are available in Python, Fortran 90 and C and the user needs to compare with the appropriate constant depending on the type of the variable used. This is an example of Fortran 90 code:

!declare backscatter as double precision
real(kind=8), dimension(:), allocatable :: backscatter
  
!get the values
call codes_get(ibufr,'/beamIdentifier=2/backscatter',backscatter);
do i=1,size(backscatter)
    !compare with double precision missing
    if (backscatter(i)/=CODES_MISSING_DOUBLE) then
        !process non missing values
    else
        !process missing values
    endif
end do