updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / var / external / bufr / istdesc.f
blobdef330bd1144815df64e880dab7e0ec2c04ed1af
1 FUNCTION ISTDESC( IDN )
3 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
5 C SUBPROGRAM: ISTDESC
6 C PRGMMR: ATOR ORG: NP12 DATE: 2004-08-18
8 C ABSTRACT: GIVEN THE BIT-WISE REPRESENTATION OF THE FXY VALUE
9 C FOR A DESCRIPTOR, THIS FUNCTION DETERMINES WHETHER THE DESCRIPTOR
10 C IS A WMO-STANDARD DESCRIPTOR OR A LOCAL DESCRIPTOR.
12 C PROGRAM HISTORY LOG:
13 C 2004-08-18 J. ATOR -- ORIGINAL AUTHOR
15 C USAGE: ISTDESC( IDN )
16 C INPUT ARGUMENT LIST:
17 C IDN - INTEGER: BIT-WISE REPRESENTATION OF FXY VALUE
18 C FOR DESCRIPTOR TO BE CHECKED
20 C OUTPUT ARGUMENT LIST:
21 C ISTDESC - INTEGER: RETURN VALUE:
22 C 0 - IDN IS A LOCAL DESCRIPTOR
23 C 1 - IDN IS A WMO-STANDARD DESCRIPTOR
25 C REMARKS:
26 C THIS ROUTINE CALLS: ADN30
27 C THIS ROUTINE IS CALLED BY: READS3 RESTD STNDRD
28 C Normally not called by application
29 C programs but it could be.
31 C ATTRIBUTES:
32 C LANGUAGE: FORTRAN 77
33 C MACHINE: PORTABLE TO ALL PLATFORMS
35 C$$$
37 CHARACTER*6 ADSC, ADN30
39 ADSC = ADN30( IDN, 6 )
41 READ(ADSC,'(I1,I2,I3)') IF,IX,IY
42 IF ( ( IF .EQ. 1 ) .OR. ( IF .EQ. 2 ) ) THEN
44 C ADSC IS EITHER A REPLICATOR OR TABLE C OPERATOR DESCRIPTOR.
45 C SINCE LOCAL VERSIONS OF SUCH DESCRIPTORS ARE NOT ALLOWED,
46 C THEN ADSC IS STANDARD BY DEFAULT.
48 ISTDESC = 1
49 ELSE IF ( ( IX .LT. 48 ) .AND. ( IY .LT. 192 ) ) THEN
50 ISTDESC = 1
51 ELSE
52 ISTDESC = 0
53 END IF
55 RETURN
56 END