SUBROUTINE CG_SPOS( iret ) INCLUDE 'GEMPRM.PRM' include 'cgcmn.cmn' integer iret logical found c c* try to find a match between character station id just decoded c* in cg_dcd1 and station table. If a match is found, set the c* lat, long, and elevation for that station. c j = 1 found = .false. DO WHILE (.not. found) IF ( j .le. jstn ) THEN IF ( civals(icstid) .eq. jstnid(j)(1:4) ) THEN rivals(irslat) = ylat(j) rivals(irslon) = ylon(j) rivals(irselv) = elev(j) found = .true. ELSE j = j + 1 END IF ELSE WRITE ( UNIT = logmsg, FMT = '( A )' ) * ' Station not found in cg station table!' CALL DC_WLOG ( 2, 'CG', 1, logmsg, ierwlg ) RETURN END IF END DO RETURN END