NCEPLIBS-bufr
12.0.0
|
Parse a mnemonic from a character string. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | parutg (LUN, IO, UTG, NOD, KON, VAL) |
Parse a mnemonic from a character string. More... | |
subroutine parutg | ( | LUN, | |
IO, | |||
character*(*) | UTG, | ||
NOD, | |||
KON, | |||
VAL | |||
) |
Parse a mnemonic from a character string.
This subroutine parses a user-specified tag (mnemonic) (UTG) that represents a value either being decoded from a bufr file (if it is being read) or encoded into a bufr file (if it is being written). This subroutine first checks to see if the tag contains a condition character ('=', '!', '<', '>', '^' or '#'). If it does not, nothing happens at this point. If it does, then the type of condition character is noted and the tag is stripped of all characters at and beyond the condition character. In either event, the resultant tag is checked against those in the internal jump/ link subset table (in module tables). If found, the node associated with the tag is returned (and it is either a "condition" node or a "store" node depending of the presence or absence of a condition character in UTG). Otherwise the node is returned as zero. if the tag represents a condition node, then the condition value (numeric characters beyond the condition character in the user-specified tag input here) is returned.
As an example of condition character usage, consider the following example of a call to ufbint():
Assuming that LUNIN points to a BUFR file open for input (reading), then the USR array now contains IRET levels of data (up to a maximum of 50) where the value of PRLC is/was less than 50000, along with the corresponding values for TMDB, WDIR and WSPD at those levels.
As another example, consider the following example of a call to readlc() for a long character string:
Assuming that LUNIN points to a BUFR file open for input (reading), then the LCHR string now contains the value corresponding to the third occurrence of NUMID within the current subset.
Valid condition codes include:
[in] | LUN | - integer: File ID. |
[in] | IO | - integer: status indicator for BUFR file associated with LUN:
|
[in] | UTG | character*(*): user-supplied tag representing a value to be encoded/decoded to/from BUFR file. |
[out] | NOD | - integer: positional index in internal jump/link subset table for TAG.
|
[out] | KON | - integer: indicator for type of condition character found in UTG:
|
[out] | VAL | - real: condition value associated with condition character found in utg:
|
Definition at line 82 of file parutg.f.
References bort(), bort2(), moda_msgcwd::inode, moda_tables::isc, strnum(), moda_tables::tag, and moda_tables::typ.