You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

How do I detect keys whose values are missing in a BUFR message?

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

  1. 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


There is no content with the specified labels



  • No labels