|
NCEPLIBS-bufr
12.2.0
|
Process FXY values, including converting between character and WMO bit-wise representations. More...
Go to the source code of this file.
Functions/Subroutines | |
| character *(*) function | adn30 (idn, ldn) |
| Convert an FXY value from its WMO bit-wise representation to a character string of length 5 or 6. More... | |
| subroutine | cadn30 (idn, adn) |
| Convert an FXY value from its WMO bit-wise representation to its 6 character representation. More... | |
| integer function | idn30 (adn, ldn) |
| Convert an FXY value from a character string to the WMO bit-wise representation. More... | |
| integer function | ifxy (adsc) |
| Convert an FXY value from its 6 character representation to its WMO bit-wise representation. More... | |
| integer function | igetfxy (str, cfxy) |
| Search for and return a valid FXY number from within a character string. More... | |
| subroutine | nemtab (lun, nemo, idn, tab, iret) |
| Get information about a descriptor, based on a mnemonic. More... | |
| integer function | numbck (numb) |
| Check an FXY number for validity. More... | |
| subroutine | numtab (lun, idn, nemo, tab, iret) |
| Get information about a descriptor, based on the WMO bit-wise representation of an FXY value. More... | |
| subroutine | numtbd (lun, idn, nemo, tab, iret) |
| Get information about a Table B or Table D descriptor, based on the WMO bit-wise representation of an FXY value. More... | |
Process FXY values, including converting between character and WMO bit-wise representations.
Definition in file fxy.F90.
| character*(*) function adn30 | ( | integer, intent(in) | idn, |
| integer, intent(in) | ldn | ||
| ) |
Convert an FXY value from its WMO bit-wise representation to a character string of length 5 or 6.
For an description of the WMO bit-wise representation of the FXY value, see ifxy().
This function is the logical inverse of function idn30().
| idn | - WMO bit-wise representation of FXY value |
| ldn | - Length of string to be returned; can be either 5 or 6 characters |
Definition at line 17 of file fxy.F90.
References bort().
Referenced by igetrfel(), istdesc(), ufbqcd(), upds3(), and wrdxtb().
| subroutine cadn30 | ( | integer, intent(in) | idn, |
| character*(*), intent(out) | adn | ||
| ) |
Convert an FXY value from its WMO bit-wise representation to its 6 character representation.
This subroutine is similar to function adn30(), except that it always returns 6 characters, and it always returns its output as a call parameter instead of a function value, which in turn allows it to be more easily called from within a C language function.
For a description of the WMO bit-wise representation of an FXY value, see ifxy().
| idn | - WMO bit-wise representation of FXY value |
| adn | - FXY value |
Definition at line 64 of file fxy.F90.
Referenced by bufr_c2f_interface::cadn30_c().
| integer function idn30 | ( | character*(*), intent(in) | adn, |
| integer, intent(in) | ldn | ||
| ) |
Convert an FXY value from a character string to the WMO bit-wise representation.
For an description of the WMO bit-wise representation of the FXY value, see ifxy().
This function is the logical inverse of function adn30().
| adn | - FXY value; must be of length 5 or 6 |
| ldn | - Length of adn; can be either 5 or 6 characters |
| integer function ifxy | ( | character*6, intent(in) | adsc | ) |
Convert an FXY value from its 6 character representation to its WMO bit-wise representation.
Per the official WMO BUFR regulations, an FXY value can be represented as a bit-wise integer in 16 bits, ordered from left (most significant) to right (least significant), and where the F value occupies the first 2 bits, the X value occupies the next 6 bits, and the Y value occupies the last 8 bits.
For example, if ADSC = '063022'
F | X | Y
0 | 63 | 22
0 0 1 1 1 1 1 1 0 0 0 1 0 1 1 0
then the corresponding ifxy
= ( 2**13 + 2**12 + 2**11 + 2**10 + 2**9 + 2**8 +
2**4 + 2**2 + 2**1 )
= 16150
| adsc | - FXY value |
Definition at line 151 of file fxy.F90.
Referenced by getcfmng(), idn30(), bufr_c2f_interface::ifxy_c(), ireadmt(), and ufbqcp().
| integer function igetfxy | ( | character*(*), intent(in) | str, |
| character*6, intent(out) | cfxy | ||
| ) |
Search for and return a valid FXY number from within a character string.
The FXY number may be in format of either FXXYYY or F-XX-YYY within the input string, but it is always returned in format FXXYYY upon output.
| str | - input string |
| cfxy | - FXY number in format FXXYYY |
Definition at line 178 of file fxy.F90.
References numbck().
| subroutine nemtab | ( | integer, intent(in) | lun, |
| character*(*), intent(in) | nemo, | ||
| integer, intent(out) | idn, | ||
| character, intent(out) | tab, | ||
| integer, intent(out) | iret | ||
| ) |
Get information about a descriptor, based on a mnemonic.
| lun | - File ID associated with DX BUFR tables |
| nemo | - Mnemonic |
| idn | - WMO bit-wise representation of FXY value for descriptor for descriptor associated with nemo |
| tab | - Type associated with idn:
|
| iret | - Return code:
|
Definition at line 433 of file fxy.F90.
References moda_tababd::idnb, moda_tababd::idnd, moda_tababd::ntbb, moda_tababd::ntbd, moda_tababd::tabb, and moda_tababd::tabd.
Referenced by chekstab(), cmsgini(), elemdx(), getcfmng(), igetrfel(), msgini(), nemdefs(), bufr_c2f_interface::nemtab_c(), seqsdx(), tabsub(), ufbdmp(), ufbqcd(), ufdump(), and upftbv().
| integer function numbck | ( | character*6, intent(in) | numb | ) |
Check an FXY number for validity.
| numb | - FXY value |
Definition at line 236 of file fxy.F90.
Referenced by igetfxy().
| subroutine numtab | ( | integer, intent(in) | lun, |
| integer, intent(in) | idn, | ||
| character*(*), intent(out) | nemo, | ||
| character, intent(out) | tab, | ||
| integer, intent(out) | iret | ||
| ) |
Get information about a descriptor, based on the WMO bit-wise representation of an FXY value.
For a description of the WMO bit-wise representation of the FXY value, see ifxy().
| lun | - File ID associated with DX BUFR tables |
| idn | - WMO bit-wise representation of FXY value for descriptor |
| nemo | - Mnemonic associated with idn |
| tab | - Type associated with idn:
|
| iret | - Return code:
|
Definition at line 358 of file fxy.F90.
References numtbd().
Referenced by cktaba(), nemtbd(), seqsdx(), stndrd(), and ufbqcp().
| subroutine numtbd | ( | integer, intent(in) | lun, |
| integer, intent(in) | idn, | ||
| character*(*), intent(out) | nemo, | ||
| character, intent(out) | tab, | ||
| integer, intent(out) | iret | ||
| ) |
Get information about a Table B or Table D descriptor, based on the WMO bit-wise representation of an FXY value.
For a description of the WMO bit-wise representation of the FXY value, see ifxy().
| lun | - File ID associated with DX BUFR tables |
| idn | - WMO bit-wise representation of FXY value for Table B or Table D descriptor |
| nemo | - Mnemonic associated with idn |
| tab | - Type associated with idn:
|
| iret | - Return code:
|
Definition at line 289 of file fxy.F90.
References moda_tababd::idnb, moda_tababd::idnd, moda_tababd::ntbb, moda_tababd::ntbd, moda_tababd::tabb, and moda_tababd::tabd.
Referenced by getcfmng(), numtab(), bufr_c2f_interface::numtbd_c(), and ufdump().