NCEPLIBS-bufr  12.0.0
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 C>
4 C> @author J. Ator @date 2009-03-23
5 
6 C> Specify the directory location
7 C> and Fortran logical unit numbers to be used when reading master
8 C> BUFR tables on the local file system.
9 C>
10 C> @param[in] CMTDIR - character*(*): Directory location of master
11 C> BUFR tables on local file system (up to 240 characters).
12 C> @param[in] LUNMT1 - integer: First Fortran logical unit number
13 C> to use when reading master BUFR tables on local file system.
14 C> @param[in] LUNMT2 - integer: Second Fortran logical unit number
15 C> to use when reading master BUFR tables on local file system.
16 C>
17 C> See [Master BUFR Tables](@ref dfbfmstab)
18 C> for more information about master BUFR tables. In particular, note
19 C> that this subroutine is normally only ever called after a prior call
20 C> has been made to subroutine openbf() with IO = 'SEC3'. But in such
21 C> cases, any call to this subroutine must be made prior to any
22 C> subsequent calls to any of the BUFR
23 C> [message-reading subroutines](@ref hierarchy) for the associated BUFR
24 C> file; otherwise, default values for CMTDIR, LUNMT1 and LUNMT2 will be
25 C> used as defined within subroutine bfrini().
26 C>
27 C> For CMTDIR, any full or relative directory pathname that is legal
28 C> on the local filesystem is permissible, up to a total maximum length
29 C> of 240 characters. The library will then automatically search
30 C> within this directory for any necessary master table files and open and
31 C> read them as needed.
32 C>
33 C> The logical unit numbers LUNMT1 and LUNMT2 should be distinct from
34 C> each other but should not already be assigned to any files on the
35 C> local system.
36 C>
37 C> @author J. Ator @date 2009-03-23
38  RECURSIVE SUBROUTINE mtinfo ( CMTDIR, LUNMT1, LUNMT2 )
39 
40  USE modv_im8b
41 
42  COMMON /mstinf/ lun1, lun2, lmtd, mtdir
43 
44  CHARACTER*(*) cmtdir
45 
46  CHARACTER*240 mtdir
47 
48 C-----------------------------------------------------------------------
49 C-----------------------------------------------------------------------
50 
51 C CHECK FOR I8 INTEGERS
52 C ---------------------
53  IF(im8b) THEN
54  im8b=.false.
55 
56  CALL x84 ( lunmt1, my_lunmt1, 1 )
57  CALL x84 ( lunmt2, my_lunmt2, 1 )
58  CALL mtinfo ( cmtdir, my_lunmt1, my_lunmt2 )
59 
60  im8b=.true.
61  RETURN
62  ENDIF
63 
64  CALL strsuc ( cmtdir, mtdir, lmtd )
65 
66  lun1 = lunmt1
67  lun2 = lunmt2
68 
69 C EXITS
70 C -----
71 
72  RETURN
73  END
recursive subroutine mtinfo(CMTDIR, LUNMT1, LUNMT2)
Specify the directory location and Fortran logical unit numbers to be used when reading master BUFR t...
Definition: mtinfo.f:39
This module declares and initializes the IM8B variable.
logical, public im8b
Status indicator to keep track of whether all future calls to BUFRLIB subroutines and functions from ...
subroutine strsuc(str1, str2, lens)
This subroutine removes leading and trailing blanks from a character string.
Definition: strsuc.F90:16
subroutine x84(IIN8, IOUT4, NVAL)
Encode one or more 8-byte integer values as 4-byte integer values.
Definition: x84.F:19