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