NCEPLIBS-bufr  11.5.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> - 2009-03-23 J. Ator -- Original author
30 C> - 2013-10-07 J. Ator -- Modified to call rtrcptb()
31 C> - 2014-12-10 J. Ator -- Use modules instead of COMMON blocks
32 C>
33  SUBROUTINE rtrcpt(LUNIT,IYR,IMO,IDY,IHR,IMI,IRET)
34 
35  USE moda_bitbuf
36 
37 C-----------------------------------------------------------------------
38 C-----------------------------------------------------------------------
39 
40 C Check the file status.
41 
42  CALL status(lunit,lun,il,im)
43  IF(il.EQ.0) goto 900
44  IF(il.GT.0) goto 901
45  IF(im.EQ.0) goto 902
46 
47 C Unpack the tank receipt time.
48 
49  CALL rtrcptb(mbay(1,lun),iyr,imo,idy,ihr,imi,iret)
50 
51 C EXITS
52 C -----
53 
54  RETURN
55 900 CALL bort('BUFRLIB: RTRCPT - INPUT BUFR FILE IS CLOSED; IT '//
56  . 'MUST BE OPEN FOR INPUT')
57 901 CALL bort('BUFRLIB: RTRCPT - INPUT BUFR FILE IS OPEN FOR '//
58  . 'OUTPUT; IT MUST BE OPEN FOR INPUT')
59 902 CALL bort('BUFRLIB: RTRCPT - A MESSAGE MUST BE OPEN IN INPUT '//
60  . 'BUFR FILE; NONE ARE')
61  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:29
subroutine status(LUNIT, LUN, IL, IM)
This subroutine checks whether a specified Fortran logical unit number is currently connected to the ...
Definition: status.f:61
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:33
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