NCEPLIBS-bufr  11.7.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> | Date | Programmer | Comments |
43 C> | -----|------------|----------|
44 C> | 2009-03-23 | J. Ator | Original author |
45 C>
46  SUBROUTINE mtinfo ( CMTDIR, LUNMT1, LUNMT2 )
47 
48  COMMON /mstinf/ lun1, lun2, lmtd, mtdir
49 
50  CHARACTER*(*) cmtdir
51 
52  CHARACTER*128 bort_str
53  CHARACTER*100 mtdir
54 
55 C-----------------------------------------------------------------------
56 C-----------------------------------------------------------------------
57 
58  CALL strsuc( cmtdir, mtdir, lmtd )
59  IF ( lmtd .LT. 0 ) goto 900
60 
61  lun1 = lunmt1
62  lun2 = lunmt2
63 
64 C EXITS
65 C -----
66 
67  RETURN
68 900 bort_str = 'BUFRLIB: MTINFO - BAD INPUT MASTER TABLE DIRECTORY:'
69  CALL bort2(bort_str,cmtdir)
70  END
subroutine strsuc(STR1, STR2, LENS)
This subroutine removes leading and trailing blanks from a character string.
Definition: strsuc.f:23
subroutine bort2(STR1, STR2)
This subroutine calls subroutine errwrt() to log two error messages, then calls subroutine bort_exit(...
Definition: bort2.f:22
subroutine mtinfo(CMTDIR, LUNMT1, LUNMT2)
This subroutine allows the specification of the directory location and Fortran logical unit numbers t...
Definition: mtinfo.f:46