c*********************************************************** c* fortran program to read and write gcpoint.asc (file 17) * c*********************************************************** integer nlin integer id, slyr, trid real sllong, sllat, slr, slg, slc, sls real trlong, trlat, travg, trmax, trlvl character slname*40, trname*40 c*********************************************************** c* initialize a counter and open files for input/output * c*********************************************************** nlin=0 open(unit=5,file='gcpoint.asc',readonly,status='old') open(unit=6,file='gcpoint.out',status='new') c*********************************************************** c* read/write the point id and the 15 station variables * c*********************************************************** 10 read (5,100,end=999) id, sllong, sllat, slr, slg, 1 slc, sls, slyr, slname read(5,110) trlong, trlat, travg, trmax, trlvl, 1 trid, trname if (nlin.gt.32) nlin=0 if (nlin.eq.0) write (6,120) if (nlin.eq.0) write (6,130) nlin=nlin+1 write(6,105) id, sllong, sllat, slr, slg, 1 slc, sls, slyr, slname write(6,115) trlong, trlat, travg, trmax, trlvl, 1 trid, trname 20 continue go to 10 100 format (i5,6f8.2,i4,a40) 105 format (1x,i5,6f8.2,i4,a40) 110 format (5f8.2,i5,a40) 115 format (1x,5f8.2,i5,a40) 120 format (4x,'id',2x,'sllong',3x,'sllat',5x,'slr', 1 5x,'slg',5x,'slc',5x,'sls',1x,'slyr',1x,'slname') 130 format (3x,'trlong',3x,'trlat',3x,'travg',3x,'trmax', 1 3x,'trlvl',1x,'trid',1x,'trname') c*********************************************************** c***** close files and exit ****** c*********************************************************** 999 close(unit=5) close(unit=6) stop end