NCEPLIBS-bufr  11.5.0
 All Data Structures Files Functions Variables Pages
mtinfo.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Specify location of master BUFR tables on local file system
3 
4 C> This subroutine allows the specification of the directory location
5 C> and Fortran logical unit numbers to be used when reading master
6 C> BUFR tables on the local file system.
7 C>
8 C> @author J. Ator
9 C> @date 2009-03-23
10 C>
11 C> @param[in] CMTDIR - character*(*): Directory location of master
12 C> BUFR tables on local file system
13 C> (up to 100 characters)
14 C> @param[in] LUNMT1 - integer: First Fortran logical unit number
15 C> to use when reading master BUFR tables on
16 C> local file system
17 C> @param[in] LUNMT2 - integer: Second Fortran logical unit number
18 C> to use when reading master BUFR tables on
19 C> local file system
20 C>
21 C> <p>See [Master BUFR Tables](@ref dfbfmstab)
22 C> for more information about master BUFR tables. In particular, note
23 C> that this subroutine is normally only ever called after a prior call
24 C> has been made to subroutine openbf() with IO = 'SEC3'. But in such
25 C> cases, any call to this subroutine must be made prior to any
26 C> subsequent calls to any of the BUFR
27 C> [message-reading subroutines](@ref hierarchy) for the associated BUFR
28 C> file; otherwise, default values for CMTDIR, LUNMT1 and LUNMT2 will be
29 C> used as defined within subroutine bfrini().
30 C>
31 C> <p>For CMTDIR, any full or relative directory pathname that is legal
32 C> on the local filesystem is permissible, up to a total maximum length
33 C> of 100 characters. The BUFRLIB software will then automatically search
34 C> within this directory for any necessary master table files and open and
35 C> read them as needed.
36 C>
37 C> <p>The logical unit numbers LUNMT1 and LUNMT2 should be distinct from
38 C> each other but should not already be assigned to any files on the
39 C> local system.
40 C>
41 C> <b>Program history log:</b>
42 C> - 2009-03-23 J. Ator -- Original author
43 C>
44  SUBROUTINE mtinfo ( CMTDIR, LUNMT1, LUNMT2 )
45 
46  COMMON /mstinf/ lun1, lun2, lmtd, mtdir
47 
48  CHARACTER*(*) cmtdir
49 
50  CHARACTER*128 bort_str
51  CHARACTER*100 mtdir
52 
53 C-----------------------------------------------------------------------
54 C-----------------------------------------------------------------------
55 
56  CALL strsuc( cmtdir, mtdir, lmtd )
57  IF ( lmtd .LT. 0 ) goto 900
58 
59  lun1 = lunmt1
60  lun2 = lunmt2
61 
62 C EXITS
63 C -----
64 
65  RETURN
66 900 bort_str = 'BUFRLIB: MTINFO - BAD INPUT MASTER TABLE DIRECTORY:'
67  CALL bort2(bort_str,cmtdir)
68  END
subroutine strsuc(STR1, STR2, LENS)
THIS SUBROUTINE REMOVES LEADING AND TRAILING BLANKS FROM A STRING.
Definition: strsuc.f:34
subroutine bort2(STR1, STR2)
This subroutine calls subroutine errwrt() to log two error messages, then calls subroutine bort_exit(...
Definition: bort2.f:20
subroutine mtinfo(CMTDIR, LUNMT1, LUNMT2)
This subroutine allows the specification of the directory location and Fortran logical unit numbers t...
Definition: mtinfo.f:44