SUBROUTINE LS_STBL ( lunstb, iret ) C************************************************************************ C* LS_STBL * C* * C* This subroutine reads the land synoptic station table, which contains* C* the block/station number, latitude/longitude location, elevation, * C* WMO region number, country code, and wind speed units for each of * C* the stations in the table. * C* * C* LS_STBL ( LUNSTB, IRET ) * C* * C* Input parameters: * C* LUNSTB INTEGER Station table unit number * C* ITBLSZ INTEGER Current max station table size * C* * C* Output parameters: * C* YLAT (ITBLSZ) REAL Station latitude in hundredths * C* of degrees * C* YLONG (ITBLSZ) REAL Station Longitude in hundredths* C* of degrees * C* ELEV (ITBLSZ) REAL Station elevation in meters * C* JSTN INTEGER Number of stations in table * C* JWMORG(ITBLSZ) INTEGER Station WMO region number * C* JSTNID(ITBLSZ) INTEGER Station block/station number * C* JWDFLG(ITBLSZ) INTEGER Station wind speed units * C* JCOUN (ITBLSZ) CHAR* Station WMO country 2-letter ID* C* IRET INTEGER Return code * C* 0 = normal return * C* * C** * C* Log: * C* R. Hollern/NCEP 4/96 * C* R. Hollern/NCEP 1/98 Cleaned up code, Style changes * C* R. Hollern/NCEP 1/99 Renamed INCLUDE block ls.bufr.prm to * C* lsbufr.cmn * C* R. Hollern/NCEP 3/99 Increased size of station tbl to 14000 * C* R. Hollern/NCEP 4/00 Removed INCLUDE 'lsbufr.cmn' and * C* added INCLUDE 'lscmn.stntbl.cmn'. * C* J. Ator/NCEP 12/13 Increased size of station tbl to 16000 * C************************************************************************ INCLUDE 'lscmn.cmn' INCLUDE 'lscmn_stntbl.cmn' C* CHARACTER stnnam*32, tbchrs*14, stid*8, stat*2, coun*2 C------------------------------------------------------------------------ iret = 0 jret = 0 jstn = 0 C DO WHILE ( jret .eq. 0 ) C C* Read the next record in the station table C CALL TB_RSTN ( lunstb, stid, stnnam, istnm, stat, coun, + slat, slon, selv, ispri, tbchrs, jret ) C IF ( jret .eq. 0 ) THEN C IF ( jstn .ge. ITBLSZ ) THEN WRITE (logmsg, FMT='(A,I5,A,A)') + 'WARNING: Station table contains more than ', + ITBLSZ, ' entries; need to increase value of', + ' ITBLSZ parameter!' CALL DC_WLOG ( 2, 'DC', 2, logmsg, ierw ) RETURN END IF C jstn = jstn + 1 C kstn = istnm / 10 jstnid(jstn) = kstn elev ( jstn ) = selv ylat ( jstn ) = slat ylong ( jstn ) = slon jcoun ( jstn ) = coun READ( unit=tbchrs(1:1), fmt='(I1)' ) jwdflg ( jstn ) READ( unit=tbchrs(2:2), fmt='(I1)' ) jwmorg ( jstn ) C C* Check if end-of-file read. C ELSE IF ( jret .eq. -1 ) THEN RETURN C ELSE IF ( jret .eq. -2 ) THEN C C* Read error. C loglvl = 0 CALL DC_WLOG ( loglvl, 'LS', -4, ' ', ier ) END IF C END DO C* RETURN END