SUBROUTINE TG_STBL ( lunstb, jret ) C************************************************************************ C* TG_STBL * C* * C* This subroutine gets the tide gauge station table data, which * C* contain the latitude and longitude locations and the elevation * C* heights of these sites. * C* * C* TG_STBL ( LUNSTB, IRET ) * C* * C* Input variables: * C* LUNSTB INTEGER Station table logical unit * C* number * C* * C* Output variables: * C* MAXSTN INTEGER Maximum number of stations in * C* the tide gauge station table * C* NSTNS INTEGER Current number of stations * C* in table * C* JSTNID(MAXSTN) CHAR* Station report ID of each * C* station in 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 station * C* in meters * C* JRET INTEGER Return code * C* 0 = normal return * C* -1 = EOF encountered * C* -2 = Read error * C* * C** * C* Log: * C* R. Hollern/NCEP 8/00 * C************************************************************************ INCLUDE 'tgcmn.cmn' INCLUDE 'tgcmn_stntbl.cmn' C* CHARACTER stnnam*32, tbchrs*14, stid*8, stat*2, coun*2 C----------------------------------------------------------------------- iret = 0 i = 0 nstns = 0 jret = 0 C DO WHILE ( jret .eq. 0 .and. nstns .le. MAXSTN ) C C* Read the next record from the station table. C CALL TB_RSTN ( lunstb, stid, stnnam, istnm, stat, coun, + slat, slon, selv, ispri, tbchrs, jret ) C IF ( jret .eq. -1 ) RETURN C C* Check for read error. C IF ( jret .eq. -2 ) RETURN C nstns = nstns + 1 jstnid (nstns) = stid elev (nstns) = selv ylat (nstns) = slat ylong (nstns) = slon C END DO C* RETURN END