Merge remote-tracking branch 'origin/release-v4.6.1'
[WRF.git] / var / external / bufr / datelen.f
blob0d0a6dcb24695bb5da08dcc3759e783bbcb35194
1 SUBROUTINE DATELEN(LEN)
3 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
5 C SUBPROGRAM: DATELEN
6 C PRGMMR: WOOLLEN ORG: NP20 DATE: 1998-07-08
8 C ABSTRACT: THIS SUBROUTINE IS USED TO SPECIFY THE LENGTH OF DATE-TIME
9 C VALUES THAT WILL BE OUTPUT BY FUTURE CALLS TO ANY OF THE BUFR
10 C ARCHIVE LIBRARY SUBROUTINES WHICH READ BUFR MESSAGES (E.G. READMG,
11 C READERME, ETC.). POSSIBLE VALUES ARE "8" (WHICH IS THE DEFAULT)
12 C AND "10".
14 C PROGRAM HISTORY LOG:
15 C 1998-07-08 J. WOOLLEN -- ORIGINAL AUTHOR (ENTRY POINT IN READMG)
16 C 2002-05-14 J. WOOLLEN -- CHANGED FROM AN ENTRY POINT TO INCREASE
17 C PORTABILITY TO OTHER PLATFORMS
18 C 2003-11-04 J. ATOR -- ADDED DOCUMENTATION
19 C 2003-11-04 S. BENDER -- ADDED REMARKS/BUFRLIB ROUTINE
20 C INTERDEPENDENCIES
21 C 2003-11-04 D. KEYSER -- UNIFIED/PORTABLE FOR WRF; ADDED HISTORY
22 C DOCUMENTATION; OUTPUTS MORE COMPLETE
23 C DIAGNOSTIC INFO WHEN ROUTINE TERMINATES
24 C ABNORMALLY
25 C 2004-12-20 D. KEYSER -- CALLS WRDLEN TO INITIALIZE LOCAL MACHINE
26 C INFORMATION (IN CASE IT HAS NOT YET BEEN
27 C CALLED), THIS ROUTINE DOES NOT REQUIRE IT
28 C BUT IT MAY SOMEDAY CALL OTHER ROUTINES THAT
29 C DO REQUIRE IT
31 C USAGE: CALL DATELEN (LEN)
32 C INPUT ARGUMENT LIST:
33 C LEN - INTEGER: LENGTH OF DATE-TIME VALUES TO BE OUTPUT BY
34 C READ SUBROUTINES: *
35 C 8 = YYMMDDHH (2-digit year)
36 C 10 = YYYYMMDDHH (4-digit year)
38 C REMARKS:
39 C THIS ROUTINE CALLS: BORT WRDLEN
40 C THIS ROUTINE IS CALLED BY: None
41 C Normally called only by application
42 C programs.
44 C ATTRIBUTES:
45 C LANGUAGE: FORTRAN 77
46 C MACHINE: PORTABLE TO ALL PLATFORMS
48 C$$$
50 COMMON /DATELN/ LENDAT
52 CHARACTER*128 BORT_STR
54 C-----------------------------------------------------------------------
55 C-----------------------------------------------------------------------
57 C CALL SUBROUTINE WRDLEN TO INITIALIZE SOME IMPORTANT INFORMATION
58 C ABOUT THE LOCAL MACHINE (IN CASE IT HAS NOT YET BEEN CALLED)
59 C ---------------------------------------------------------------
61 CALL WRDLEN
63 IF(LEN.NE.8 .AND. LEN.NE.10) GOTO 900
64 LENDAT = LEN
66 C EXITS
67 C -----
69 RETURN
70 900 WRITE(BORT_STR,'("BUFRLIB: DATELEN - INPUT ARGUMENT IS",I4," - '//
71 . 'IT MUST BE EITHER 8 OR 10")') LEN
72 CALL BORT(BORT_STR)
73 END