1 FUNCTION IDN30
(ADN30
,L30
)
3 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
6 C PRGMMR: WOOLLEN ORG: NP20 DATE: 1994-01-06
8 C ABSTRACT: THIS FUNCTION CONVERTS A DESCRIPTOR FROM ITS FIVE OR SIX
9 C CHARACTER ASCII REPRESENTATION TO ITS BIT-WISE (INTEGER)
12 C PROGRAM HISTORY LOG:
13 C 1994-01-06 J. WOOLLEN -- ORIGINAL AUTHOR
14 C 1998-07-08 J. WOOLLEN -- REPLACED CALL TO CRAY LIBRARY ROUTINE
15 C "ABORT" WITH CALL TO NEW INTERNAL BUFRLIB
17 C 2003-11-04 S. BENDER -- ADDED REMARKS/BUFRLIB ROUTINE
19 C 2003-11-04 D. KEYSER -- UNIFIED/PORTABLE FOR WRF; ADDED
20 C DOCUMENTATION (INCLUDING HISTORY); OUTPUTS
21 C MORE COMPLETE DIAGNOSTIC INFO WHEN ROUTINE
22 C TERMINATES ABNORMALLY
24 C USAGE: IDN30 (ADN30, L30)
25 C INPUT ARGUMENT LIST:
26 C ADN30 - CHARACTER*(*): CHARACTER FORM OF DESCRIPTOR (FXY
28 C L30 - INTEGER: LENGTH OF ADN30 (NUMBER OF CHARACTERS, 5 OR
31 C OUTPUT ARGUMENT LIST:
32 C IDN - INTEGER: BIT-WISE REPRESENTATION OF DESCRIPTOR (FXY)
36 C THIS ROUTINE CALLS: ADN30 BORT IFXY
37 C THIS ROUTINE IS CALLED BY: STBFDX
38 C Normally not called by any application
42 C LANGUAGE: FORTRAN 77
43 C MACHINE: PORTABLE TO ALL PLATFORMS
47 COMMON /HRDWRD
/ NBYTW
,NBITW
,IORD
(8)
50 CHARACTER*128 BORT_STR
52 C----------------------------------------------------------------------
53 C----------------------------------------------------------------------
55 IF(LEN
(ADN30
).LT
.L30
) GOTO 900
57 READ(ADN30
,'(I5)') IDN30
58 IF(IDN30
.LT
.0 .OR
. IDN30
.GT
.65535) GOTO 901
69 900 WRITE(BORT_STR
,'("BUFRLIB: IDN30 - FUNCTION INPUT STRING ",A,'//
70 . '" CHARACTER LENGTH (",I4,") IS TOO SHORT (< L30,",I5)')
71 . ADN30
,LEN
(ADN30
),L30
73 901 WRITE(BORT_STR
,'("BUFRLIB: IDN30 - DESCRIPTOR INTEGER '//
74 . 'REPRESENTATION, IDN30 (",I8,"), IS OUTSIDE 16-BIT RANGE '//
75 . '(0-65535)")') IDN30
77 902 WRITE(BORT_STR
,'("BUFRLIB: IDN30 - FUNCTION INPUT STRING ",A,'//
78 . '" CHARACTER LENGTH (",I4,") MUST BE EITHER 5 OR 6")')