NCEPLIBS-bufr  12.0.1
nenubd.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Confirm that a mnemonic and FXY value haven't already been defined.
3 C>
4 C> @author J. Woollen @date 1994-01-06
5 
6 C> Confirm that a mnemonic and FXY value haven't already been defined.
7 C>
8 C> This subroutine checks a mnemonic and FXY value pair that were read
9 C> from a user-supplied BUFR DX dictionary table in character format,
10 C> in order to make sure that neither value has already been
11 C> defined within internal BUFR table B or D (in module @ref moda_tababd) for
12 C> the given LUN. If either value has already been defined for this
13 C> LUN, then an appropriate call is made to BUFR archive library
14 C> subroutine bort().
15 C>
16 C> @param[in] NEMO - character*8: Mnemonic.
17 C> @param[in] NUMB - character*6: FXY value associated with NEMO.
18 C> @param[in] LUN - integer: File ID.
19 C>
20 C> @author J. Woollen @date 1994-01-06
21  SUBROUTINE nenubd(NEMO,NUMB,LUN)
22 
23  USE moda_tababd
24 
25  CHARACTER*128 BORT_STR
26  CHARACTER*8 NEMO
27  CHARACTER*6 NUMB
28 
29 C-----------------------------------------------------------------------
30 C-----------------------------------------------------------------------
31 C CHECK TABLE B AND D
32 C -------------------
33 
34  DO n=1,ntbb(lun)
35  IF(numb.EQ.tabb(n,lun)(1: 6)) GOTO 900
36  IF(nemo.EQ.tabb(n,lun)(7:14)) GOTO 901
37  ENDDO
38 
39  DO n=1,ntbd(lun)
40  IF(numb.EQ.tabd(n,lun)(1: 6)) GOTO 902
41  IF(nemo.EQ.tabd(n,lun)(7:14)) GOTO 903
42  ENDDO
43 
44 C EXITS
45 C -----
46 
47  RETURN
48 900 WRITE(bort_str,'("BUFRLIB: NENUBD - TABLE B FXY VALUE (",A,") '//
49  . 'HAS ALREADY BEEN DEFINED (DUPLICATE)")') numb
50  CALL bort(bort_str)
51 901 WRITE(bort_str,'("BUFRLIB: NENUBD - TABLE B MNEMONIC (",A,") '//
52  . 'HAS ALREADY BEEN DEFINED (DUPLICATE)")') nemo
53  CALL bort(bort_str)
54 902 WRITE(bort_str,'("BUFRLIB: NENUBD - TABLE D FXY VALUE (",A,") '//
55  . 'HAS ALREADY BEEN DEFINED (DUPLICATE)")') numb
56  CALL bort(bort_str)
57 903 WRITE(bort_str,'("BUFRLIB: NENUBD - TABLE D MNEMONIC (",A,") '//
58  . 'HAS ALREADY BEEN DEFINED (DUPLICATE)")') nemo
59  CALL bort(bort_str)
60  END
subroutine bort(STR)
Log one error message and abort application program.
Definition: bort.f:18
This module contains array and variable declarations used to store DX BUFR tables internally for mult...
character *600, dimension(:,:), allocatable tabd
Table D entries for each internal I/O stream.
integer, dimension(:), allocatable ntbd
Number of Table D entries for each internal I/O stream (up to a maximum of MAXTBD,...
integer, dimension(:), allocatable ntbb
Number of Table B entries for each internal I/O stream (up to a maximum of MAXTBB,...
character *128, dimension(:,:), allocatable tabb
Table B entries for each internal I/O stream.
subroutine nenubd(NEMO, NUMB, LUN)
Confirm that a mnemonic and FXY value haven't already been defined.
Definition: nenubd.f:22