cable.f
c read gh##0
C cut data during course change dhead>10
c
c
c data read gh##0
c
c **** data ****
c iyr:Year, jdy:Julian day, min:time(GMT in minutes),
c alat(latitude TKY deg), alon(longitude TKY deg),
c spd:speed, hg:course(clockwise from North),
c idpc:corrected depth, mgt:total magnetic force,
c mga:magnetic anomaly, gr:gravity reading, gt1:absolute gravity value,
c ga:free-air anomaly
c
c 1984年から1分データ。それ以前は5分データ。
c
dimension iyr(30000),jdy(30000),min(30000),fair(30000)
dimension alt(30000),aln(30000),jdp(30000),mgt(30000),gt1(30000)
dimension mga(30000),grard(30000),spd(30000),hdg(30000)
c
open(10,file='gh90a.data0',status='old')
open(20,file='gh90a.datam0')
c
k=0
1 continue
k=k+1
read(10,*,end=99) iyr0,jdy0,min0,alat0,alon0,
+ spd0,hg0,idpc0,mgt0,mga0,gr0,gt10,ga0
iyr(k)=iyr0
jdy(k)=jdy0
min(k)=min0
alt(k)=alat0
aln(k)=alon0
spd(k)=spd0
hdg(k)=hg0
jdp(k)=idpc0
mgt(k)=mgt0
mga(k)=mga0
grard(k)=gr0
gt1(k)=gt10
fair(k)=ga0
go to 1
99 close(10)
jnum=k
write(6,*) jnum
c
do 10 i=1, jnum-1
kmin=min(i+1)-min(i)
if(kmin.eq.1) then
write(20,205) iyr(i),jdy(i),min(i),alt(i),aln(i),
+ spd(i),hdg(i),jdp(i),mgt(i+1),mga(i+1),
+ grard(i),gt1(i),fair(i)
go to 10
end if
10 continue
close(20)
205 format(i2,i4,i5,f10.5,f11.5,f6.2,f6.1,i6,i6,i6,f8.1,f10.1,f8.1)
stop
end