NCEPLIBS-bufr 11.7.1
strcpt.f
Go to the documentation of this file.
1C> @file
2C> @brief Specify a tank receipt time to be included in Section 1
3C> when writing BUFR messages.
4
5C> This subroutine is used to specify a tank receipt time to be
6C> included within Section 1 of all BUFR messages output by future calls
7C> to [message-writing subroutines](@ref hierarchy) and
8C> [subset-writing subroutines](@ref hierarchy).
9C>
10C> @author J. Ator
11C> @date 2009-03-23
12C>
13C> @param[in] CF -- character*1: Flag indicating whether future BUFR
14C> output messages should include the tank receipt
15C> time defined by IYR, IMO, IDY, IHR, and IMI:
16C> - 'N' = No (the default)
17C> - 'Y' = Yes
18C> @param[in] IYR -- integer: Tank receipt year
19C> @param[in] IMO -- integer: Tank receipt month
20C> @param[in] IDY -- integer: Tank receipt day
21C> @param[in] IHR -- integer: Tank receipt hour
22C> @param[in] IMI -- integer: Tank receipt minute
23C>
24C> <p>This subroutine can be called at any time after the first call
25C> to subroutine openbf(), and the specified value for CF will remain
26C> in effect for all future calls to
27C> [message-writing subroutines](@ref hierarchy) and
28C> [subset-writing subroutines](@ref hierarchy), for all Fortran logical
29C> units that are open for output within the application program,
30C> unless a subsequent call is made to this subroutine to reset the
31C> value of CF again. If this subroutine is never called, a default
32C> value of 'N' is used for CF, as set within subroutine bfrini().
33C>
34C> <p>Whenever this subroutine is called with CF = 'N', the values in
35C> IYR, IMO, IDY, IHR, and IMI are ignored.
36C>
37C> @remarks
38C> - Tank receipt time is an NCEP extension to Section 1 of the
39C> [official WMO BUFR regulations](@ref manual).
40C> However, it's encoded by the BUFRLIB software in such a way that
41C> its inclusion within an output BUFR message is still fully
42C> compliant with the regulations.
43C>
44C> <b>Program history log:</b>
45C> | Date | Programmer | Comments |
46C> | -----|------------|----------|
47C> | 2009-03-23 | J. Ator | Original author |
48C>
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
56C-----------------------------------------------------------------------
57C-----------------------------------------------------------------------
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
71C EXITS
72C -----
73
74 RETURN
75900 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:23
subroutine capit(STR)
This subroutine capitalizes all of the alphabetic characters in a string.
Definition: capit.f:19
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:50