NCEPLIBS-bufr  11.5.0
 All Data Structures Files Functions Variables Pages
strcpt.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Specify a tank receipt time to be included in Section 1
3 C> when writing BUFR messages.
4 
5 C> This subroutine is used to specify a tank receipt time to be
6 C> included within Section 1 of all BUFR messages output by future calls
7 C> to [message-writing subroutines](@ref hierarchy) and
8 C> [subset-writing subroutines](@ref hierarchy).
9 C>
10 C> @author J. Ator
11 C> @date 2009-03-23
12 C>
13 C> @param[in] CF - character*1: Flag indicating whether future BUFR
14 C> output messages should include the tank receipt
15 C> time defined by IYR, IMO, IDY, IHR, and IMI:
16 C> - 'N' = No (the default)
17 C> - 'Y' = Yes
18 C> @param[in] IYR - integer: Tank receipt year
19 C> @param[in] IMO - integer: Tank receipt month
20 C> @param[in] IDY - integer: Tank receipt day
21 C> @param[in] IHR - integer: Tank receipt hour
22 C> @param[in] IMI - integer: Tank receipt minute
23 C>
24 C> <p>This subroutine can be called at any time after the first call
25 C> to subroutine openbf(), and the specified value for CF will remain
26 C> in effect for all future calls to
27 C> [message-writing subroutines](@ref hierarchy) and
28 C> [subset-writing subroutines](@ref hierarchy), for all Fortran logical
29 C> units that are open for output within the application program,
30 C> unless a subsequent call is made to this subroutine to reset the
31 C> value of CF again. If this subroutine is never called, a default
32 C> value of 'N' is used for CF, as set within subroutine bfrini().
33 C>
34 C> <p>Whenever this subroutine is called with CF = 'N', the values in
35 C> IYR, IMO, IDY, IHR, and IMI are ignored.
36 C>
37 C> @remarks
38 C> - Tank receipt time is an NCEP extension to Section 1 of the
39 C> [official WMO BUFR regulations](@ref manual).
40 C> However, it's encoded by the BUFRLIB software in such a way that
41 C> its inclusion within an output BUFR message is still fully
42 C> compliant with the regulations.
43 C>
44 C> <b>Program history log:</b>
45 C> - 2009-03-23 J. Ator -- Original author
46 C>
47  SUBROUTINE strcpt(CF,IYR,IMO,IDY,IHR,IMI)
48 
49  COMMON /tnkrcp/ itryr,itrmo,itrdy,itrhr,itrmi,ctrt
50 
51  CHARACTER*128 bort_str
52  CHARACTER*1 ctrt, cf
53 
54 C-----------------------------------------------------------------------
55 C-----------------------------------------------------------------------
56 
57  CALL capit(cf)
58  IF(cf.NE.'Y'.AND. cf.NE.'N') goto 900
59 
60  ctrt = cf
61  IF(ctrt.EQ.'Y') THEN
62  itryr = iyr
63  itrmo = imo
64  itrdy = idy
65  itrhr = ihr
66  itrmi = imi
67  ENDIF
68 
69 C EXITS
70 C -----
71 
72  RETURN
73 900 WRITE(bort_str,'("BUFRLIB: STRCPT - INPUT ARGUMENT IS ",A1,'//
74  . '", IT MUST BE EITHER Y OR N")') cf
75  CALL bort(bort_str)
76  END
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
Definition: bort.f:23
subroutine strcpt(CF, IYR, IMO, IDY, IHR, IMI)
This subroutine is used to specify a tank receipt time to be included within Section 1 of all BUFR me...
Definition: strcpt.f:47
subroutine capit(STR)
THIS SUBROUTINE CAPITALIZES A STRING OF CHARACTERS.
Definition: capit.f:39