NCEPLIBS-bufr  12.2.0
All Data Structures Namespaces Files Functions Variables Macros Pages
bitmaps.F90 File Reference

Process bitmaps within BUFR messages. More...

Go to the source code of this file.

Functions/Subroutines

recursive subroutine gettagre (lunit, tagi, ntagi, tagre, ntagre, iret)
 Check whether a specified Table B mnemonic references another Table B mnemonic within the same data subset via an internal bitmap. More...
 
integer function igetrfel (n, lun)
 Check whether a subset element refers to a previous element within the same subset via an internal bitmap. More...
 
integer function imrkopr (nemo)
 Check whether a specified mnemonic is a Table C marker operator. More...
 
subroutine strbtm (n, lun, ival)
 Store internal information in module moda_bitmaps if the input element is part of a bitmap. More...
 

Detailed Description

Process bitmaps within BUFR messages.

Author
J Ator
Date
2016-05-27

Definition in file bitmaps.F90.

Function/Subroutine Documentation

◆ gettagre()

recursive subroutine gettagre ( integer, intent(in)  lunit,
character*(*), intent(in)  tagi,
integer, intent(in)  ntagi,
character*(*), intent(out)  tagre,
integer, intent(out)  ntagre,
integer, intent(out)  iret 
)

Check whether a specified Table B mnemonic references another Table B mnemonic within the same data subset via an internal bitmap.

If so, then the referenced mnemonic is returned along with its location within the subset.

Parameters
lunit- Fortran logical unit number for BUFR file
tagi- Table B mnemonic
ntagi- Ordinal occurrence of tagi for which tagre is to be returned, counting from the beginning of the overall subset definition
tagre- Table B mnemonic referenced by tagi via an internal bitmap
ntagre- Ordinal occurrence of tagre referenced by (ntagi)th occurrence of tagi, counting from the beginning of the overall subset definition
iret- Return code
  • 0 = normal return
  • -1 = tagre could not be found, or some other error occurred

A data subset must already be in scope within the NCEPLIBS-bufr internal arrays for lunit, either via a previous call to one of the subset-reading subroutines (when reading BUFR data subsets) or via a previous call to one of the message-writing subroutines (when writing BUFR data subsets).

Author
J. Ator
Date
2016-06-07

Definition at line 109 of file bitmaps.F90.

References fstag(), moda_msgcwd::inode, moda_usrint::inv, moda_usrint::nrfelm, status(), strsuc(), moda_tables::tag, x48(), and x84().

◆ igetrfel()

integer function igetrfel ( integer, intent(in)  n,
integer, intent(in)  lun 
)

Check whether a subset element refers to a previous element within the same subset via an internal bitmap.

If so, then the referenced element is returned. In addition, if the input element is a 2-XX-255 marker operator, then its scale factor, bit width and reference values are set internally to match those of the referenced element.

Parameters
n- Subset element
lun- File ID
Returns
Subset element referenced by element n within the same subset
  • 0 = Input element does not refer to a previous element, or referenced element not found
Author
J. Ator
Date
2016-05-27

Definition at line 182 of file bitmaps.F90.

References adn30(), bort(), moda_bitmaps::ctco, moda_tables::ibt, moda_bitmaps::ibtmse, moda_nrv203::ienrv, imrkopr(), moda_msgcwd::inode, moda_nrv203::inodnrv, moda_bitmaps::inodtamc, moda_bitmaps::inodtco, moda_usrint::inv, moda_tables::irf, moda_tables::isc, moda_nrv203::isnrv, moda_bitmaps::istbtm, moda_bitmaps::iszbtm, moda_tables::itp, lstjpb(), moda_bitmaps::lstnod, moda_bitmaps::lstnodct, moda_bitmaps::nbtm, moda_bitmaps::nbtmse, nemtab(), moda_nrv203::nnrv, moda_nrv203::nrv, moda_bitmaps::ntamc, moda_bitmaps::ntco, moda_usrint::nval, moda_tables::tag, and moda_nrv203::tagnrv.

◆ imrkopr()

integer function imrkopr ( character*(*), intent(in)  nemo)

Check whether a specified mnemonic is a Table C marker operator.

Parameters
nemo- Mnemonic
Returns
Flag indicating whether nemo is a Table C marker operator:
  • 0 = No
  • 1 = Yes
Author
J. Ator
Date
2016-05-04

Definition at line 360 of file bitmaps.F90.

Referenced by igetrfel(), bufr_c2f_interface::imrkopr_c(), iokoper(), and ufdump().

◆ strbtm()

subroutine strbtm ( integer, intent(in)  n,
integer, intent(in)  lun,
integer, intent(in)  ival 
)

Store internal information in module moda_bitmaps if the input element is part of a bitmap.

This subroutine first determines whether the input element is part of a bitmap. If so, then information about the element is stored internally for later use.

Parameters
n- Subset element
lun- File ID
ival- Value associated with n:
  • If n is determined to be part of a bitmap, then a value of 0 means that n is a "set" entry in the bitmap, and any other (i.e. non-zero) value means that n is not a "set" entry in the bitmap
  • If n is determined to not be part of a bitmap, then this value is ignored
Author
J. Ator
Date
2016-05-27

Definition at line 19 of file bitmaps.F90.

References bort(), moda_bitmaps::ctco, moda_bitmaps::ibtmse, moda_msgcwd::inode, moda_bitmaps::inodtamc, moda_bitmaps::inodtco, moda_usrint::inv, moda_tables::isc, moda_bitmaps::istbtm, moda_bitmaps::iszbtm, moda_tables::itp, moda_bitmaps::linbtm, moda_bitmaps::nbtm, moda_bitmaps::nbtmse, moda_bitmaps::ntamc, moda_bitmaps::ntco, and moda_tables::tag.

Referenced by rcstpl(), rdcmps(), and wrtree().