SUBROUTINE CX_DCD1 ( lenmsg, crexmsg, mxndesc, jpos, ctbla, + ctblds, ndesc, datadesc, nmdesc, mxdatv, + expdesc, nsdcr, sortdesc, chkdge, iret ) C************************************************************************ C* CX_DCD1 * C* * C* This subroutine calls the routines to decode Section 1, the Data * C* Description Section, of the CREX message. * C* * C* CX_DCD1 ( LENMSG, CREXMSG, MXNDESC, JPOS, CTBLA, CTBLDS, NDESC, * C* DATADESC, NMDESC, MXDATV, EXPDESC, NSDCR, SORTDESC, IRET ) * C* * C* Input parameters: * C* LENMSG INTEGER CREX message length * C* CREXMSG CHAR* CREX message * C* MXNDESC INTEGER Maximum number of descriptors * C* expected in Section 1 of msg * C* * C* Input and output parameters: * C* JPOS INTEGER On input, points to start of * C* Section 0; on output, points to * C* start of Section 2 * C* * C* Output parameters: * C* CTBLDS CHAR* CREX table descriptor * C* CTBLA CHAR* 3-digit CREX table A reference * C* descriptors in expdesc * C* NDESC INTEGER Number of data descriptor(s) in * C* Section 1 of CREX message * C* DATADESC (MXNDESC) * C* CHAR* List of descriptor(s) in * C* Section 1 of CREX message * C* NMDESC INTEGER Number of descriptors in array * C* expdesc * C* MXDATV INTEGER Maximum number of data values * C* expected * C* EXPDESC (MXDATV) * C* CHAR* The expanded list of descriptors* C* in Section 1 * C* NSDCR INTEGER Number of descriptors in * C* array sortdesc * C* SORTDESC CHAR* List of unique sorted element * C* descriptors in array expdesc * C* CHKDGE INTEGER Check digit indicator * C* IRET INTEGER Return code * C* 0 = normal return * C* 1 = fatal error * C* * C** * C* Log: * C* R. Hollern/NCEP 7/03 * C************************************************************************ INCLUDE 'cxcmn.cmn' C* INTEGER lenmsg, jpos, ndesc, mxndesc, mxrpt, iret INTEGER chkdge C* CHARACTER*(*) crexmsg CHARACTER ctbla*4, ctblds*7 C* CHARACTER datadesc ( mxndesc )*6 CHARACTER sortdesc ( mxdatv )*6 CHARACTER expdesc ( mxdatv )*6 C* LOGICAL more C* C----------------------------------------------------------------------- C iret = 0 more = .true. C C* Get the CREX table descriptor and the 3-digit reference to C* CREX Table A (part of Section 1). C CALL CX_SC01 ( lenmsg, crexmsg, jpos, ctbla, ctblds, iret ) C IF ( iret .eq. 1 ) RETURN C C* Get the descriptor(s) in Section 1 of CREX message. C CALL CX_DESC ( mxndesc, lenmsg, crexmsg, jpos, chkdge, ndesc, + datadesc, iret ) C IF ( iret .eq. 1 ) RETURN C C* Go through descriptor list to process all the replication C* and sequence descriptors in the current list. C CALL CX_EXPD ( ndesc, mxndesc, datadesc, mxdatv, nmdesc, + expdesc, iret ) C IF ( iret .eq. 1 ) RETURN C C* Create a sorted list of the unique descriptors in expdesc. C CALL CX_SORT ( nmdesc, mxdatv, expdesc, nsdcr, + sortdesc, iret ) C C* Store in arrays the Table B data for this set of descriptors. C CALL CX_GTBB ( nsdcr, mxdatv, sortdesc, iret ) C* RETURN END