50 SUBROUTINE ufbpos(LUNIT,IREC,ISUB,SUBSET,JDATE)
55 CHARACTER*128 BORT_STR
64 CALL status(lunit,lun,il,im)
68 IF(irec.LE.0)
GOTO 902
69 IF(isub.LE.0)
GOTO 903
74 CALL ufbcnt(lunit,jrec,jsub)
79 IF(irec.LT.jrec .OR. (irec.EQ.jrec.AND.isub.LT.jsub))
THEN
83 CALL ufbcnt(lunit,jrec,jsub)
89 DO WHILE (irec.GT.jrec)
90 CALL readmg(lunit,subset,jdate,iret)
91 IF(iret.LT.0)
GOTO 904
92 CALL ufbcnt(lunit,jrec,jsub)
95 DO WHILE (isub.GT.jsub)
97 IF(iret.NE.0)
GOTO 905
98 CALL ufbcnt(lunit,jrec,jsub)
105900
CALL bort(
'BUFRLIB: UFBPOS - INPUT BUFR FILE IS CLOSED, IT MUST'//
106 .
' BE OPEN FOR INPUT')
107901
CALL bort(
'BUFRLIB: UFBPOS - INPUT BUFR FILE IS OPEN FOR OUTPUT'//
108 .
', IT MUST BE OPEN FOR INPUT')
109902
WRITE(bort_str,
'("BUFRLIB: UFBPOS - REQUESTED MESSAGE NUMBER '//
110 .
'TO READ IN (",I5,") IS NOT VALID")') irec
112903
WRITE(bort_str,
'("BUFRLIB: UFBPOS - REQUESTED SUBSET NUMBER '//
113 .
'TO READ IN (",I5,") IS NOT VALID")') isub
115904
WRITE(bort_str,
'("BUFRLIB: UFBPOS - REQUESTED MESSAGE NUMBER '//
116 .
'TO READ IN (",I5,") EXCEEDS THE NUMBER OF MESSAGES IN THE '//
117 .
'FILE (",I5,")")') irec,jrec
119905
WRITE(bort_str,
'("BUFRLIB: UFBPOS - REQ. SUBSET NUMBER TO READ'//
120 .
' IN (",I3,") EXCEEDS THE NUMBER OF SUBSETS (",I3,") IN THE '//
121 .
'REQ. MESSAGE (",I5,")")') isub,ksub,irec
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
void cewind(f77int *nfile)
This subroutine rewinds a BUFR file back to its beginning.
This module contains array and variable declarations used to store BUFR messages internally for multi...
subroutine readmg(LUNXX, SUBSET, JDATE, IRET)
This subroutine reads the next BUFR message from logical unit ABS(LUNXX) into internal arrays.
subroutine readsb(LUNIT, IRET)
This subroutine reads the next data subset from a BUFR message into internal arrays.
subroutine status(LUNIT, LUN, IL, IM)
This subroutine checks whether a specified Fortran logical unit number is currently connected to the ...
subroutine ufbcnt(LUNIT, KMSG, KSUB)
This subroutine returns the current location of the file pointer within a BUFR file,...
subroutine ufbpos(LUNIT, IREC, ISUB, SUBSET, JDATE)
This subroutine repositions the file pointer to the beginning of a specified data subset within a spe...