Fix mismatched iand parameter types

LT1AB
Ryan Burns 2019-08-26 09:38:36 -07:00
parent e53e7f4b17
commit 950708ff66
1 changed files with 10 additions and 6 deletions

View File

@ -21,6 +21,7 @@ c get alos position and times
integer*1 indata(32768) integer*1 indata(32768)
integer statb(13),stat integer statb(13),stat
integer numdata,rowPos,colPos,eof integer numdata,rowPos,colPos,eof
integer*4 unpackBytes
c read the leader file descriptor record c read the leader file descriptor record
!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!
@ -106,12 +107,9 @@ c read in the raw data file line by line
do i=1,nlines do i=1,nlines
! jng ierr=ioread(ichandata,indata,len) ! jng ierr=ioread(ichandata,indata,len)
call getLineSequential(rawAccessor,indata,eof) call getLineSequential(rawAccessor,indata,eof)
iyear=iand(indata(40),255)*256*256*256+iand(indata(39),255)*256*256+ iyear = unpackBytes(indata(40), indata(39), indata(38), indata(37))
$ iand(indata(38),255)*256+iand(indata(37),255) idoy = unpackBytes(indata(44), indata(43), indata(42), indata(41))
idoy=iand(indata(44),255)*256*256*256+iand(indata(43),255)*256*256+ ims = unpackBytes(indata(48), indata(47), indata(46), indata(45))
$ iand(indata(42),255)*256+iand(indata(41),255)
ims=iand(indata(48),255)*256*256*256+iand(indata(47),255)*256*256+
$ iand(indata(46),255)*256+iand(indata(45),255)
ddate(2) = ims*1000.0 !we save days in the year and microsec in the day ddate(2) = ims*1000.0 !we save days in the year and microsec in the day
ddate(1) = 1.*idoy ddate(1) = 1.*idoy
call setLineSequential(auxAccessor,ddate) call setLineSequential(auxAccessor,ddate)
@ -144,3 +142,9 @@ c print *,val
return return
end end
integer*4 function unpackBytes(i1, i2, i3, i4)
integer*4 i1, i2, i3, i4
unpackBytes = iand(i1, 255)*256*256*256 + iand(i2, 255)*256*256 +
$ iand(i3, 255)*256 + iand(i4, 255)
end function