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)
105 900 CALL
bort(
'BUFRLIB: UFBPOS - INPUT BUFR FILE IS CLOSED, IT MUST'//
106 .
' BE OPEN FOR INPUT')
107 901 CALL
bort(
'BUFRLIB: UFBPOS - INPUT BUFR FILE IS OPEN FOR OUTPUT'//
108 .
', IT MUST BE OPEN FOR INPUT')
109 902
WRITE(bort_str,
'("BUFRLIB: UFBPOS - REQUESTED MESSAGE NUMBER '//
110 .
'TO READ IN (",I5,") IS NOT VALID")') irec
112 903
WRITE(bort_str,
'("BUFRLIB: UFBPOS - REQUESTED SUBSET NUMBER '//
113 .
'TO READ IN (",I5,") IS NOT VALID")') isub
115 904
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
119 905
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 ufbpos(LUNIT, IREC, ISUB, SUBSET, JDATE)
This subroutine repositions the file pointer to the beginning of a specified data subset within a spe...
subroutine status(LUNIT, LUN, IL, IM)
This subroutine checks whether a specified Fortran logical unit number is currently connected to the ...
void cewind(f77int *nfile)
This subroutine rewinds a BUFR file back to its beginning.
subroutine ufbcnt(LUNIT, KMSG, KSUB)
This subroutine returns the current location of the file pointer within a BUFR file, in terms of a message number counting from the beginning of the file, and a data subset number counting from the beginning of that message.
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
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.