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