Skip to content

Commit

Permalink
converting baread to bareadl
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Feb 5, 2024
1 parent b71d608 commit b420a11
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/g2index.F90
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,8 @@ SUBROUTINE IXGB2(LUGB, LSKIP, LGRIB, CBUF, NUMFLD, MLEN, IRET)
integer :: mxlen, mxds, mxfld, mxbms
integer :: init, ixlus, lugb, lskip, lgrib, numfld, mlen, iret
integer :: ixsgd, ibread, ibskip, ilndrs, ilnpds, istat, ixds
integer (kind = 8) :: lskip8, ibread8, lbread8, ibskip8, lengds8, ilnpds8
integer (kind = 8) :: lskip8, ibread8, lbread8, ibskip8, lengds8
integer (kind = 8) :: ilnpds8, ilndrs8
integer :: ixspd, ixfld, ixids, ixlen, ixsbm, ixsdr
integer :: lbread, lensec, lensec1
parameter(linmax = 5000, init = 50000, next = 10000)
Expand Down Expand Up @@ -777,15 +778,17 @@ SUBROUTINE IXGB2(LUGB, LSKIP, LGRIB, CBUF, NUMFLD, MLEN, IRET)
return
endif
lindex = lindex + ilnpds
ELSEIF (NUMSEC .EQ. 5) THEN ! FOUND DRS
CALL G2_SBYTEC(CINDEX, IBSKIP-LSKIP, 8 * IXSDR, 8 * MXSDR) ! LOCATION OF DRS
ILNDRS = LENSEC
CALL BAREAD(LUGB, IBSKIP, ILNDRS, LBREAD, CINDEX(LINDEX + 1))
IF (LBREAD .NE. ILNDRS) THEN
IRET = 2
RETURN
ENDIF
LINDEX = LINDEX + ILNDRS
elseif (numsec .eq. 5) then ! found drs
call g2_sbytec(cindex, ibskip-lskip, 8 * ixsdr, 8 * mxsdr) ! location of drs
ilndrs = lensec
ibskip8 = ibskip
ilndrs8 = ilndrs
call bareadl(lugb, ibskip8, ilndrs8, lbread8, cindex(lindex + 1))
if (lbread8 .ne. ilndrs8) then
iret = 2
return
endif
lindex = lindex + ilndrs
ELSEIF (NUMSEC .EQ. 6) THEN ! FOUND BMS
INDBMP = MOVA2I(CBREAD(6))
IF (INDBMP.LT.254) THEN
Expand Down

0 comments on commit b420a11

Please sign in to comment.