NCEPLIBS-bufr 11.7.1
rtrcpt.f
Go to the documentation of this file.
1C> @file
2C> @brief Read the tank receipt time from Section 1 of a BUFR message.
3
4C> This subroutine reads the tank receipt time (if one exists) from
5C> Section 1 of a BUFR message. It is similar to subroutine rtrcptb(),
6C> except that rtrcptb() operates on a BUFR message passed in via a
7C> memory array, whereas this subroutine operates on the BUFR message
8C> that was read into internal arrays via the most recent call to any
9C> of the other [message-reading subroutines](@ref hierarchy) for a
10C> specified Fortran logical unit.
11C>
12C> @author J. Ator
13C> @date 2009-03-23
14C>
15C> @param[in] LUNIT -- integer: Fortran logical unit number for
16C> BUFR file
17C> @param[out] IYR -- integer: Tank receipt year
18C> @param[out] IMO -- integer: Tank receipt month
19C> @param[out] IDY -- integer: Tank receipt day
20C> @param[out] IHR -- integer: Tank receipt hour
21C> @param[out] IMI -- integer: Tank receipt minute
22C> @param[out] IRET -- integer: return code
23C> - 0 = normal return
24C> - -1 = no tank receipt time exists within the
25C> BUFR message currently open for input
26C> within internal arrays
27C>
28C> <b>Program history log:</b>
29C> | Date | Programmer | Comments |
30C> | -----|------------|----------|
31C> | 2009-03-23 | J. Ator | Original author |
32C> | 2013-10-07 | J. Ator | Modified to call rtrcptb() |
33C> | 2014-12-10 | J. Ator | Use modules instead of COMMON blocks |
34C>
35 SUBROUTINE rtrcpt(LUNIT,IYR,IMO,IDY,IHR,IMI,IRET)
36
37 USE moda_bitbuf
38
39C-----------------------------------------------------------------------
40C-----------------------------------------------------------------------
41
42C Check the file status.
43
44 CALL status(lunit,lun,il,im)
45 IF(il.EQ.0) GOTO 900
46 IF(il.GT.0) GOTO 901
47 IF(im.EQ.0) GOTO 902
48
49C Unpack the tank receipt time.
50
51 CALL rtrcptb(mbay(1,lun),iyr,imo,idy,ihr,imi,iret)
52
53C EXITS
54C -----
55
56 RETURN
57900 CALL bort('BUFRLIB: RTRCPT - INPUT BUFR FILE IS CLOSED; IT '//
58 . 'MUST BE OPEN FOR INPUT')
59901 CALL bort('BUFRLIB: RTRCPT - INPUT BUFR FILE IS OPEN FOR '//
60 . 'OUTPUT; IT MUST BE OPEN FOR INPUT')
61902 CALL bort('BUFRLIB: RTRCPT - A MESSAGE MUST BE OPEN IN INPUT '//
62 . 'BUFR FILE; NONE ARE')
63 END
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
Definition: bort.f:23
This module contains array and variable declarations used to store BUFR messages internally for multi...
Definition: moda_bitbuf.F:10
integer, dimension(:,:), allocatable mbay
Current BUFR message for each internal I/O stream.
Definition: moda_bitbuf.F:26
subroutine rtrcpt(LUNIT, IYR, IMO, IDY, IHR, IMI, IRET)
This subroutine reads the tank receipt time (if one exists) from Section 1 of a BUFR message.
Definition: rtrcpt.f:36
subroutine rtrcptb(MBAY, IYR, IMO, IDY, IHR, IMI, IRET)
This subroutine reads the tank receipt time (if one exists) from Section 1 of a BUFR message.
Definition: rtrcptb.f:32
subroutine status(LUNIT, LUN, IL, IM)
This subroutine checks whether a specified Fortran logical unit number is currently connected to the ...
Definition: status.f:56