SUBROUTINE UA_LDOR ( lndtbl, iret ) C************************************************************************ C* UA_LDOR * C* * C* This subroutine opens and reads the land station table. * C* * C* UA_LDOR ( LNDTBL, IRET ) * C* * C* Input parameters: * C* LNDTBL CHAR* Land station table * C* * C* Output parameters: * C* IRET INTEGER Return code: * C* 0 = normal return * C* -1 = error opening or reading * C** * C* Log: * C* J. Ator/NCEP 06/96 * C* J. Ator/NCEP 12/97 New interface format, style changes * C* J. Ator/NCEP 03/98 Include 'uacmn_stntbl.cmn' * C* J. Ator/NCEP 10/99 Clean up function declarations * C************************************************************************ INCLUDE 'GEMPRM.PRM' INCLUDE 'uacmn.cmn' INCLUDE 'uacmn_stntbl.cmn' C* CHARACTER*(*) lndtbl C* CHARACTER stnnam*32, tbchrs*20, stat*2 C------------------------------------------------------------------------ iret = -1 C C* Open the land station table file. C CALL FL_TBOP ( lndtbl, 'stns', iunltb, iertop ) IF ( iertop .ne. 0 ) THEN CALL DC_WLOG ( 0, 'FL', iertop, lndtbl, ierwlg ) RETURN END IF C C* Read in the land station table file. C ii = 1 ierrst = 0 DO WHILE ( ( ii .le. LLSTFL ) .and. ( ierrst .eq. 0 ) ) CALL TB_RSTN ( iunltb, ldstid (ii), stnnam, ldstnm (ii), + stat, ldcoun (ii), ldslat (ii), ldslon (ii), + ldselv (ii), ispri, tbchrs, ierrst ) C C* Decode ldregn (ii) and ldinst (ii) from tbchrs. C READ ( UNIT = tbchrs, FMT = '(I1, I2)', IOSTAT = ierred ) + ldregn (ii), ldinst (ii) IF ( ierred .ne. 0 ) THEN ldregn (ii) = IMISSD ldinst (ii) = IMISSD END IF ii = ii + 1 END DO C IF ( ierrst .eq. -1 ) THEN iret = 0 nlde = ii - 1 END IF C C* Close the land station table file. C CALL FL_CLOS ( iunltb, iercls ) C* RETURN END