awips2/ncep/gov.noaa.nws.ncep.ui.nsharp/BigNsharp/get_mdl_stns.f
root 133dc97f67 Initial revision of AWIPS2 11.9.0-7p5
Former-commit-id: 06a8b51d6d [formerly 9f19e3f712 [formerly 64fa9254b946eae7e61bbc3f513b7c3696c4f54f]]
Former-commit-id: 9f19e3f712
Former-commit-id: a02aeb236c
2012-01-06 08:55:05 -06:00

56 lines
1.3 KiB
Fortran

subroutine get_mdl_stns(maxstn, stn_list, sta_lat, sta_lon,
+ nstn)
parameter (MAXSTATIONS=2000)
integer lunstn, iret, ier
character stn_list(*)*18
real sta_lat(*), sta_lon(*)
character*128 tbfile
data tbfile /'sfstns.tbl'/
CHARACTER coun(MAXSTATIONS)*2, stid(MAXSTATIONS)*8
CHARACTER stat(MAXSTATIONS)*2
CHARACTER stnnam(MAXSTATIONS)*32, tbchrs(MAXSTATIONS)*14
REAL selv(MAXSTATIONS)
INTEGER isnm(MAXSTATIONS)
INTEGER ispri(MAXSTATIONS)
C
C* Add the station information
C
call FL_TBOP(tbfile, 'stns', lunstn, iret)
if (iret .ne. 0) then
CALL ER_WMSG('FL', iret, ' ', ier)
return
endif
nstn = 0
if (maxstn .gt. MAXSTATIONS) then
C Don't overflow any space we have
maxstn = MAXSTATIONS
endif
C
C* Read in the stations.
C
CALL TB_ASTN(lunstn, maxstn, nstn, stid, stnnam, isnm,
+ stat, coun, sta_lat, sta_lon, selv, ispri, tbchrs,
+ iret)
if (iret .ne. 0) then
CALL ER_WMSG('TB', iret, ' ', ier)
return
endif
do i = 1, nstn
stn_list(i) = stid(i)
enddo
C
C* Close station table.
C
CALL FL_CLOS(lunstn, iret)
return
end