| Excerpt |
|---|
|
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 |
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:
| Code Block |
|---|
CODES_MISSING_LONG
CODES_MISSING_DOUBLE |
The 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:
| Code Block |
|---|
!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 |
Related articles
| Content by Label |
|---|
| showLabels | false |
|---|
| max | 5 |
|---|
| spaces | ~usa |
|---|
| showSpace | false |
|---|
| sort | modified |
|---|
| reverse | true |
|---|
| type | page |
|---|
| cql | label in ("kb-how-to-article","eccbufr-faqs","bufr","missing-values","decode") and type = "page" and space = "UDOC" |
|---|
| labels | kb-how-to-article |
|---|
|