NCEPLIBS-bufr  11.5.0
 All Data Structures Files Functions Variables Pages
nenubd.f
Go to the documentation of this file.
1 C> @file
2 C> @author WOOLLEN @date 1994-01-06
3 
4 C> THIS SUBROUTINE CHECKS A MNEMONIC AND FXY VALUE PAIR THAT
5 C> WERE READ FROM A USER-SUPPLIED BUFR DICTIONARY TABLE IN CHARACTER
6 C> FORMAT, IN ORDER TO MAKE SURE THAT NEITHER VALUE HAS ALREADY BEEN
7 C> DEFINED WITHIN INTERNAL BUFR TABLE B OR D (IN MODULE TABABD) FOR
8 C> THE GIVEN LUN. IF EITHER VALUE HAS ALREADY BEEN DEFINED FOR THIS
9 C> LUN, THEN AN APPROPRIATE CALL IS MADE TO BUFR ARCHIVE LIBRARY
10 C> SUBROUTINE BORT.
11 C>
12 C> PROGRAM HISTORY LOG:
13 C> 1994-01-06 J. WOOLLEN -- ORIGINAL AUTHOR (ENTRY POINT IN NENUCK)
14 C> 1995-06-28 J. WOOLLEN -- INCREASED THE SIZE OF INTERNAL BUFR TABLE
15 C> ARRAYS IN ORDER TO HANDLE BIGGER FILES
16 C> 1998-07-08 J. WOOLLEN -- REPLACED CALL TO CRAY LIBRARY ROUTINE
17 C> "ABORT" WITH CALL TO NEW INTERNAL BUFRLIB
18 C> ROUTINE "BORT" (IN PARENT ROUTINE NENUCK)
19 C> 1999-11-18 J. WOOLLEN -- THE NUMBER OF BUFR FILES WHICH CAN BE
20 C> OPENED AT ONE TIME INCREASED FROM 10 TO 32
21 C> (NECESSARY IN ORDER TO PROCESS MULTIPLE
22 C> BUFR FILES UNDER THE MPI) (IN PARENT
23 C> ROUTINE NENUCK)
24 C> 2002-05-14 J. WOOLLEN -- CHANGED FROM AN ENTRY POINT TO INCREASE
25 C> PORTABILITY TO OTHER PLATFORMS (NENUCK WAS
26 C> THEN REMOVED BECAUSE IT WAS JUST A DUMMY
27 C> ROUTINE WITH ENTRIES)
28 C> 2003-11-04 J. ATOR -- ADDED DOCUMENTATION
29 C> 2003-11-04 S. BENDER -- ADDED REMARKS/BUFRLIB ROUTINE
30 C> INTERDEPENDENCIES
31 C> 2003-11-04 D. KEYSER -- UNIFIED/PORTABLE FOR WRF; ADDED HISTORY
32 C> DOCUMENTATION; OUTPUTS MORE COMPLETE
33 C> DIAGNOSTIC INFO WHEN ROUTINE TERMINATES
34 C> ABNORMALLY
35 C> 2014-12-10 J. ATOR -- USE MODULES INSTEAD OF COMMON BLOCKS
36 C>
37 C> USAGE: CALL NENUBD (NEMO, NUMB, LUN)
38 C> INPUT ARGUMENT LIST:
39 C> NEMO - CHARACTER*8: MNEMONIC
40 C> NUMB - CHARACTER*6: FXY VALUE ASSOCIATED WITH NEMO
41 C> LUN - INTEGER: I/O STREAM INDEX INTO INTERNAL MEMORY ARRAYS
42 C>
43 C> THIS ROUTINE CALLS: BORT
44 C> THIS ROUTINE IS CALLED BY: STBFDX STNTBI
45 C> Normally not called by any application
46 C> programs.
47 C>
48  SUBROUTINE nenubd(NEMO,NUMB,LUN)
49 
50  USE moda_tababd
51 
52  CHARACTER*128 bort_str
53  CHARACTER*8 nemo
54  CHARACTER*6 numb
55 
56 C-----------------------------------------------------------------------
57 C-----------------------------------------------------------------------
58 C CHECK TABLE B AND D
59 C -------------------
60 
61  DO n=1,ntbb(lun)
62  IF(numb.EQ.tabb(n,lun)(1: 6)) goto 900
63  IF(nemo.EQ.tabb(n,lun)(7:14)) goto 901
64  ENDDO
65 
66  DO n=1,ntbd(lun)
67  IF(numb.EQ.tabd(n,lun)(1: 6)) goto 902
68  IF(nemo.EQ.tabd(n,lun)(7:14)) goto 903
69  ENDDO
70 
71 C EXITS
72 C -----
73 
74  RETURN
75 900 WRITE(bort_str,'("BUFRLIB: NENUBD - TABLE B FXY VALUE (",A,") '//
76  . 'HAS ALREADY BEEN DEFINED (DUPLICATE)")') numb
77  CALL bort(bort_str)
78 901 WRITE(bort_str,'("BUFRLIB: NENUBD - TABLE B MNEMONIC (",A,") '//
79  . 'HAS ALREADY BEEN DEFINED (DUPLICATE)")') nemo
80  CALL bort(bort_str)
81 902 WRITE(bort_str,'("BUFRLIB: NENUBD - TABLE D FXY VALUE (",A,") '//
82  . 'HAS ALREADY BEEN DEFINED (DUPLICATE)")') numb
83  CALL bort(bort_str)
84 903 WRITE(bort_str,'("BUFRLIB: NENUBD - TABLE D MNEMONIC (",A,") '//
85  . 'HAS ALREADY BEEN DEFINED (DUPLICATE)")') nemo
86  CALL bort(bort_str)
87  END
This module contains array and variable declarations used to store DX BUFR tables internally for mult...
Definition: moda_tababd.F:10
subroutine nenubd(NEMO, NUMB, LUN)
THIS SUBROUTINE CHECKS A MNEMONIC AND FXY VALUE PAIR THAT WERE READ FROM A USER-SUPPLIED BUFR DICTION...
Definition: nenubd.f:48
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
Definition: bort.f:23