NCEPLIBS-bufr 11.7.1
idn30.f
Go to the documentation of this file.
1C> @file
2C> @brief Convert an FXY value from its five or six character
3C> representation to its bit-wise (integer) representation
4
5C> This function converts an FXY value from its 5 or 6 character
6C> representation to its bit-wise (integer) representation.
7C>
8C> @author J. Woollen
9C> @date 1994-01-06
10C>
11C> @param[in] ADN30 -- character*(*): FXY value
12C> @param[in] L30 -- integer: Length of ADN30; can be either 5 or 6
13C> characters
14C> @returns idn30 -- integer: Bit-wise representation of FXY value
15C>
16C> @remarks
17C> - This function is the logical inverse of function adn30().
18C>
19C> <b>Program History Log:</b>
20C> | Date | Programmer | Comments |
21C> | -----|------------|----------|
22C> | 1994-01-06 | J. Woollen | Original author |
23C> | 1998-07-08 | J. Woollen | Replaced call to CRAY library routine "ABORT" with call to new internal BUFRLIB routine bort() |
24C> | 2003-11-04 | S. Bender | Added remarks and routine interdependencies |
25C> | 2003-11-04 | D. Keyser | Unified/portable for WRF; added history documentation |
26C>
27 FUNCTION idn30(ADN30,L30)
28
29 COMMON /hrdwrd/ nbytw,nbitw,iord(8)
30
31 CHARACTER*(*) adn30
32 CHARACTER*128 bort_str
33
34C----------------------------------------------------------------------
35C----------------------------------------------------------------------
36
37 IF(len(adn30).LT.l30) GOTO 900
38 IF(l30.EQ.5) THEN
39 READ(adn30,'(I5)') idn30
40 IF(idn30.LT.0 .OR. idn30.GT.65535) GOTO 901
41 ELSEIF(l30.EQ.6) THEN
43 ELSE
44 GOTO 902
45 ENDIF
46
47C EXITS
48C -----
49
50 RETURN
51900 WRITE(bort_str,'("BUFRLIB: IDN30 - FUNCTION INPUT STRING ",A,'//
52 . '" CHARACTER LENGTH (",I4,") IS TOO SHORT (< L30,",I5)')
53 . adn30,len(adn30),l30
54 CALL bort(bort_str)
55901 WRITE(bort_str,'("BUFRLIB: IDN30 - DESCRIPTOR INTEGER '//
56 . 'REPRESENTATION, IDN30 (",I8,"), IS OUTSIDE 16-BIT RANGE '//
57 . '(0-65535)")') idn30
58 CALL bort(bort_str)
59902 WRITE(bort_str,'("BUFRLIB: IDN30 - FUNCTION INPUT STRING ",A,'//
60 . '" CHARACTER LENGTH (",I4,") MUST BE EITHER 5 OR 6")')
61 . adn30,l30
62 CALL bort(bort_str)
63 END
character *(*) function adn30(IDN, L30)
This function converts an FXY value from its bit-wise (integer) representation to its 5 or 6 characte...
Definition: adn30.f:29
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
Definition: bort.f:23
function idn30(ADN30, L30)
This function converts an FXY value from its 5 or 6 character representation to its bit-wise (integer...
Definition: idn30.f:28
function ifxy(ADSC)
This function converts an FXY value from its 6 character representation to its bit-wise (integer) rep...
Definition: ifxy.f:43