SUBROUTINE UG_IFSP ( rimnem, cimnem, iret ) C************************************************************************ C* UG_IFSP * C* * C* This subroutine initializes the interface mnemonic arrays and sets * C* the pointers within COMMON / RINTFP /. * C* * C* UG_IFSP ( RIMNEM, CIMNEM, IRET ) * C* * C* Output parameters: * C* RIMNEM (*) CHAR* Interface mnemonics for reals * C* CIMNEM (*) CHAR* Interface mnemonics for chars * C* IRET INTEGER Return code * C* 0 = normal return * C* -1 = one or more pointers * C* could not be set * C* * C** * C* Log: * C* C. Caruso Magee/NCEP 05/05 * C* J. Ator/NCEP 05/09 Add WACN to interface output * C************************************************************************ INCLUDE 'GEMPRM.PRM' INCLUDE 'ugcmn.cmn' C* CHARACTER*(*) rimnem (*), cimnem (*) C* LOGICAL allok INTEGER iploc ( NRSLMN ) CHARACTER rifmn ( NRIMN )*8, cifmn ( NCIMN )*8 C* C* Establish equivalance between iploc ( ) and COMMON / RINTFP / C* EQUIVALENCE ( iploc (1), iryear ) C* C* Real interface mnemonics. C* DATA ( rifmn (i), i = 1, NRSLMN ) + / 'YEAR' , 'MNTH' , 'DAYS' , 'HOUR' , 'MINU' , + 'SLAT' , 'SLON' , 'SELV' , 'WTMP' , 'TMPC' , + 'TMPF' , 'GUST' , 'STRV' , 'RSH9' , 'SALN' , + 'WACN' / DATA ( rifmn (i), i = NRSLMN+1, NRIMN ) / + 'NWND' , 'WDIR' , 'WSPD' , 'DDWD' , 'DDWS' , + MWM1T4 * ' ' , + 'NRSH' , 'RSHM' , 'DDRS' , + MRM1T2 * ' ' , + 'NDCH' , 'DCHG' , 'DDDC' , + MDM1T2 * ' ' , + 'NPCP' , 'PREC' , 'DDPC' , + MPM1T2 * ' ' / C* Real interface mnemonics. C* DATA ( cifmn (i), i = 1, NCIMN ) + / 'STID' , 'AGCY' / C* Character interface mnemonics. C----------------------------------------------------------------------- iret = 0 C C* Initialize the interface mnemonics. C DO i = 1, NRIMN rimnem ( i ) = rifmn ( i ) END DO DO i = 1, NCIMN cimnem ( i ) = cifmn ( i ) END DO C C* The logical variable "allok" is initially set to .true. but will C* be reset to .false. if any of the pointers cannot be set. C allok = .true. C C* Set the pointers for the single-level real interface mnemonics. C DO ii = 1, NRSLMN CALL DC_IFFP ( rimnem (ii), rimnem, NRIMN, allok, + iploc (ii), ier ) END DO C CALL DC_IFFP ( 'STID', cimnem, NCIMN, allok, icstid, ier ) CALL DC_IFFP ( 'AGCY', cimnem, NCIMN, allok, icagcy, ier ) C C* Set the pointers for wind data. C CALL DC_IFFP ( 'NWND', rimnem, NRIMN, allok, irnwnd, ier ) CALL DC_IFFP ( 'WDIR', rimnem, NRIMN, allok, irwdir (1), ier ) CALL DC_IFMP ( 4, MXWND, irwdir, ier ) CALL DC_IFFP ( 'WSPD', rimnem, NRIMN, allok, irwspd (1), ier ) CALL DC_IFMP ( 4, MXWND, irwspd, ier ) CALL DC_IFFP ( 'DDWD', rimnem, NRIMN, allok, irddwd (1), ier ) CALL DC_IFMP ( 4, MXWND, irddwd, ier ) CALL DC_IFFP ( 'DDWS', rimnem, NRIMN, allok, irddws (1), ier ) CALL DC_IFMP ( 4, MXWND, irddws, ier ) C C* Set the pointers for river stage height data. C CALL DC_IFFP ( 'NRSH', rimnem, NRIMN, allok, irnrsh, ier ) CALL DC_IFFP ( 'RSHM', rimnem, NRIMN, allok, irrshm(1), ier ) CALL DC_IFMP ( 2, MXRSH, irrshm, ier ) CALL DC_IFFP ( 'DDRS', rimnem, NRIMN, allok, irddrs(1), ier ) CALL DC_IFMP ( 2, MXRSH, irddrs, ier ) C C* Set the pointers for discharge data. C CALL DC_IFFP ( 'NDCH', rimnem, NRIMN, allok, irndch, ier ) CALL DC_IFFP ( 'DCHG', rimnem, NRIMN, allok, irdchg(1), ier ) CALL DC_IFMP ( 2, MXDCH, irdchg, ier ) CALL DC_IFFP ( 'DDDC', rimnem, NRIMN, allok, irdddc(1), ier ) CALL DC_IFMP ( 2, MXDCH, irdddc, ier ) C C* Set the pointers for precipitation data. C CALL DC_IFFP ( 'NPCP', rimnem, NRIMN, allok, irnpcp, ier ) CALL DC_IFFP ( 'PREC', rimnem, NRIMN, allok, irprec(1), ier ) CALL DC_IFMP ( 2, MXPCP, irprec, ier ) CALL DC_IFFP ( 'DDPC', rimnem, NRIMN, allok, irddpc(1), ier ) CALL DC_IFMP ( 2, MXPCP, irddpc, ier ) C C* Were all of the pointers properly set? C IF ( .not. allok ) THEN iret = -1 END IF C* RETURN END