NCEPLIBS-bufr
11.7.0
|
Read one data value from a data subset. More...
Go to the source code of this file.
Functions/Subroutines | |
REAL *8 function | getvalnb (LUNIT, TAGPV, NTAGPV, TAGNB, NTAGNB) |
This function can be used to read a data value corresponding to a specific occurrence of a mnemonic within a data subset, based on its position relative to a different mnemonic within the subset. More... | |
Read one data value from a data subset.
Definition in file getvalnb.f.
REAL*8 function getvalnb | ( | LUNIT, | |
character*(*) | TAGPV, | ||
NTAGPV, | |||
character*(*) | TAGNB, | ||
NTAGNB | |||
) |
This function can be used to read a data value corresponding to a specific occurrence of a mnemonic within a data subset, based on its position relative to a different mnemonic within the subset.
The function first searches for a specific occurrence of a pivot mnemonic, counting from the beginning of the subset. From there, it then searches in either a forward or backward direction for a specific occurrence of a nearby mnemonic, and if found returns the data value from the corresponding location within the subset.
[in] | LUNIT | – integer: Fortran logical unit number for BUFR file |
[in] | TAGPV | – character*(*): Pivot mnemonic; the subroutine will first search for the (NTAGPV)th occurrence of this mnemonic, counting from the beginning of the overall subset definition |
[in] | NTAGPV | – integer: Ordinal occurrence of TAGPV to search for, counting from the beginning of the overall subset definition |
[in] | TAGNB | – character*(*): Nearby mnemonic; assuming TAGPV is successfully found, the subroutine will then search nearby for the (NTAGNB)th occurrence of TAGNB and return the corresponding value |
[in] | NTAGNB | – integer: Ordinal occurrence of TAGNB to search for, counting from the location of TAGPV within the overall subset definition. If NTAGNB is positive, the subroutine will search in a forward direction from the location of TAGPV; otherwise, if NTAGNB is negative, it will instead search in a backwards direction from the location of TAGPV. |
The current placeholder value for "missing" data can be determined via a separate call to function getbmiss().
Before calling this function, a BUFR data subset should already be open for reading via a previous call to one of the BUFRLIB subset-reading subroutines.
Program history log:
Date | Programmer | Comments |
---|---|---|
2012-09-12 | J. Ator | Original author |
2014-10-02 | J. Ator | Modified to use fstag() |
2014-12-10 | J. Ator | Use modules instead of COMMON blocks |
Definition at line 57 of file getvalnb.f.