SUBROUTINE TG_STBD( iret ) C************************************************************************ C* TG_STBD * C* * C* This subroutine gets the latitude, longitude, elevation, and WMO * C* country 2-letter ID for the current station. * C* * C* TG_STBD( IRET ) * C* * C* Input parameters: * C* CIVALS(ICSTID) CHAR* Report ID * C* MAXSTN INTEGER Maximum number of stations in * C* the tide gauge station table * C* YLAT (MAXSTN) REAL Latitude in hundredths of deg * C* of each station in table * C* YLAT (MAXSTN) REAL Longitude in hundredths of deg * C* of each station in table * C* ELEV (MAXSTN) REAL Elevation of each stn in meters* C* JCOUN (MAXSTN) CHAR* Station WMO country 2-letter ID* C* * C* Output parameters: * C* RIVALS(IRSLAT) REAL Latitude of station in * C* hundredths of degrees * C* RIVALS(IRSLON) REAL Longitude of station in * C* hundredths of degrees * C* RIVALS(IRSELV) REAL Elevation of station in meters * C* IRET INTEGER Return code * C* 0 = normal return * C* 1 = problems * C* * C** * C* Log: * C* R. Hollern/NCEP 8/00 * C************************************************************************ INCLUDE 'GEMPRM.PRM' INCLUDE 'tgcmn.cmn' INCLUDE 'tgcmn_stntbl.cmn' C* CHARACTER stnid*8, stid*6, contry*4 C------------------------------------------------------------------------ iret = 0 stnid = ' ' C C* Get report ID. C stnid = civals( icstid ) stid = stnid(1:6) C C* Look for ID match in station table. C CALL DC_BSRC ( stid, jstnid, nstns, ilc, kret ) C IF ( ilc .gt. 0 ) THEN C C* Found a match. C rivals ( irselv ) = elev(ilc) rivals ( irslat ) = ylat ( ilc ) rivals ( irslon ) = ylong ( ilc ) contry = jcoun(ilc) ELSE C C* Station ID not found in station table. C iret = 1 logmsg = 'ID ' // stid // ' not in station table.' CALL DC_WLOG ( 2, 'DCTIDG', 2, logmsg, ierlog ) END IF C* RETURN END