[Fortran] 纯文本查看 复制代码
See if data types
indx = index(line,'# / TYPES OF OBSERV')
if( indx .gt.0 ) then
* MOD TAH 090114: Allow for more than 9 entries on a line
read(line,fmt='(i6,9(4x,a2))',iostat=jerr) xf_ndat,
. (datatypes(i),i=1, min(xf_ndat,9)) ! MOD kfhe 130913
xf_msat = 0
call report_error('IOSTAT',jerr,'decod',line,0,'RXHEAD')
if( xf_ndat.gt.xf_maxdat ) then
write(*,180) xf_ndat, xf_maxdat
180 format('**DISASTER** Too many observables. ',
. I3,' in current RX file, ',i3,
. ' set in xf_maxdat')
stop 'TRACK DISASTER: Too many observables'
end if
**** See if we need to read next line
if( xf_ndat.gt. 9 ) then
read(obs_lu,'(a)',iostat=ierr) line
call report_error('IOSTAT',ierr,'read',obs_file,
. 0,'RXHEAD')
read(line,fmt='(6x, 9(4x,a2) )',iostat=jerr)
. (datatypes(i),i=10, xf_ndat)
endif
* MOD TAH 100717: Changed C1 to type 5 and test later and use only if
* P1 not available.
* MOD TAH 130425: Added C2 as type 8, used if P2 is not available
xf_mdat = 0
xf_dattyp = 0 ! MOD by kfhe 130913: for better
do i = 1, xf_ndat
if (datatypes(i).eq.'L1') xf_dattyp(i) = 1
if (datatypes(i).eq.'L2') xf_dattyp(i) = 2
if (datatypes(i).eq.'P1') xf_dattyp(i) = 3
if (datatypes(i).eq.'P2') xf_dattyp(i) = 4
if (datatypes(i).eq.'C1') xf_dattyp(i) = 5
if (datatypes(i).eq.'D1') xf_dattyp(i) = 6
if (datatypes(i).eq.'D2') xf_dattyp(i) = 7
if (datatypes(i).eq.'C2') xf_dattyp(i) = 8
if (datatypes(i).eq.'S1') xf_dattyp(i) = 9 ! MOD kfhe 130913
if (datatypes(i).eq.'S2') xf_dattyp(i) = 10
if (datatypes(i).eq.'L5') xf_dattyp(i) = 11
if (datatypes(i).eq.'C5') xf_dattyp(i) = 12
if (datatypes(i).eq.'D5') xf_dattyp(i) = 13
if (xf_mdat.lt.xf_dattyp(i))
. xf_mdat = xf_dattyp(i)
end do
write(*,fmt='(/,a,a120)')'read_rinex_head.f in:',obs_file
write(*,fmt='( 2(a,i4) )')'NUM',xf_ndat,' xf_mdat',xf_mdat
write(*,fmt='(a,20a3)')'datatypes ', datatypes(1:xf_ndat)
write(*,fmt='(a,20i3)')'xf_dattyp ', xf_dattyp(1:xf_ndat)
end if
想知道是什么原因?困扰好久了,最近学习老师的程序,小白一枚,求各位大佬帮帮!