NCEPLIBS-bufr 11.7.1
datelen.f
Go to the documentation of this file.
1C> @file
2C> @brief Specify format of Section 1 date-time when reading
3C> BUFR messages.
4
5C> This subroutine is used to specify the format of Section 1
6C> date-time values that will be output by future calls to
7C> any of the BUFRLIB [message-reading subroutines](@ref hierarchy).
8C>
9C> @author J. Woollen
10C> @date 1998-07-08
11C>
12C> @param[in] LEN -- integer: Length of Section 1 date-time
13C> values to be output by all future calls
14C> to message-reading subroutines
15C> - 8 = YYMMDDHH format with 2-digit year
16C> (the default)
17C> - 10 = YYYYMMDDHH format with 4-digit year
18C>
19C> <p>This subroutine can be called at any time from within the
20C> application program, and the specified value for LEN will remain
21C> in effect for all future calls to any of the BUFRLIB subroutines
22C> which read BUFR messages, unless a subsequent call is made to this
23C> subroutine to reset the value of LEN again. If this subroutine is
24C> never called, a default value of 8 is used for LEN, as set within
25C> subroutine bfrini().
26C>
27C> <b>Program history log:</b>
28C> | Date | Programmer | Comments |
29C> | -----|------------|----------|
30C> | 1998-07-08 | J. Woollen | Original author |
31C> | 2002-05-14 | J. Woollen | Changed from an entry point in readmg() to stand-alone subroutine, to increase portability to other platforms |
32C> | 2003-11-04 | J. Ator | Added documentation |
33C> | 2004-12-20 | D. Keyser | Calls wrdlen() to initialize local machine information, in case it has not yet been called |
34C>
35 SUBROUTINE datelen(LEN)
36
37 COMMON /dateln/ lendat
38
39 CHARACTER*128 BORT_STR
40
41C-----------------------------------------------------------------------
42C-----------------------------------------------------------------------
43
44C CALL SUBROUTINE WRDLEN TO INITIALIZE SOME IMPORTANT INFORMATION
45C ABOUT THE LOCAL MACHINE (IN CASE IT HAS NOT YET BEEN CALLED)
46C ---------------------------------------------------------------
47
48 CALL wrdlen
49
50 IF(len.NE.8 .AND. len.NE.10) GOTO 900
51 lendat = len
52
53C EXITS
54C -----
55
56 RETURN
57900 WRITE(bort_str,'("BUFRLIB: DATELEN - INPUT ARGUMENT IS",I4," - '//
58 . 'IT MUST BE EITHER 8 OR 10")') len
59 CALL bort(bort_str)
60 END
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
Definition: bort.f:23
subroutine datelen(LEN)
This subroutine is used to specify the format of Section 1 date-time values that will be output by fu...
Definition: datelen.f:36
subroutine wrdlen
This subroutine figures out some important information about the local machine on which the BUFRLIB s...
Definition: wrdlen.F:36