NCEPLIBS-bufr  11.6.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> | Date | Programmer | Comments |
46 C> | -----|------------|----------|
47 C> | 2009-03-23 | J. Ator | Original author |
48 C>
49  SUBROUTINE strcpt(CF,IYR,IMO,IDY,IHR,IMI)
50 
51  COMMON /tnkrcp/ itryr,itrmo,itrdy,itrhr,itrmi,ctrt
52 
53  CHARACTER*128 bort_str
54  CHARACTER*1 ctrt, cf
55 
56 C-----------------------------------------------------------------------
57 C-----------------------------------------------------------------------
58 
59  CALL capit(cf)
60  IF(cf.NE.'Y'.AND. cf.NE.'N') goto 900
61 
62  ctrt = cf
63  IF(ctrt.EQ.'Y') THEN
64  itryr = iyr
65  itrmo = imo
66  itrdy = idy
67  itrhr = ihr
68  itrmi = imi
69  ENDIF
70 
71 C EXITS
72 C -----
73 
74  RETURN
75 900 WRITE(bort_str,'("BUFRLIB: STRCPT - INPUT ARGUMENT IS ",A1,'//
76  . '", IT MUST BE EITHER Y OR N")') cf
77  CALL bort(bort_str)
78  END
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
Definition: bort.f:22
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:49
subroutine capit(STR)
This subroutine capitalizes all of the alphabetic characters in a string.
Definition: capit.f:18